[LLVMdev] llvm cannot iterate a [3 x i8]
Óscar Fuentes
ofv at wanadoo.es
Mon Mar 4 02:53:08 PST 2013
Alexandru Ionut Diaconescu <alexandruionutdiaconescu at gmail.com> writes:
> Hello everyone,
>
> I am trying to "parse" a part of LLVM IR. More exactly, from
>
> @.str = private unnamed_addr constant [3 x i8] c"DS\00", section
> "llvm.metadata"
>
> I want to get "DS". It is the single place in the whole bytecode from where
> I can get it. I have :
[snip]
No specific help for your problem, but a generic one: pass your LLVM
bytecode to
llc -march=cpp <your-llvm-bytecode-file>
you'll obtain a C++ file with the API calls for *generating* the
bytecode. Seeing how the IR is generated, hopefully you will easily
figure out how to access it.
More information about the llvm-dev
mailing list