[LLVMdev] 134.perl

Chris Lattner sabre at nondot.org
Thu Apr 1 14:00:02 PST 2004


On Thu, 1 Apr 2004, Misha Brukman wrote:
> If you are running the script that llvm-gcc outputs, the script does not
> have that switch: `-enable-correct-eh-support' which you need to pass to
> LLC or LLI for correct code generation.

Here's a little more background.  When you compile an link a program with
llvmgcc, like so:

llvmgcc -c x.c -o x.o
llvmgcc -c y.c -o y.o
llvmgcc x.o y.o -o program

The final command actually produces two files "program" and "program.bc".
The "program" file is actually a small shell script that executes
"program.bc" with the 'lli' tool (the JIT).

The problem is that by default, the LLVM code generators do not support
exception handling.  In order to enable this, you need to pass
-enable-correct-eh-support into the code generator.  Since you're probably
running the program through the generated shell script, just edit the
"program" script to add -enable-correct-eh-support to the list of options
passed into lli.

Please let us know if this makes sense :)

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list