diff options
Diffstat (limited to 'CodeGen')
-rw-r--r-- | CodeGen/CGDecl.cpp | 4 | ||||
-rw-r--r-- | CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | CodeGen/CodeGenModule.cpp | 2 | ||||
-rw-r--r-- | CodeGen/CodeGenTypes.cpp | 3 |
4 files changed, 6 insertions, 5 deletions
diff --git a/CodeGen/CGDecl.cpp b/CodeGen/CGDecl.cpp index d86f305151..63b9d6f881 100644 --- a/CodeGen/CGDecl.cpp +++ b/CodeGen/CGDecl.cpp @@ -69,7 +69,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const BlockVarDecl &D) { QualType Ty = D.getCanonicalType(); llvm::Value *DeclPtr; - if (Ty->isConstantSizeType()) { + if (Ty->isConstantSizeType(getContext())) { // A normal fixed sized variable becomes an alloca in the entry block. const llvm::Type *LTy = ConvertType(Ty); // TODO: Alignment @@ -93,7 +93,7 @@ void CodeGenFunction::EmitParmDecl(const ParmVarDecl &D, llvm::Value *Arg) { QualType Ty = D.getCanonicalType(); llvm::Value *DeclPtr; - if (!Ty->isConstantSizeType()) { + if (!Ty->isConstantSizeType(getContext())) { // Variable sized values always are passed by-reference. DeclPtr = Arg; } else { diff --git a/CodeGen/CGExpr.cpp b/CodeGen/CGExpr.cpp index 58ed48e899..3ec0f25064 100644 --- a/CodeGen/CGExpr.cpp +++ b/CodeGen/CGExpr.cpp @@ -429,7 +429,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) { // We know that the pointer points to a type of the correct size, unless the // size is a VLA. - if (!E->getType()->isConstantSizeType()) + if (!E->getType()->isConstantSizeType(getContext())) assert(0 && "VLA idx not implemented"); return LValue::MakeAddr(Builder.CreateGEP(Base, Idx, "arrayidx")); } diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp index 262469e34b..a1a498b082 100644 --- a/CodeGen/CodeGenModule.cpp +++ b/CodeGen/CodeGenModule.cpp @@ -70,7 +70,7 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) { } else if (D->getType()->isIntegerType()) { llvm::APSInt Value(getContext().getTypeSize(D->getInit()->getType(), SourceLocation())); - if (D->getInit()->isIntegerConstantExpr(Value)) + if (D->getInit()->isIntegerConstantExpr(Value, Context)) Init = llvm::ConstantInt::get(Value); } assert(Init && "FIXME: Global variable initializers unimp!"); diff --git a/CodeGen/CodeGenTypes.cpp b/CodeGen/CodeGenTypes.cpp index 5bae791080..22ee504662 100644 --- a/CodeGen/CodeGenTypes.cpp +++ b/CodeGen/CodeGenTypes.cpp @@ -85,7 +85,8 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) { "FIXME: We only handle trivial array types so far!"); llvm::APSInt Size(32); - if (A.getSizeExpr() && A.getSizeExpr()->isIntegerConstantExpr(Size)) { + if (A.getSizeExpr() && + A.getSizeExpr()->isIntegerConstantExpr(Size, Context)) { const llvm::Type *EltTy = ConvertType(A.getElementType()); return llvm::ArrayType::get(EltTy, Size.getZExtValue()); } else { |