From d9fa5d6a23deead011a206f99d71e96b86543d8d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 26 Jul 2008 22:39:33 +0000 Subject: Fix a bug in my previous patch, CGF is not valid for constants outside a function llvm-svn: 54108 --- clang/lib/CodeGen/CGExprConstant.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 2aaf2979bc6..9efe801852b 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -627,8 +627,8 @@ public: llvm::Constant *EmitConversion(llvm::Constant *Src, QualType SrcType, QualType DstType) { - SrcType = CGF->getContext().getCanonicalType(SrcType); - DstType = CGF->getContext().getCanonicalType(DstType); + SrcType = CGM.getContext().getCanonicalType(SrcType); + DstType = CGM.getContext().getCanonicalType(DstType); if (SrcType == DstType) return Src; // Handle conversions to bool first, they are special: comparisons against 0. -- cgit v1.2.3