[LLVMdev] LLVM 2.0 and integer signedness

Chris Lattner sabre at nondot.org
Tue Jun 26 11:57:04 PDT 2007


On Tue, 26 Jun 2007, [ISO-8859-1] Alberto González wrote:
> I'm tracking reads and writes to variables in fixed source code
> points, and variables cannot change their types. For example:
>
> int a;
> uint b;
>
> a = -2;
> b = (uint) a;

Okay, that's somewhat problematic in the face of pointers (where you can 
cast int* to uint*, etc), but...

> Leaving signed and unsigned problems aside, how can i read debugging
> symbols from inside an opt modulepass?

Debug info is represented as llvm global variables.  You can see these 
with 'llvm-gcc -g -S -o - -emit-llvm t.c'.  They can be walked like any 
other global, but we don't currently have a good api to make this easy for 
debug info specifically.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list