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/CGExprConstant.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 813bcfb855..2aaf2979bc 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -627,8 +627,8 @@ public: llvm::Constant *EmitConversion(llvm::Constant *Src, QualType SrcType, QualType DstType) { - SrcType = SrcType.getCanonicalType(); - DstType = DstType.getCanonicalType(); + SrcType = CGF->getContext().getCanonicalType(SrcType); + DstType = CGF->getContext().getCanonicalType(DstType); if (SrcType == DstType) return Src; // Handle conversions to bool first, they are special: comparisons against 0. @@ -813,9 +813,8 @@ public: llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, - CodeGenFunction *CGF) -{ - QualType type = E->getType().getCanonicalType(); + CodeGenFunction *CGF) { + QualType type = Context.getCanonicalType(E->getType()); if (type->isIntegerType()) { llvm::APSInt Value(static_cast(Context.getTypeSize(type))); -- cgit v1.2.3