diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-11-09 21:43:51 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-11-09 21:43:51 +0000 |
commit | db76357201e642654cccd7d81252b02ef8a253c7 (patch) | |
tree | 4736285cb73755b2c8b381999ee2916135679709 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 16da6c466f28b1b026194b972459d314153a746b (diff) | |
download | bcm5719-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.cpp | 5 |
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); |