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

llvm-svn: 54108
This commit is contained in:
Chris Lattner 2008-07-26 22:39:33 +00:00
parent 0f398c4472
commit d9fa5d6a23
1 changed files with 2 additions and 2 deletions

View File

@ -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.