aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-26 22:37:01 +0000
committerChris Lattner <sabre@nondot.org>2008-07-26 22:37:01 +0000
commit9619662a1d42e2008b865d3459c0677e149dad1b (patch)
tree0714b13525e4c45644753ff246259e78f6775fd5 /lib/CodeGen/CGExpr.cpp
parent8b51fd76319d8b71f401cc6ad56e6f4f7be77958 (diff)
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
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp8
1 files changed, 4 insertions, 4 deletions
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<PointerType>(BaseExpr->getType().getCanonicalType());
+ cast<PointerType>(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<PointerType>(FnType.getCanonicalType())->getPointeeType();
+ FnType = FnType->getAsPointerType()->getPointeeType();
QualType ResultType = cast<FunctionType>(FnType)->getResultType();
llvm::SmallVector<llvm::Value*, 16> Args;