From 9619662a1d42e2008b865d3459c0677e149dad1b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 26 Jul 2008 22:37:01 +0000 Subject: remove uses of QualType::getCanonicalType() from codegen for PR2189 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54107 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 448f7ec97c..3b5eba84dc 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -404,7 +404,7 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) { if (E->getOpcode() == UnaryOperator::Extension) return EmitLValue(E->getSubExpr()); - QualType ExprTy=CGM.getContext().getCanonicalType(E->getSubExpr()->getType()); + QualType ExprTy = getContext().getCanonicalType(E->getSubExpr()->getType()); switch (E->getOpcode()) { default: assert(0 && "Unknown unary operator lvalue!"); case UnaryOperator::Deref: @@ -503,7 +503,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) { // size is a VLA. if (!E->getType()->isConstantSizeType()) assert(0 && "VLA idx not implemented"); - QualType ExprTy = CGM.getContext().getCanonicalType(E->getBase()->getType()); + QualType ExprTy = getContext().getCanonicalType(E->getBase()->getType()); return LValue::MakeAddr(Builder.CreateGEP(Base, Idx, "arrayidx"), ExprTy->getAsPointerType()->getPointeeType() @@ -560,7 +560,7 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { if (E->isArrow()) { BaseValue = EmitScalarExpr(BaseExpr); const PointerType *PTy = - cast(BaseExpr->getType().getCanonicalType()); + cast(getContext().getCanonicalType(BaseExpr->getType())); if (PTy->getPointeeType()->isUnionType()) isUnion = true; CVRQualifiers = PTy->getPointeeType().getCVRQualifiers(); @@ -720,7 +720,7 @@ RValue CodeGenFunction::EmitCallExpr(llvm::Value *Callee, QualType FnType, // The callee type will always be a pointer to function type, get the function // type. - FnType = cast(FnType.getCanonicalType())->getPointeeType(); + FnType = FnType->getAsPointerType()->getPointeeType(); QualType ResultType = cast(FnType)->getResultType(); llvm::SmallVector Args; -- cgit v1.2.3