[LLVMdev] problem when compiling to llvm bitcode
Duncan Sands
baldrick at free.fr
Wed Jun 10 23:08:32 PDT 2009
Hi Christos,
please open a bugreport.
Thanks,
Duncan.
> Hi, I am trying to write a pass to instrument llvm ir, but I got a problem
> when I worked with one of the PARSEC benchmarks.
> I stripped the source files as much as i could to still reproduce the error.
>
> When I emit llvm bitcode and then assemble native code I get the following
> error:
> + llvm-g++ -emit-llvm annealer_thread.cpp -c -o annealer_thread.o
> + llvm-g++ -emit-llvm rng.cpp -c -o rng.o
> + llc annealer_thread.o -f -o annealer_thread.s
> + llvm-g++ -c annealer_thread.s -o annealer_thread.o
> + llc rng.o -f -o rng.s
> + llvm-g++ -c rng.s -o rng.o
> + llvm-g++ annealer_thread.o rng.o
> rng.o: In function `MTRand::reload()':
> rng.s:(.text+0x50): multiple definition of `MTRand::reload()'
> annealer_thread.o:annealer_thread.s:(.text+0xa0): first defined here
> collect2: ld returned 1 exit status
>
> When I don't everything works:
> + llvm-g++ annealer_thread.cpp -c -o annealer_thread.o
> + llvm-g++ rng.cpp -c -o rng.o
> + llvm-g++ rng.o annealer_thread.o
>
> Thanks
> Christos
>
> http://www.nabble.com/file/p23970657/annealer_thread.cpp annealer_thread.cpp
> http://www.nabble.com/file/p23970657/rng.h rng.h
> http://www.nabble.com/file/p23970657/rng.cpp rng.cpp
More information about the llvm-dev
mailing list