diff options
author | Reid Kleckner <rnk@google.com> | 2018-08-28 23:25:59 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-08-28 23:25:59 +0000 |
commit | 689f7733173c4a7757f10bc7442905c18274f288 (patch) | |
tree | 7525f8a1cd9fea7b4f9e41b69ce027e4c4535240 /llvm/lib/MC/MCAsmStreamer.cpp | |
parent | 35818e27894db154a9c884cb4d203dc84684ef59 (diff) | |
download | bcm5719-llvm-689f7733173c4a7757f10bc7442905c18274f288.tar.gz bcm5719-llvm-689f7733173c4a7757f10bc7442905c18274f288.zip |
[codeview] Clean up machinery for deferring .cv_loc emission
Now that we create the label at the point of the directive, we don't
need to set the "current CV location", and then later when we emit the
next instruction, create a label for it and emit it.
DWARF still defers the labels used in .debug_loc until the next
instruction or value, for reasons unknown.
llvm-svn: 340883
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index ae02f50bf8b..c4744ac5d51 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1298,20 +1298,17 @@ void MCAsmStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName, SMLoc Loc) { + // Validate the directive. + if (!checkCVLocSection(FunctionId, FileNo, Loc)) + return; + OS << "\t.cv_loc\t" << FunctionId << " " << FileNo << " " << Line << " " << Column; if (PrologueEnd) OS << " prologue_end"; - unsigned OldIsStmt = getContext().getCVContext().getCurrentCVLoc().isStmt(); - if (IsStmt != OldIsStmt) { - OS << " is_stmt "; - - if (IsStmt) - OS << "1"; - else - OS << "0"; - } + if (IsStmt) + OS << " is_stmt 1"; if (IsVerboseAsm) { OS.PadToColumn(MAI->getCommentColumn()); @@ -1319,8 +1316,6 @@ void MCAsmStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, << Column; } EmitEOL(); - this->MCStreamer::EmitCVLocDirective(FunctionId, FileNo, Line, Column, - PrologueEnd, IsStmt, FileName, Loc); } void MCAsmStreamer::EmitCVLinetableDirective(unsigned FunctionId, |