[LLVMdev] How to get line number of a function in a bitcode file?
John Criswell
criswell at illinois.edu
Mon Jul 11 08:04:37 PDT 2011
On 7/10/11 9:10 AM, Chen Liu wrote:
> I tried to install the SAFECode in LLVM 2.6 following the instruction in
> Install.html. But when I do the step:
First, if you're wanting the code in DebugInstrumentation.cpp, you need
to get the version in my patch
(http://llvm.cs.uiuc.edu/~criswell/sc.tar.gz). The debug metadata API
changed between LLVM 2.6 and LLVM 2.7, so if you're working with
mainline LLVM, you should get the newer version of the code that is
available in the patch.
Second, to answer your specific question, I believe you have a
mismatched version of llvm-gcc or Clang. Please see my answer on svadev
this morning to the same issue:
http://lists.cs.uiuc.edu/pipermail/svadev/2011-July/000086.html; this
will hopefully fix your problem if, in fact, you do want to compile
SAFECode.
-- John T.
> # cd projects/poolalloc
> # make
>
> I get the errore below:
> llvm[2]: Compiling qsort.c for Release build (bytecode)
> llvm[2]: Compiling strdup.c for Release build (bytecode)
> llvm[2]: Compiling qsort.c for Release build
> llvm[2]: Compiling strdup.c for Release build
> llvm[2]: Compiling qsort.ll to qsort.bc for Release build (bytecode)
> llvm[2]: Compiling strdup.ll to strdup.bc for Release build (bytecode)
> /home/chenliu/llvm-2.6/llvm/Release/bin/llvm-as: assembly parsed, but does
> not verify as correct!
> Intrinsic prototype has incorrect number of arguments!
> void (i8*, i8*, i64, i32, i1)* @llvm.memcpy.p0i8.p0i8.i64
> Broken module found, compilation terminated.
> Broken module found, compilation terminated.
> /home/chenliu/llvm-2.6/llvm/Release/bin/opt: Invalid bitcode signature
> make[2]: ***
> [/home/chenliu/llvm-2.6/llvm/projects/poolalloc/runtime/PreRT/Release/strdup.bc]
> Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory
> `/home/chenliu/llvm-2.6/llvm/projects/poolalloc/runtime/PreRT'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory
> `/home/chenliu/llvm-2.6/llvm/projects/poolalloc/runtime'
> make: *** [all] Error 1
>
More information about the llvm-dev
mailing list