diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 04:15:56 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 04:15:56 +0000 |
commit | 45535f3f22f55d53674f24bc71fa3fb8c73adeb0 (patch) | |
tree | fb2cb8369c53d2c81830ba347e77f7fd8d8cd117 | |
parent | ca63811b396757f97c84a7965eba6a4a8c26417e (diff) | |
download | bcm5719-llvm-45535f3f22f55d53674f24bc71fa3fb8c73adeb0.tar.gz bcm5719-llvm-45535f3f22f55d53674f24bc71fa3fb8c73adeb0.zip |
LLVMC2: -emit-llvm stops compilation.
llvm-svn: 59586
-rw-r--r-- | llvm/include/llvm/CompilerDriver/Tools.td | 2 | ||||
-rw-r--r-- | llvm/test/LLVMC/emit-llvm.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/CompilerDriver/Tools.td b/llvm/include/llvm/CompilerDriver/Tools.td index 4ff1a52822f..fa2cd33ffbd 100644 --- a/llvm/include/llvm/CompilerDriver/Tools.td +++ b/llvm/include/llvm/CompilerDriver/Tools.td @@ -25,6 +25,8 @@ def llvm_gcc_c : Tool< "llvm-gcc -c -x c $INFILE", (default), "llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm")), + (switch_option "emit-llvm", (stop_compilation), + (help "Emit LLVM intermediate files instead of native object files")), (switch_option "E", (stop_compilation), (help "Stop after the preprocessing stage, do not run the compiler")), (switch_option "fsyntax-only", (stop_compilation), diff --git a/llvm/test/LLVMC/emit-llvm.c b/llvm/test/LLVMC/emit-llvm.c new file mode 100644 index 00000000000..5a6aa0f538a --- /dev/null +++ b/llvm/test/LLVMC/emit-llvm.c @@ -0,0 +1,4 @@ +// RUN: llvmc2 -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1 + +int f0(void) { +} |