[LLVMdev] signed/unsigned integers ?

Duncan Sands baldrick at free.fr
Wed Mar 30 01:45:30 PDT 2011


Hi Julien,

>> Values cannot be signed or unsigned since they represent some object
>> in memory / register. It's the operation which says whether the value
>> should be treated as signed or not.
>
> Ok. But typically if I compile a program with a variable of type
> "unsigned" and another one of type "int":
>
> void f() {
> 	unsigned x;
> 	int y;
> 	...
> }
>
> The compiler remembers for debugging purpose that x is defined as
> unsigned, and y as signed, no ? I'm not familiar with LLVM debug info,
> but maybe I can find this info there ?

probably it can be extracted from debug info, but what if there is no debug
info?  Can you please explain what you intend to do with this information -
then maybe we can suggest another way to solve your problem.

Ciao, Duncan.



More information about the llvm-dev mailing list