summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/LLVMContext.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-28 18:32:17 +0000
committerOwen Anderson <resistor@mac.com>2009-07-28 18:32:17 +0000
commitc2c7932c640032063fddab43a13e2c15aa29fda3 (patch)
treec8345816a0dfb9ce8a8f71cb4aec18b7cd3bbeb3 /llvm/lib/VMCore/LLVMContext.cpp
parent2706a550711dd4c85924b78cc1787267e62aec56 (diff)
downloadbcm5719-llvm-c2c7932c640032063fddab43a13e2c15aa29fda3.tar.gz
bcm5719-llvm-c2c7932c640032063fddab43a13e2c15aa29fda3.zip
Change ConstantArray to 2.5 API.
llvm-svn: 77347
Diffstat (limited to 'llvm/lib/VMCore/LLVMContext.cpp')
-rw-r--r--llvm/lib/VMCore/LLVMContext.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/llvm/lib/VMCore/LLVMContext.cpp b/llvm/lib/VMCore/LLVMContext.cpp
index 340ca9557a2..97857c5dda7 100644
--- a/llvm/lib/VMCore/LLVMContext.cpp
+++ b/llvm/lib/VMCore/LLVMContext.cpp
@@ -103,42 +103,6 @@ ConstantAggregateZero* LLVMContext::getConstantAggregateZero(const Type* Ty) {
return pImpl->getConstantAggregateZero(Ty);
}
-
-// ConstantArray accessors.
-Constant* LLVMContext::getConstantArray(const ArrayType* T,
- const std::vector<Constant*>& V) {
- return pImpl->getConstantArray(T, V);
-}
-
-Constant* LLVMContext::getConstantArray(const ArrayType* T,
- Constant* const* Vals,
- unsigned NumVals) {
- // FIXME: make this the primary ctor method.
- return getConstantArray(T, std::vector<Constant*>(Vals, Vals+NumVals));
-}
-
-/// ConstantArray::get(const string&) - Return an array that is initialized to
-/// contain the specified string. If length is zero then a null terminator is
-/// added to the specified string so that it may be used in a natural way.
-/// Otherwise, the length parameter specifies how much of the string to use
-/// and it won't be null terminated.
-///
-Constant* LLVMContext::getConstantArray(const StringRef &Str,
- bool AddNull) {
- std::vector<Constant*> ElementVals;
- for (unsigned i = 0; i < Str.size(); ++i)
- ElementVals.push_back(ConstantInt::get(Type::Int8Ty, Str[i]));
-
- // Add a null terminator to the string...
- if (AddNull) {
- ElementVals.push_back(ConstantInt::get(Type::Int8Ty, 0));
- }
-
- ArrayType *ATy = getArrayType(Type::Int8Ty, ElementVals.size());
- return getConstantArray(ATy, ElementVals);
-}
-
-
// ConstantExpr accessors.
Constant* LLVMContext::getConstantExpr(unsigned Opcode, Constant* C1,
Constant* C2) {
@@ -525,15 +489,6 @@ void LLVMContext::erase(ConstantAggregateZero *Z) {
pImpl->erase(Z);
}
-void LLVMContext::erase(ConstantArray *C) {
- pImpl->erase(C);
-}
-
void LLVMContext::erase(ConstantVector *V) {
pImpl->erase(V);
}
-
-Constant *LLVMContext::replaceUsesOfWithOnConstant(ConstantArray *CA,
- Value *From, Value *To, Use *U) {
- return pImpl->replaceUsesOfWithOnConstant(CA, From, To, U);
-}
OpenPOWER on IntegriCloud