forked from OSchip/llvm-project
Minor style cleanup after 240843 [NFC]
Use a for-each loop in one case and rename the function to reflect it's new usage. llvm-svn: 240847
This commit is contained in:
parent
81ba1353ce
commit
007561acdc
|
@ -370,7 +370,7 @@ private:
|
||||||
void visitSelectInst(SelectInst &SI);
|
void visitSelectInst(SelectInst &SI);
|
||||||
void visitUserOp1(Instruction &I);
|
void visitUserOp1(Instruction &I);
|
||||||
void visitUserOp2(Instruction &I) { visitUserOp1(I); }
|
void visitUserOp2(Instruction &I) { visitUserOp1(I); }
|
||||||
void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallSite CS);
|
void visitIntrinsicCallSite(Intrinsic::ID ID, CallSite CS);
|
||||||
template <class DbgIntrinsicTy>
|
template <class DbgIntrinsicTy>
|
||||||
void visitDbgIntrinsic(StringRef Kind, DbgIntrinsicTy &DII);
|
void visitDbgIntrinsic(StringRef Kind, DbgIntrinsicTy &DII);
|
||||||
void visitAtomicCmpXchgInst(AtomicCmpXchgInst &CXI);
|
void visitAtomicCmpXchgInst(AtomicCmpXchgInst &CXI);
|
||||||
|
@ -2294,7 +2294,7 @@ void Verifier::VerifyCallSite(CallSite CS) {
|
||||||
|
|
||||||
if (Function *F = CS.getCalledFunction())
|
if (Function *F = CS.getCalledFunction())
|
||||||
if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())
|
if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())
|
||||||
visitIntrinsicFunctionCall(ID, CS);
|
visitIntrinsicCallSite(ID, CS);
|
||||||
|
|
||||||
visitInstruction(*I);
|
visitInstruction(*I);
|
||||||
}
|
}
|
||||||
|
@ -3140,9 +3140,8 @@ Verifier::VerifyIntrinsicIsVarArg(bool isVarArg,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// visitIntrinsicFunction - Allow intrinsics to be verified in different ways.
|
/// Allow intrinsics to be verified in different ways.
|
||||||
///
|
void Verifier::visitIntrinsicCallSite(Intrinsic::ID ID, CallSite CS) {
|
||||||
void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallSite CS) {
|
|
||||||
Function *IF = CS.getCalledFunction();
|
Function *IF = CS.getCalledFunction();
|
||||||
Assert(IF->isDeclaration(), "Intrinsic functions should never be defined!",
|
Assert(IF->isDeclaration(), "Intrinsic functions should never be defined!",
|
||||||
IF);
|
IF);
|
||||||
|
@ -3187,9 +3186,9 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallSite CS) {
|
||||||
|
|
||||||
// If the intrinsic takes MDNode arguments, verify that they are either global
|
// If the intrinsic takes MDNode arguments, verify that they are either global
|
||||||
// or are local to *this* function.
|
// or are local to *this* function.
|
||||||
for (unsigned i = 0, e = CS.getNumArgOperands(); i != e; ++i)
|
for (Value *V : CS.args())
|
||||||
if (auto *MD = dyn_cast<MetadataAsValue>(CS.getArgOperand(i)))
|
if (auto *MD = dyn_cast<MetadataAsValue>(V))
|
||||||
visitMetadataAsValue(*MD, CS.getParent()->getParent());
|
visitMetadataAsValue(*MD, CS.getCaller());
|
||||||
|
|
||||||
switch (ID) {
|
switch (ID) {
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue