[llvm] r335667 - Rename skipDebugInfo -> skipDebugIntrinsics, NFC

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 14:16:59 PDT 2018


Author: vedantk
Date: Tue Jun 26 14:16:59 2018
New Revision: 335667

URL: http://llvm.org/viewvc/llvm-project?rev=335667&view=rev
Log:
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!

Modified:
    llvm/trunk/include/llvm/IR/BasicBlock.h
    llvm/trunk/lib/IR/BasicBlock.cpp
    llvm/trunk/unittests/IR/InstructionsTest.cpp

Modified: llvm/trunk/include/llvm/IR/BasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/BasicBlock.h?rev=335667&r1=335666&r2=335667&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/BasicBlock.h (original)
+++ llvm/trunk/include/llvm/IR/BasicBlock.h Tue Jun 26 14:16:59 2018
@@ -435,7 +435,7 @@ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Basic
 
 /// 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
 

Modified: llvm/trunk/lib/IR/BasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/BasicBlock.cpp?rev=335667&r1=335666&r2=335667&view=diff
==============================================================================
--- llvm/trunk/lib/IR/BasicBlock.cpp (original)
+++ llvm/trunk/lib/IR/BasicBlock.cpp Tue Jun 26 14:16:59 2018
@@ -480,7 +480,7 @@ Optional<uint64_t> BasicBlock::getIrrLoo
   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;

Modified: llvm/trunk/unittests/IR/InstructionsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/InstructionsTest.cpp?rev=335667&r1=335666&r2=335667&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/InstructionsTest.cpp (original)
+++ llvm/trunk/unittests/IR/InstructionsTest.cpp Tue Jun 26 14:16:59 2018
@@ -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());




More information about the llvm-commits mailing list