Author: lattner
Date: Sat Jul 26 17:39:33 2008
New Revision: 54108

URL: http://llvm.org/viewvc/llvm-project?rev=54108&view=rev
Log:
Fix a bug in my previous patch, CGF is not valid for constants outside a 
function

Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=54108&r1=54107&r2=54108&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Sat Jul 26 17:39:33 2008
@@ -627,8 +627,8 @@
   
   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.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to