mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-31 09:32:11 +00:00
Use dyn_cast instead of isa + cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0cc83b6e85
commit
d7313c5608
@ -2375,7 +2375,11 @@ public:
|
||||
return getOperand(0);
|
||||
}
|
||||
|
||||
unsigned getIndex() {
|
||||
inline unsigned getIndex() {
|
||||
return Idx;
|
||||
}
|
||||
|
||||
inline const unsigned getIndex() const {
|
||||
return Idx;
|
||||
}
|
||||
|
||||
|
@ -1291,7 +1291,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
writeOperand(I.getOperand(op ), false); Out << ',';
|
||||
writeOperand(I.getOperand(op+1), false); Out << " ]";
|
||||
}
|
||||
} else if (isa<GetResultInst>(I)) {
|
||||
} else if (const GetResultInst *GRI = dyn_cast<GetResultInst>(&I)) {
|
||||
const StructType *STy = cast<StructType>(I.getOperand(0)->getType());
|
||||
unsigned NumElems = STy->getNumElements();
|
||||
Out << " {";
|
||||
@ -1303,7 +1303,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
|
||||
}
|
||||
Out << " }";
|
||||
writeOperand(I.getOperand(0), false);
|
||||
Out << ", " << cast<GetResultInst>(I).getIndex();
|
||||
Out << ", " << GRI->getIndex();
|
||||
} else if (isa<ReturnInst>(I) && !Operand) {
|
||||
Out << " void";
|
||||
} else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
|
||||
|
Loading…
Reference in New Issue
Block a user