mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
have tblgen emit cast<> instead of dyn_cast<> when we know it must succeed.
llvm-svn: 156902
This commit is contained in:
parent
9a33fc17be
commit
346025b7c0
@ -236,10 +236,10 @@ static void EmitTypeGenerate(raw_ostream &OS, const Record *ArgType,
|
|||||||
assert(Number < ArgNo && "Invalid matching number!");
|
assert(Number < ArgNo && "Invalid matching number!");
|
||||||
if (ArgType->isSubClassOf("LLVMExtendedElementVectorType"))
|
if (ArgType->isSubClassOf("LLVMExtendedElementVectorType"))
|
||||||
OS << "VectorType::getExtendedElementVectorType"
|
OS << "VectorType::getExtendedElementVectorType"
|
||||||
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
|
<< "(cast<VectorType>(Tys[" << Number << "]))";
|
||||||
else if (ArgType->isSubClassOf("LLVMTruncatedElementVectorType"))
|
else if (ArgType->isSubClassOf("LLVMTruncatedElementVectorType"))
|
||||||
OS << "VectorType::getTruncatedElementVectorType"
|
OS << "VectorType::getTruncatedElementVectorType"
|
||||||
<< "(dyn_cast<VectorType>(Tys[" << Number << "]))";
|
<< "(cast<VectorType>(Tys[" << Number << "]))";
|
||||||
else
|
else
|
||||||
OS << "Tys[" << Number << "]";
|
OS << "Tys[" << Number << "]";
|
||||||
} else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {
|
} else if (VT == MVT::iAny || VT == MVT::fAny || VT == MVT::vAny) {
|
||||||
|
Loading…
Reference in New Issue
Block a user