summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-11-09 21:43:51 +0000
committerAdrian Prantl <aprantl@apple.com>2016-11-09 21:43:51 +0000
commitdb76357201e642654cccd7d81252b02ef8a253c7 (patch)
tree4736285cb73755b2c8b381999ee2916135679709 /clang/lib/CodeGen/CGDebugInfo.cpp
parent16da6c466f28b1b026194b972459d314153a746b (diff)
downloadbcm5719-llvm-db76357201e642654cccd7d81252b02ef8a253c7.tar.gz
bcm5719-llvm-db76357201e642654cccd7d81252b02ef8a253c7.zip
Use an artificial debug location for non-virtual thunks.
Thunks are artificial and have no corresponding source location except for the line number on the DISubprogram, which is marked as artificial. <rdar://problem/11941095> llvm-svn: 286400
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index c4e7ffdd54e..ef4fb06c183 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -3032,9 +3032,8 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
if (!HasDecl || D->isImplicit()) {
Flags |= llvm::DINode::FlagArtificial;
- // Artificial functions without a location should not silently reuse CurLoc.
- if (Loc.isInvalid())
- CurLoc = SourceLocation();
+ // Artificial functions should not silently reuse CurLoc.
+ CurLoc = SourceLocation();
}
unsigned LineNo = getLineNumber(Loc);
unsigned ScopeLine = getLineNumber(ScopeLoc);
OpenPOWER on IntegriCloud