aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/LLVMContextImpl.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-27 22:29:26 +0000
committerOwen Anderson <resistor@mac.com>2009-07-27 22:29:26 +0000
commit8fa3338ed2400c1352b137613d2c2c70d1ead695 (patch)
tree4e170be384fe7fcc54a6f686a6087729fc52ac0c /lib/VMCore/LLVMContextImpl.h
parentf08583b5323801b001175c2a62ac3e3d258723ac (diff)
downloadexternal_llvm-8fa3338ed2400c1352b137613d2c2c70d1ead695.zip
external_llvm-8fa3338ed2400c1352b137613d2c2c70d1ead695.tar.gz
external_llvm-8fa3338ed2400c1352b137613d2c2c70d1ead695.tar.bz2
Move ConstantStruct back to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.h')
-rw-r--r--lib/VMCore/LLVMContextImpl.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index a5ff8d5..21fef39 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -102,7 +102,7 @@ struct ConvertConstantType<ConstantStruct, StructType> {
std::vector<Constant*> C;
for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
C.push_back(cast<Constant>(OldC->getOperand(i)));
- Constant *New = NewTy->getContext().getConstantStruct(NewTy, C);
+ Constant *New = ConstantStruct::get(NewTy, C);
assert(New != OldC && "Didn't replace constant??");
OldC->uncheckedReplaceAllUsesWith(New);
@@ -458,6 +458,7 @@ class LLVMContextImpl {
friend class ConstantInt;
friend class ConstantFP;
+ friend class ConstantStruct;
public:
LLVMContextImpl(LLVMContext &C);
@@ -470,9 +471,6 @@ public:
Constant *getConstantArray(const ArrayType *Ty,
const std::vector<Constant*> &V);
- Constant *getConstantStruct(const StructType *Ty,
- const std::vector<Constant*> &V);
-
Constant *getConstantVector(const VectorType *Ty,
const std::vector<Constant*> &V);
@@ -494,15 +492,12 @@ public:
void erase(MDNode *M);
void erase(ConstantAggregateZero *Z);
void erase(ConstantArray *C);
- void erase(ConstantStruct *S);
void erase(ConstantVector *V);
// RAUW helpers
Constant *replaceUsesOfWithOnConstant(ConstantArray *CA, Value *From,
Value *To, Use *U);
- Constant *replaceUsesOfWithOnConstant(ConstantStruct *CS, Value *From,
- Value *To, Use *U);
};
}