diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-26 22:39:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-26 22:39:33 +0000 |
commit | d394cc6f0fca198ec8def0f1cfaf16b5df0d52fa (patch) | |
tree | 321535abe5fec8b2236196ab55eb3e4b3782e9ec /lib/CodeGen/CGExprConstant.cpp | |
parent | 9619662a1d42e2008b865d3459c0677e149dad1b (diff) |
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
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 2aaf2979bc..9efe801852 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 = 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. |