diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-26 22:37:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-26 22:37:01 +0000 |
commit | 9619662a1d42e2008b865d3459c0677e149dad1b (patch) | |
tree | 0714b13525e4c45644753ff246259e78f6775fd5 /lib/CodeGen/CGExprConstant.cpp | |
parent | 8b51fd76319d8b71f401cc6ad56e6f4f7be77958 (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/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<uint32_t>(Context.getTypeSize(type))); |