diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:06:29 +0000 |
| commit | 94994d372d014ce4c8758b9605d63fae651bd8aa (patch) | |
| tree | 51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /lit/Driver/Inputs/hello.cpp | |
| parent | 39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff) | |
Notes
Diffstat (limited to 'lit/Driver/Inputs/hello.cpp')
| -rw-r--r-- | lit/Driver/Inputs/hello.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lit/Driver/Inputs/hello.cpp b/lit/Driver/Inputs/hello.cpp new file mode 100644 index 000000000000..1ec0677aeb2c --- /dev/null +++ b/lit/Driver/Inputs/hello.cpp @@ -0,0 +1,11 @@ +// The build.py script always runs the compiler in C++ mode, regardless of the +// file extension. This results in mangled names presented to the linker which +// in turn cannot find the printf symbol. +extern "C" { +int printf(const char *format, ...); + +int main(int argc, char **argv) { + printf("Hello World\n"); + return 0; +} +} |
