[PATCH] D53740: [globalisel][irtranslator] Verify that DILocations aren't lost in translation

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 29 09:32:28 PDT 2018


aemerson added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:124
+           "Inserted instruction without a current MI");
+    LLVM_DEBUG(dbgs() << "Checking DILocation from " << *CurrInst
+                      << " was copied to " << MI);
----------------
dsanders wrote:
> aemerson wrote:
> > I think this debug print is probably unnecessary given it'll print for every instruction translated (and without ASSERTIONS it won't actually do anything).
> I'm not sure I understand this comment. It sounds like you're suggesting its removal but the follow on implies the right thing to do is to wrap it in '#ifndef NDEBUG'.
Yes I was suggesting removing it.

AFAIK NDEBUG and assertions are independent of each other, so without assertions enabled this will print a message that doesn't actually check anything. Could be wrong about that.


Repository:
  rL LLVM

https://reviews.llvm.org/D53740





More information about the llvm-commits mailing list