summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd9fa5d6a23deead011a206f99d71e96b86543d8d (patch)
tree74290834c576d25510ed8327a56b97829f027e68 /clang/lib/CodeGen/CGExprConstant.cpp
parent0f398c44722b9772121dd28815f7d6152571693f (diff)
downloadbcm5719-llvm-d9fa5d6a23deead011a206f99d71e96b86543d8d.tar.gz
bcm5719-llvm-d9fa5d6a23deead011a206f99d71e96b86543d8d.zip
Fix a bug in my previous patch, CGF is not valid for constants outside a function
llvm-svn: 54108
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprConstant.cpp4
1 files changed, 2 insertions, 2 deletions
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.
OpenPOWER on IntegriCloud