aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 22:16:19 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 22:16:19 +0000
commit96e0fc726c6fe7538522c60743705d5e696b40af (patch)
treeece7063f7ecc38f4d96b803d5457c7f762756bc1 /lib/CodeGen/CGExprConstant.cpp
parent6217b80b7a1379b74cced1c076338262c3c980b3 (diff)
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 8e45997aee..e5d1b06bb8 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -83,7 +83,7 @@ class VISIBILITY_HIDDEN ConstStructBuilder {
const llvm::Type *Ty = llvm::Type::Int8Ty;
if (NumBytes > 1)
- Ty = CGM.getLLVMContext().getArrayType(Ty, NumBytes);
+ Ty = llvm::ArrayType::get(Ty, NumBytes);
llvm::Constant *Padding = CGM.getLLVMContext().getNullValue(Ty);
PackedElements.push_back(Padding);
@@ -251,7 +251,7 @@ class VISIBILITY_HIDDEN ConstStructBuilder {
const llvm::Type *Ty = llvm::Type::Int8Ty;
if (NumBytes > 1)
- Ty = CGM.getLLVMContext().getArrayType(Ty, NumBytes);
+ Ty = llvm::ArrayType::get(Ty, NumBytes);
llvm::Constant *C = CGM.getLLVMContext().getNullValue(Ty);
Elements.push_back(C);
@@ -434,7 +434,7 @@ public:
std::vector<const llvm::Type*> Types;
for (unsigned i = 0; i < Elts.size(); ++i)
Types.push_back(Elts[i]->getType());
- const llvm::StructType *SType = VMContext.getStructType(Types, true);
+ const llvm::StructType *SType = llvm::StructType::get(Types, true);
return llvm::ConstantStruct::get(SType, Elts);
}
@@ -549,7 +549,7 @@ public:
std::vector<const llvm::Type*> Types;
for (unsigned i = 0; i < Elts.size(); ++i)
Types.push_back(Elts[i]->getType());
- SType = VMContext.getStructType(Types, true);
+ SType = llvm::StructType::get(Types, true);
}
return llvm::ConstantStruct::get(SType, Elts);
@@ -572,13 +572,13 @@ public:
if (unsigned NumPadBytes = TotalSize - CurSize) {
const llvm::Type *Ty = llvm::Type::Int8Ty;
if (NumPadBytes > 1)
- Ty = VMContext.getArrayType(Ty, NumPadBytes);
+ Ty = llvm::ArrayType::get(Ty, NumPadBytes);
Elts.push_back(VMContext.getNullValue(Ty));
Types.push_back(Ty);
}
- llvm::StructType* STy = VMContext.getStructType(Types, false);
+ llvm::StructType* STy = llvm::StructType::get(Types, false);
return llvm::ConstantStruct::get(STy, Elts);
}
@@ -609,7 +609,7 @@ public:
InsertBitfieldIntoStruct(Elts, curField, ILE->getInit(0));
const llvm::ArrayType *RetTy =
- VMContext.getArrayType(NV->getType(), NumElts);
+ llvm::ArrayType::get(NV->getType(), NumElts);
return llvm::ConstantArray::get(RetTy, Elts);
}
@@ -831,7 +831,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E,
// Apply offset if necessary.
if (!Offset->isNullValue()) {
const llvm::Type *Type =
- VMContext.getPointerTypeUnqual(llvm::Type::Int8Ty);
+ llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
llvm::Constant *Casted = llvm::ConstantExpr::getBitCast(C, Type);
Casted = llvm::ConstantExpr::getGetElementPtr(Casted, &Offset, 1);
C = llvm::ConstantExpr::getBitCast(Casted, C->getType());