mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-11 12:26:08 +00:00

This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
35 lines
733 B
C
35 lines
733 B
C
//===-- main.c --------------------------------------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
char *pointer;
|
|
char *another_pointer;
|
|
|
|
void f1() {
|
|
pointer = malloc(10); // malloc line
|
|
another_pointer = malloc(20); // malloc2 line
|
|
}
|
|
|
|
void f2() {
|
|
free(pointer); // free line
|
|
}
|
|
|
|
int main (int argc, char const *argv[])
|
|
{
|
|
f1();
|
|
f2();
|
|
|
|
printf("Hello world!\n"); // break line
|
|
|
|
pointer[0] = 'A'; // BOOM line
|
|
|
|
return 0;
|
|
}
|