[LLVMdev] Integrating LLVM in an existing project

Chris Lattner sabre at nondot.org
Sun Apr 8 18:56:15 PDT 2007


On Fri, 6 Apr 2007, Duncan Sands wrote:
> the compiler fails to build if you do that :-/
> The attached patch helps a bit but it needs more work.
> Also, I suppose you might need to uncomment this bit in llvm-backend.cpp
> as well:
> // Disabled until PR1224 is resolved.
>  //if (flag_exceptions)
>  //  Args.push_back("--enable-eh");

PR1224 is resolved.  Do you want to try enabling this and see if stuff 
continues to work?

Your patch looks great, I applied it:

> +      TypeInfo = BitCastToType(TypeInfo, PointerType::get(Type::Int8Ty));
>
> This argument is, as far as I can see, just a "cookie" and certainly need
> not be an i8*, thus the bitcast.  Also, since it is a cookie, shouldn't
> the intrinsic be taking an opaque* rather than an i8*?

The bitcast shouldn't hurt anything.  It's good to have standardized 
specific prototypes.  For example, memcpy is declared as taking i8*'s, 
which invariably requires bitcasts as well.

Thanks Duncan,

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list