diff options
| author | Adrian Prantl <aprantl@apple.com> | 2014-01-07 22:05:52 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2014-01-07 22:05:52 +0000 |
| commit | da45f59bdf398efea71e0b6596ebf2b65d8549dc (patch) | |
| tree | b5d0598a10f64970ccf5aff3cfda3208e08f8f8e /lib/CodeGen | |
| parent | b9b5b2ce07cfddd64e7e2cd06353cc9f4a566ede (diff) | |
| download | clang-da45f59bdf398efea71e0b6596ebf2b65d8549dc.tar.gz clang-da45f59bdf398efea71e0b6596ebf2b65d8549dc.tar.bz2 clang-da45f59bdf398efea71e0b6596ebf2b65d8549dc.tar.xz | |
Revert "Debug info: Ensure that the last stop point in a function is still within"
This reverts commit r198461.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 5 | ||||
| -rw-r--r-- | lib/CodeGen/CGDebugInfo.h | 8 | ||||
| -rw-r--r-- | lib/CodeGen/CGStmt.cpp | 2 | ||||
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 7 | ||||
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 2 |
5 files changed, 8 insertions, 16 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 3138d82fb8..2977ed2223 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2537,8 +2537,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, QualType FnType, /// information in the source file. If the location is invalid, the /// previous location will be reused. void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc, - bool ForceColumnInfo, - llvm::MDNode *ForceScope) { + bool ForceColumnInfo) { // Update our current location setLocation(Loc); @@ -2557,7 +2556,7 @@ void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc, // Update last state. PrevLoc = CurLoc; - llvm::MDNode *Scope = ForceScope ? ForceScope : &*LexicalBlockStack.back(); + llvm::MDNode *Scope = LexicalBlockStack.back(); Builder.SetCurrentDebugLocation(llvm::DebugLoc::get (getLineNumber(CurLoc), getColumnNumber(CurLoc, ForceColumnInfo), diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index ac31bdf3f5..0ca274f568 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -211,17 +211,11 @@ public: /// getLocation - Return the current source location. SourceLocation getLocation() const { return CurLoc; } - /// getScope() - Return the current scope. - llvm::MDNode *getScope() const { return LexicalBlockStack.back(); } - /// EmitLocation - Emit metadata to indicate a change in line/column /// information in the source file. /// \param ForceColumnInfo Assume DebugColumnInfo option is true. - /// \param ForceScope Force the location to be in a specific lexical - /// scope rather than the top of LexicalBlockStack. void EmitLocation(CGBuilderTy &Builder, SourceLocation Loc, - bool ForceColumnInfo = false, - llvm::MDNode *ForceScope = 0); + bool ForceColumnInfo = false); /// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate /// start of a new function. diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 50882c8536..b18ff09015 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -37,7 +37,7 @@ void CodeGenFunction::EmitStopPoint(const Stmt *S) { Loc = S->getLocStart(); DI->EmitLocation(Builder, Loc); - LastStopPoint = std::make_pair(Loc, DI->getScope()); + LastStopPoint = Loc; } } diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index fb668e4a16..c1e522d0d7 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -209,10 +209,9 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { // all will be fine. if (CGDebugInfo *DI = getDebugInfo()) { if (OnlySimpleReturnStmts) - DI->EmitLocation(Builder, LastStopPoint.first, - false, LastStopPoint.second); + DI->EmitLocation(Builder, LastStopPoint); else - DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second); + DI->EmitLocation(Builder, EndLoc); } // Pop any cleanups that might have been associated with the @@ -229,7 +228,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { if (CGDebugInfo *DI = getDebugInfo()) if (OnlySimpleReturnStmts) - DI->EmitLocation(Builder, EndLoc, false, LastStopPoint.second); + DI->EmitLocation(Builder, EndLoc); } // Emit function epilog (to return). diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index c11f2c9172..37bbcf3f34 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -877,7 +877,7 @@ private: unsigned NumSimpleReturnExprs; /// The last regular (non-return) debug location (breakpoint) in the function. - std::pair<SourceLocation, llvm::MDNode*> LastStopPoint; + SourceLocation LastStopPoint; public: /// A scope within which we are constructing the fields of an object which |
