diff options
Diffstat (limited to 'polly/lib/Analysis/ScopDetectionDiagnostic.cpp')
-rw-r--r-- | polly/lib/Analysis/ScopDetectionDiagnostic.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp index c7d2b338797..f5b57f0fc83 100644 --- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp +++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp @@ -18,6 +18,7 @@ // //===----------------------------------------------------------------------===// #include "polly/ScopDetectionDiagnostic.h" +#include "polly/Support/ScopLocation.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/AliasSetTracker.h" @@ -60,29 +61,6 @@ template <typename T> std::string operator+(Twine LHS, const T &RHS) { return LHS.concat(Buf).str(); } - -void getDebugLocation(const Region *R, unsigned &LineBegin, unsigned &LineEnd, - std::string &FileName) { - LineBegin = -1; - LineEnd = 0; - - for (const BasicBlock *BB : R->blocks()) - for (const Instruction &Inst : *BB) { - DebugLoc DL = Inst.getDebugLoc(); - if (!DL) - continue; - - auto *Scope = cast<DIScope>(DL.getScope()); - - if (FileName.empty()) - FileName = Scope->getFilename(); - - unsigned NewLine = DL.getLine(); - - LineBegin = std::min(LineBegin, NewLine); - LineEnd = std::max(LineEnd, NewLine); - } -} } namespace llvm { |