forked from OSchip/llvm-project
Fix a bug in my previous patch, CGF is not valid for constants outside a function
llvm-svn: 54108
This commit is contained in:
parent
0f398c4472
commit
d9fa5d6a23
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue