diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-21 19:04:23 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-21 19:04:23 +0000 |
commit | 246dd65a13111f0288d14ff6b765688e3e5edaa7 (patch) | |
tree | cab2572e034f07a9093c42d64d63142dc75c5751 /lib/CodeGen/AsmPrinter.cpp | |
parent | d3773507188d550a3ce5be09662235cf23679811 (diff) | |
download | external_llvm-246dd65a13111f0288d14ff6b765688e3e5edaa7.zip external_llvm-246dd65a13111f0288d14ff6b765688e3e5edaa7.tar.gz external_llvm-246dd65a13111f0288d14ff6b765688e3e5edaa7.tar.bz2 |
Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 82e110a..5bbcaee 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -392,13 +392,7 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) { assert(CB->getValue()); O << "1"; } else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) { - if (CI->getType()->isSigned()) { - if (((CI->getSExtValue() << 32) >> 32) == CI->getSExtValue()) - O << CI->getSExtValue(); - else - O << (uint64_t)CI->getSExtValue(); - } else - O << CI->getZExtValue(); + O << CI->getSExtValue(); } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) { // This is a constant address for a global variable or function. Use the // name of the variable or function as the address value, possibly |