Fix a bug in my previous patch, CGF is not valid for constants outside a function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54108 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 2aaf297..9efe801 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -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.