[llvm] r205706 - Add NDEBUG markers around debug only function.

Eric Christopher echristo at gmail.com
Mon Apr 7 05:46:30 PDT 2014


Author: echristo
Date: Mon Apr  7 07:46:30 2014
New Revision: 205706

URL: http://llvm.org/viewvc/llvm-project?rev=205706&view=rev
Log:
Add NDEBUG markers around debug only function.

Modified:
    llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp

Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=205706&r1=205705&r2=205706&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Mon Apr  7 07:46:30 2014
@@ -470,6 +470,8 @@ static void setDebugLocFromInst(IRBuilde
   else
     B.SetCurrentDebugLocation(DebugLoc());
 }
+
+#ifndef NDEBUG
 /// \return string containing a file name and a line # for the given
 /// instruction.
 static format_object3<const char *, const char *, unsigned>
@@ -489,6 +491,8 @@ getDebugLocString(const Instruction *I)
   const char *FileName = Loc.getFilename().data();
   return format("%s/%s:%u", DirName, FileName, LineNo);
 }
+#endif
+
 /// LoopVectorizationLegality checks if it is legal to vectorize a loop, and
 /// to what vectorization factor.
 /// This class does not look at the profitability of vectorization, only the





More information about the llvm-commits mailing list