From c9911f28e5a8060a439aa475e0a95793b1b1e970 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 2 Feb 2016 19:22:34 +0000 Subject: [codeview] Correctly handle inlining functions post-dominated by unreachable CodeView requires us to accurately describe the extent of the inlined code. We did this by grabbing the next debug location in source order and using *that* to denote where we stopped inlining. However, this is not sufficient or correct in instances where there is no next debug location or the next debug location belongs to the start of another function. To get this correct, use the end symbol of the function to denote the last possible place the inlining could have stopped at. llvm-svn: 259548 --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index de12fc3..7bded31 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -345,7 +345,7 @@ void CodeViewDebug::emitInlinedCallSite(const FunctionInfo &FI, collectInlineSiteChildren(SecondaryFuncIds, FI, Site); OS.EmitCVInlineLinetableDirective(Site.SiteFuncId, FileId, StartLineNum, - FI.Begin, SecondaryFuncIds); + FI.Begin, FI.End, SecondaryFuncIds); OS.EmitLabel(InlineEnd); -- cgit v1.1