1
0
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:
Vedant Kumar 2018-06-26 21:16:59 +00:00
parent b0117fde0d
commit a8f12623d6
3 changed files with 3 additions and 3 deletions

View File

@ -435,7 +435,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(BasicBlock, LLVMBasicBlockRef)
/// Advance \p It while it points to a debug instruction and return the result. /// 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. /// 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 } // end namespace llvm

View File

@ -480,7 +480,7 @@ Optional<uint64_t> BasicBlock::getIrrLoopHeaderWeight() const {
return Optional<uint64_t>(); return Optional<uint64_t>();
} }
BasicBlock::iterator llvm::skipDebugInfo(BasicBlock::iterator It) { BasicBlock::iterator llvm::skipDebugIntrinsics(BasicBlock::iterator It) {
while (isa<DbgInfoIntrinsic>(It)) while (isa<DbgInfoIntrinsic>(It))
++It; ++It;
return It; return It;

View File

@ -872,7 +872,7 @@ TEST(InstructionsTest, SkipDebug) {
// The first non-debug instruction is the terminator. // The first non-debug instruction is the terminator.
auto *Term = BB.getTerminator(); auto *Term = BB.getTerminator();
EXPECT_EQ(Term, BB.begin()->getNextNonDebugInstruction()); 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. // After the terminator, there are no non-debug instructions.
EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction()); EXPECT_EQ(nullptr, Term->getNextNonDebugInstruction());