mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Minor cleanups
llvm-svn: 7289
This commit is contained in:
parent
4afe7aea5f
commit
9eb9ec67f7
@ -143,13 +143,13 @@ bool ExpressionConvertibleToType(Value *V, const Type *Ty,
|
||||
ValueTypeCache::iterator CTMI = CTMap.find(V);
|
||||
if (CTMI != CTMap.end()) return CTMI->second == Ty;
|
||||
|
||||
// If it's a constant... all constants can be converted to a different type. We
|
||||
// just ask the constant propagator to see if it can convert the value...
|
||||
// If it's a constant... all constants can be converted to a different
|
||||
// type. We just ask the constant propagator to see if it can convert the
|
||||
// value...
|
||||
//
|
||||
if (Constant *CPV = dyn_cast<Constant>(V))
|
||||
return ConstantFoldCastInstruction(CPV, Ty);
|
||||
|
||||
|
||||
CTMap[V] = Ty;
|
||||
if (V->getType() == Ty) return true; // Expression already correct type!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user