Skip to content

Commit

Permalink
Add NDEBUG markers around debug only function.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205706 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Apr 7, 2014
1 parent c75aecc commit 231ed9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ static void setDebugLocFromInst(IRBuilder<> &B, const Value *Ptr) {
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>
Expand All @@ -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
Expand Down

0 comments on commit 231ed9d

Please sign in to comment.