[llvm] r309573 - Extend ifndef to printDebugLoc.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 09:29:00 PDT 2017


Author: fhahn
Date: Mon Jul 31 09:29:00 2017
New Revision: 309573

URL: http://llvm.org/viewvc/llvm-project?rev=309573&view=rev
Log:
Extend ifndef to printDebugLoc.

GCC7 did not warn about that, but Clang does.

Modified:
    llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp

Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=309573&r1=309572&r2=309573&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Mon Jul 31 09:29:00 2017
@@ -329,6 +329,7 @@ public:
 };
 } // namespace
 
+#ifndef NDEBUG
 static void printDebugLoc(const DebugLoc &DL, raw_ostream &CommentOS,
                           const LLVMContext &Ctx) {
   if (!DL)
@@ -350,7 +351,6 @@ static void printDebugLoc(const DebugLoc
   CommentOS << " ]";
 }
 
-#ifndef NDEBUG
 static void printExtendedName(raw_ostream &OS, const DILocalVariable *V,
                               const DILocation *DL) {
   const LLVMContext &Ctx = V->getContext();




More information about the llvm-commits mailing list