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/MCCodeView.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/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 65cff41abeb..b955511a4a7 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -442,7 +442,8 @@ void CodeViewContext::encodeDefRange(MCAsmLayout &Layout, // a line entry made for it is made. // void MCCVLineEntry::Make(MCObjectStreamer *MCOS) { - if (!MCOS->getContext().getCVLocSeen()) + CodeViewContext &CVC = MCOS->getContext().getCVContext(); + if (!CVC.getCVLocSeen()) return; // Create a symbol at in the current section for use in the line entry. @@ -451,14 +452,14 @@ void MCCVLineEntry::Make(MCObjectStreamer *MCOS) { MCOS->EmitLabel(LineSym); // Get the current .loc info saved in the context. - const MCCVLoc &CVLoc = MCOS->getContext().getCurrentCVLoc(); + const MCCVLoc &CVLoc = CVC.getCurrentCVLoc(); // Create a (local) line entry with the symbol and the current .loc info. MCCVLineEntry LineEntry(LineSym, CVLoc); // clear CVLocSeen saying the current .loc info is now used. - MCOS->getContext().clearCVLocSeen(); + CVC.clearCVLocSeen(); // Add the line entry to this section's entries. - MCOS->getContext().getCVContext().addLineEntry(LineEntry); + CVC.addLineEntry(LineEntry); } |