diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-03-19 20:39:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-03-19 20:39:08 +0000 |
commit | 7fc44c8c5fb0efd6c909f4e306ad516df88e93e1 (patch) | |
tree | f930dbc9fbd26b0b446c2781c1303d67e2eb8e95 /lib | |
parent | 3a341375487e4a296821edbcebafd289d55d119b (diff) | |
download | external_llvm-7fc44c8c5fb0efd6c909f4e306ad516df88e93e1.zip external_llvm-7fc44c8c5fb0efd6c909f4e306ad516df88e93e1.tar.gz external_llvm-7fc44c8c5fb0efd6c909f4e306ad516df88e93e1.tar.bz2 |
Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 1685923..e5417f5 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -203,9 +203,9 @@ typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, DenseMapAPIntKeyInfo> IntMapTy; static ManagedStatic<IntMapTy> IntConstants; -ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V) { +ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V, bool isSigned) { const IntegerType *ITy = cast<IntegerType>(Ty); - return get(APInt(ITy->getBitWidth(), V)); + return get(APInt(ITy->getBitWidth(), V, isSigned)); } // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap |