summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-26 21:16:59 +0000
committerVedant Kumar <vsk@apple.com>2018-06-26 21:16:59 +0000
commit1cb63dc2d59233ac71b4399b6f90d3208c50a791 (patch)
treebe01177cb486756fa17c8cc853bbf83ae5b61dd4
parent70ec1dd14d66a088be290908d2985652b4863892 (diff)
downloadbcm5719-llvm-1cb63dc2d59233ac71b4399b6f90d3208c50a791.tar.gz
bcm5719-llvm-1cb63dc2d59233ac71b4399b6f90d3208c50a791.zip
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
-rw-r--r--llvm/include/llvm/IR/BasicBlock.h2
-rw-r--r--llvm/lib/IR/BasicBlock.cpp2
-rw-r--r--llvm/unittests/IR/InstructionsTest.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h
index 57f47aa44cf..1ee19975af7 100644
--- a/llvm/include/llvm/IR/BasicBlock.h
+++ b/llvm/include/llvm/IR/BasicBlock.h
@@ -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
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp
index 005a77261f9..7c3e5862d1c 100644
--- a/llvm/lib/IR/BasicBlock.cpp
+++ b/llvm/lib/IR/BasicBlock.cpp
@@ -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;
diff --git a/llvm/unittests/IR/InstructionsTest.cpp b/llvm/unittests/IR/InstructionsTest.cpp
index 69e74544a90..6bac59620d9 100644
--- a/llvm/unittests/IR/InstructionsTest.cpp
+++ b/llvm/unittests/IR/InstructionsTest.cpp
@@ -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());
OpenPOWER on IntegriCloud