summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polly/include/polly/ScopDetectionDiagnostic.h3
-rw-r--r--polly/lib/Analysis/ScopDetectionDiagnostic.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/polly/include/polly/ScopDetectionDiagnostic.h b/polly/include/polly/ScopDetectionDiagnostic.h
index f7f826bfb82..90cd7f2e99c 100644
--- a/polly/include/polly/ScopDetectionDiagnostic.h
+++ b/polly/include/polly/ScopDetectionDiagnostic.h
@@ -126,6 +126,9 @@ class RejectReason {
private:
const RejectReasonKind Kind;
+protected:
+ static const DebugLoc Unknown;
+
public:
RejectReasonKind getKind() const { return Kind; }
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
index 8fde51aff2f..584f4a43299 100644
--- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
+++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
@@ -118,10 +118,11 @@ void emitValidRemarks(const llvm::Function &F, const Region *R) {
//===----------------------------------------------------------------------===//
// RejectReason.
+const DebugLoc RejectReason::Unknown = DebugLoc();
const llvm::DebugLoc &RejectReason::getDebugLoc() const {
// Allocate an empty DebugLoc and return it a reference to it.
- return *(std::make_shared<DebugLoc>().get());
+ return Unknown;
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud