OSDN Git Service

Extend ifndef to printDebugLoc.
authorFlorian Hahn <florian.hahn@arm.com>
Mon, 31 Jul 2017 16:29:00 +0000 (16:29 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Mon, 31 Jul 2017 16:29:00 +0000 (16:29 +0000)
GCC7 did not warn about that, but Clang does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309573 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveDebugVariables.cpp

index a974dc2..1dce1b3 100644 (file)
@@ -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 &DL, raw_ostream &CommentOS,
   CommentOS << " ]";
 }
 
-#ifndef NDEBUG
 static void printExtendedName(raw_ostream &OS, const DILocalVariable *V,
                               const DILocation *DL) {
   const LLVMContext &Ctx = V->getContext();