<html><head><base href="x-msg://5271/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 8, 2010, at 10:45 PM, Jonas Paulsson wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">I have made some usigned ConstantInt's, and when I print them (dump()), they are printed as signed always. Why is this? I do not know how to change the debug format for them.<br></div></span></blockquote><div><br></div><div>Values of the integer types in LLVM are really bit-patterns, not values;  whether a value is signed or unsigned is a meaning that you impose on the value, not something inherent in the value.  So the choice of how to dump is basically arbitrary, but I think the basic reasoning is that:</div><div>  - we want to print as decimal, because the most important cases are small positive numbers, and printing those in hex would be obnoxious</div><div>  - small negative numbers all look like each other when they've been printed as their unsigned equivalents</div><div>  - large unsigned numbers are usually bitmasks anyway, so the mere act of printing them in decimal will already obscure their meaning</div><div><br></div><div>John.</div></div></body></html>