[polly] r211773 - Fix dangling reference
Andreas Simbuerger
simbuerg at fim.uni-passau.de
Thu Jun 26 04:09:13 PDT 2014
Author: simbuerg
Date: Thu Jun 26 06:09:13 2014
New Revision: 211773
URL: http://llvm.org/viewvc/llvm-project?rev=211773&view=rev
Log:
Fix dangling reference
Modified:
polly/trunk/include/polly/ScopDetectionDiagnostic.h
polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp
Modified: polly/trunk/include/polly/ScopDetectionDiagnostic.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetectionDiagnostic.h?rev=211773&r1=211772&r2=211773&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetectionDiagnostic.h (original)
+++ polly/trunk/include/polly/ScopDetectionDiagnostic.h Thu Jun 26 06:09:13 2014
@@ -126,6 +126,9 @@ class RejectReason {
private:
const RejectReasonKind Kind;
+protected:
+ static const DebugLoc Unknown;
+
public:
RejectReasonKind getKind() const { return Kind; }
Modified: polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp?rev=211773&r1=211772&r2=211773&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetectionDiagnostic.cpp Thu Jun 26 06:09:13 2014
@@ -118,10 +118,11 @@ void emitValidRemarks(const llvm::Functi
//===----------------------------------------------------------------------===//
// 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;
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list