[LLVMdev] non-signed integer Type

Scott Graham scott.llvm at h4ck3r.net
Fri Sep 19 14:16:47 PDT 2008


Hi

Is there any rationale written down for why integer types don't carry
(perhaps optional) signs somewhere? I feel like I might have read it
somewhere before (and I see that it used to exist pre 2.0), but I
can't find anything now.

Relatedly, is there a reasonable way to attach user-data to a type or
something? It feels very cumbersome to have to wrap all values and
types in my front end. For example, I know I want to load a function
argument, either sign-extend or zero-extend it, and then store it into
a local. I have to mirror LLVM's object model for types, values,
functions, etc. because I can't just get the parameter value from the
function, ask it for it's type, and convert it in the correct way.

thanks,
scott



More information about the llvm-dev mailing list