mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7289 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3011a01b5
commit
8baa92ef0b
@ -143,13 +143,13 @@ bool ExpressionConvertibleToType(Value *V, const Type *Ty,
|
|||||||
ValueTypeCache::iterator CTMI = CTMap.find(V);
|
ValueTypeCache::iterator CTMI = CTMap.find(V);
|
||||||
if (CTMI != CTMap.end()) return CTMI->second == Ty;
|
if (CTMI != CTMap.end()) return CTMI->second == Ty;
|
||||||
|
|
||||||
// If it's a constant... all constants can be converted to a different type. We
|
// If it's a constant... all constants can be converted to a different
|
||||||
// just ask the constant propagator to see if it can convert the value...
|
// type. We just ask the constant propagator to see if it can convert the
|
||||||
|
// value...
|
||||||
//
|
//
|
||||||
if (Constant *CPV = dyn_cast<Constant>(V))
|
if (Constant *CPV = dyn_cast<Constant>(V))
|
||||||
return ConstantFoldCastInstruction(CPV, Ty);
|
return ConstantFoldCastInstruction(CPV, Ty);
|
||||||
|
|
||||||
|
|
||||||
CTMap[V] = Ty;
|
CTMap[V] = Ty;
|
||||||
if (V->getType() == Ty) return true; // Expression already correct type!
|
if (V->getType() == Ty) return true; // Expression already correct type!
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user