diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-07 23:28:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-07 23:28:45 +0000 |
commit | 24e52992c030a7dd30455bea773b3b402c37df37 (patch) | |
tree | 09e7fdfca1041c519a8436d91974f9615cb096aa /lldb/scripts/Python | |
parent | 6f8362c6bf854b809e270a7d1bf727e0e21f7d2e (diff) | |
download | llvm-24e52992c030a7dd30455bea773b3b402c37df37.zip llvm-24e52992c030a7dd30455bea773b3b402c37df37.tar.gz llvm-24e52992c030a7dd30455bea773b3b402c37df37.tar.bz2 |
Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').
It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.
*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.
llvm-svn: 105584
Diffstat (limited to 'lldb/scripts/Python')
0 files changed, 0 insertions, 0 deletions