summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectStreamer.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-02-02 19:22:34 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-02-02 19:22:34 +0000
commitc9911f28e5a8060a439aa475e0a95793b1b1e970 (patch)
tree1292f7b899d8f09ff4c194fea492b3b7ff8ecd6c /llvm/lib/MC/MCObjectStreamer.cpp
parente5737f7cacd925aabc3b0d079928d43a4dfdc4a3 (diff)
downloadbcm5719-llvm-c9911f28e5a8060a439aa475e0a95793b1b1e970.tar.gz
bcm5719-llvm-c9911f28e5a8060a439aa475e0a95793b1b1e970.zip
[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
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCObjectStreamer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index 4d849049f60..40c2e8dab9f 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -386,12 +386,13 @@ void MCObjectStreamer::EmitCVLinetableDirective(unsigned FunctionId,
void MCObjectStreamer::EmitCVInlineLinetableDirective(
unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum,
- const MCSymbol *FnStartSym, ArrayRef<unsigned> SecondaryFunctionIds) {
+ const MCSymbol *FnStartSym, const MCSymbol *FnEndSym,
+ ArrayRef<unsigned> SecondaryFunctionIds) {
getContext().getCVContext().emitInlineLineTableForFunction(
*this, PrimaryFunctionId, SourceFileId, SourceLineNum, FnStartSym,
- SecondaryFunctionIds);
+ FnEndSym, SecondaryFunctionIds);
this->MCStreamer::EmitCVInlineLinetableDirective(
- PrimaryFunctionId, SourceFileId, SourceLineNum, FnStartSym,
+ PrimaryFunctionId, SourceFileId, SourceLineNum, FnStartSym, FnEndSym,
SecondaryFunctionIds);
}
OpenPOWER on IntegriCloud