aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-26 22:39:33 +0000
committerChris Lattner <sabre@nondot.org>2008-07-26 22:39:33 +0000
commitd394cc6f0fca198ec8def0f1cfaf16b5df0d52fa (patch)
tree321535abe5fec8b2236196ab55eb3e4b3782e9ec /lib/CodeGen/CGExprConstant.cpp
parent9619662a1d42e2008b865d3459c0677e149dad1b (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.cpp4
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.