diff options
author | Reid Kleckner <rnk@google.com> | 2016-08-26 17:58:37 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-08-26 17:58:37 +0000 |
commit | a5b1eef846e86010f82cff3d812dfd3fb3b99405 (patch) | |
tree | e4a033d53e4d252e662b9eba6face61cb8b0afcd /llvm/lib/MC/MCStreamer.cpp | |
parent | 8e8fa788214642200b0524a930122d40285e573f (diff) | |
download | bcm5719-llvm-a5b1eef846e86010f82cff3d812dfd3fb3b99405.tar.gz bcm5719-llvm-a5b1eef846e86010f82cff3d812dfd3fb3b99405.zip |
[MC] Move .cv_loc management logic out of MCContext
MCContext already has many tasks, and separating CodeView out from it is
probably a good idea. The .cv_loc tracking was modelled on the DWARF
tracking which lived directly in MCContext.
Removes the inclusion of MCCodeView.h from MCContext.h, so now there are
only 10 build actions while I hack on CodeView support instead of 265.
llvm-svn: 279847
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index cfe25f9299c..ca244126dcd 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/MC/MCAsmBackend.h" #include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCCodeView.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" @@ -215,16 +216,16 @@ void MCStreamer::EnsureValidDwarfFrame() { report_fatal_error("No open frame"); } -unsigned MCStreamer::EmitCVFileDirective(unsigned FileNo, StringRef Filename) { - return getContext().getCVFile(Filename, FileNo); +bool MCStreamer::EmitCVFileDirective(unsigned FileNo, StringRef Filename) { + return getContext().getCVContext().addFile(FileNo, Filename); } void MCStreamer::EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, unsigned Column, bool PrologueEnd, bool IsStmt, StringRef FileName) { - getContext().setCurrentCVLoc(FunctionId, FileNo, Line, Column, PrologueEnd, - IsStmt); + getContext().getCVContext().setCurrentCVLoc(FunctionId, FileNo, Line, Column, + PrologueEnd, IsStmt); } void MCStreamer::EmitCVLinetableDirective(unsigned FunctionId, |