Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index caa3ce1..4491eb2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -874,7 +874,7 @@
}
SDValue SelectionDAG::getConstant(const APInt &Val, MVT VT, bool isT) {
- return getConstant(*ConstantInt::get(Val), VT, isT);
+ return getConstant(*Context->getConstantInt(Val), VT, isT);
}
SDValue SelectionDAG::getConstant(const ConstantInt &Val, MVT VT, bool isT) {