aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-21 02:47:59 +0000
committerOwen Anderson <resistor@mac.com>2009-07-21 02:47:59 +0000
commitf53c371983908f02678b0e12c5d18466dcc70ffd (patch)
treed19212cba4a7a319cf06bfca831b86864b617d33 /lib/VMCore/Constants.cpp
parent7239b516940fc134f895f6480e1b15346f40f75b (diff)
downloadexternal_llvm-f53c371983908f02678b0e12c5d18466dcc70ffd.zip
external_llvm-f53c371983908f02678b0e12c5d18466dcc70ffd.tar.gz
external_llvm-f53c371983908f02678b0e12c5d18466dcc70ffd.tar.bz2
Move a bit more state over to the LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r--lib/VMCore/Constants.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index 71e9837..347cd16 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -169,28 +169,6 @@ ConstantInt::ConstantInt(const IntegerType *Ty, const APInt& V)
assert(V.getBitWidth() == Ty->getBitWidth() && "Invalid constant for type");
}
-ConstantInt *ConstantInt::TheTrueVal = 0;
-ConstantInt *ConstantInt::TheFalseVal = 0;
-
-namespace llvm {
- void CleanupTrueFalse(void *) {
- ConstantInt::ResetTrueFalse();
- }
-}
-
-static ManagedCleanup<llvm::CleanupTrueFalse> TrueFalseCleanup;
-
-ConstantInt *ConstantInt::CreateTrueFalseVals(bool WhichOne) {
- assert(TheTrueVal == 0 && TheFalseVal == 0);
- TheTrueVal = getGlobalContext().getConstantInt(Type::Int1Ty, 1);
- TheFalseVal = getGlobalContext().getConstantInt(Type::Int1Ty, 0);
-
- // Ensure that llvm_shutdown nulls out TheTrueVal/TheFalseVal.
- TrueFalseCleanup.Register();
-
- return WhichOne ? TheTrueVal : TheFalseVal;
-}
-
//===----------------------------------------------------------------------===//
// ConstantFP
//===----------------------------------------------------------------------===//