[cfe-dev] clang vs. gcc

Chris Lattner clattner at apple.com
Sat May 2 13:31:05 PDT 2009


On May 2, 2009, at 1:12 PM, Eli Friedman wrote:

> On Sat, May 2, 2009 at 12:27 PM, Chris Lattner <clattner at apple.com>  
> wrote:
>>
>> On May 1, 2009, at 10:25 AM, Filipe Cabecinhas wrote:
>>
>>> I'm just trying to compile valgrind. But valgrind is using
>>> __builtin_longjmp because it can't use libc. This doesn't compile
>>> because clang doesn't define that function. How could I pass this
>>> problem?
>>
>> The best way is to implement __builtin_longjmp in clang!
>
> Unfortunately, that would require rather extensive changes to LLVM...
> we would need real intrinsics to support it.  We could make
> __builtin_setjmp and __builtin_longjmp compile to setjmp and longjmp
> calls, but that doesn't seem like it would help much.

That is what llvm-gcc does, and it appears to work.

-Chris



More information about the cfe-dev mailing list