summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/LLVMContextImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/VMCore/LLVMContextImpl.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.cpp b/llvm/lib/VMCore/LLVMContextImpl.cpp
index 72e415cd66b..5efc1ebe5e7 100644
--- a/llvm/lib/VMCore/LLVMContextImpl.cpp
+++ b/llvm/lib/VMCore/LLVMContextImpl.cpp
@@ -21,15 +21,6 @@ using namespace llvm;
static char getValType(ConstantAggregateZero *CPZ) { return 0; }
-static std::vector<Constant*> getValType(ConstantVector *CP) {
- std::vector<Constant*> Elements;
- Elements.reserve(CP->getNumOperands());
- for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
- Elements.push_back(CP->getOperand(i));
- return Elements;
-}
-
-
LLVMContextImpl::LLVMContextImpl(LLVMContext &C) :
Context(C), TheTrueVal(0), TheFalseVal(0) { }
@@ -77,32 +68,6 @@ LLVMContextImpl::getConstantAggregateZero(const Type *Ty) {
return AggZeroConstants.getOrCreate(Ty, 0);
}
-Constant *LLVMContextImpl::getConstantVector(const VectorType *Ty,
- const std::vector<Constant*> &V) {
- assert(!V.empty() && "Vectors can't be empty");
- // If this is an all-undef or alll-zero vector, return a
- // ConstantAggregateZero or UndefValue.
- Constant *C = V[0];
- bool isZero = C->isNullValue();
- bool isUndef = isa<UndefValue>(C);
-
- if (isZero || isUndef) {
- for (unsigned i = 1, e = V.size(); i != e; ++i)
- if (V[i] != C) {
- isZero = isUndef = false;
- break;
- }
- }
-
- if (isZero)
- return Context.getConstantAggregateZero(Ty);
- if (isUndef)
- return Context.getUndef(Ty);
-
- // Implicitly locked.
- return VectorConstants.getOrCreate(Ty, V);
-}
-
// *** erase methods ***
void LLVMContextImpl::erase(MDString *M) {
@@ -118,7 +83,3 @@ void LLVMContextImpl::erase(MDNode *M) {
void LLVMContextImpl::erase(ConstantAggregateZero *Z) {
AggZeroConstants.remove(Z);
}
-
-void LLVMContextImpl::erase(ConstantVector *V) {
- VectorConstants.remove(V);
-}
OpenPOWER on IntegriCloud