x86_64 with -emit-llvm

Hi all,

A few newbie questions...

What am I missing here?

$ clang -emit-llvm anyfile.c
clang: error: 'x86_64-unknown-linux-gnu': unable to pass LLVM bit-code
files to linker

Linux 2.6.31-14 x86_64
llvm/clang from svn-head

-emit-ast works, but it's binary, how can I read it?

cheers,
--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

Use 'clang -c -emit-llvm anyfile.c', this will give you an LLVM
bitcode file as anyfile.o.

- Daniel

Thanks Daniel, it worked.

$ clang -c foo.c -o - -emit-llvm | llvm-dis -o=- | less

How can I read the AST file generated by the -emit-ast ?

cheers,
--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm

To do what? It's a binary file meant to be read by clang, nothing else.

- Daniel

I was hoping I could use it to debug modifications on clang regarding
AST changes in a more old-fashioned way.

Nevermind, thank you.

cheers,
--renato

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm