mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
Rename skipDebugInfo -> skipDebugIntrinsics, NFC
This addresses post-commit feedback about the name 'skipDebugInfo' being misleading. This name could be interpreted as meaning 'a function that skips instructions with debug locations'. The new name, 'skipDebugIntrinsics', makes it clear that this function only skips debug info intrinsics. Thanks to Adrian Prantl for pointing this out! llvm-svn: 335667
This commit is contained in:
parent
b0117fde0d
commit
a8f12623d6
@ -435,7 +435,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(BasicBlock, LLVMBasicBlockRef)
|
||||
|
||||
/// Advance \p It while it points to a debug instruction and return the result.
|
||||
/// This assumes that \p It is not at the end of a block.
|
||||
BasicBlock::iterator skipDebugInfo(BasicBlock::iterator It);
|
||||
BasicBlock::iterator skipDebugIntrinsics(BasicBlock::iterator It);
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
|
@ -480,7 +480,7 @@ Optional<uint64_t> BasicBlock::getIrrLoopHeaderWeight() const {
|
||||
return Optional<uint64_t>();
|
||||
}
|
||||
|
||||
BasicBlock::iterator llvm::skipDebugInfo(BasicBlock::iterator It) {
|
||||
BasicBlock::iterator llvm::skipDebugIntrinsics(BasicBlock::iterator It) {
|
||||
while (isa<DbgInfoIntrinsic>(It))
|
||||
++It;
|
||||
return It;
|
||||
|
@ -872,7 +872,7 @@ TEST(InstructionsTest, SkipDebug) {
|
||||
// The first non-debug instruction is the terminator.
|
||||
auto *Term = BB.getTerminator();
|
||||
EXPECT_EQ(Term, BB.begin()->getNextNonDebugInstruction());
|
||||
EXPECT_EQ(Term->getIterator(), skipDebugInfo(BB.begin()));
|
||||
EXPECT_EQ(Term->getIterator(), skipDebugIntrinsics(BB.begin()));
|
||||
|
||||
// After the terminator, there are no non-debug instructions.
|
||||
EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction());
|
||||
|
Loading…
Reference in New Issue
Block a user