Move getNumFrameInfos and getDwarfFrameInfos out of line and remove

the MCDwarf.h include.

This removes 50 transitive dependencies for a modification of
MCDwarf.h in a build of llc for a pair of out of line functions
and reduces the build overhead of 'touch MCDwarf.h" by 15% without
impacting test time of check-llvm.

llvm-svn: 358264
This commit is contained in:
Eric Christopher 2019-04-12 07:42:35 +00:00
parent b7a05e858c
commit 8069cc51d6
2 changed files with 8 additions and 5 deletions

View File

@ -19,7 +19,6 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/MC/MCDirectives.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCLinkerOptimizationHint.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCWinEH.h"
@ -43,6 +42,7 @@ class MCAsmBackend;
class MCCodeEmitter;
struct MCCodePaddingContext;
class MCContext;
struct MCDwarfFrameInfo;
class MCExpr;
class MCInst;
class MCInstPrinter;
@ -266,10 +266,8 @@ public:
/// closed. Otherwise, issue an error and return null.
WinEH::FrameInfo *EnsureValidWinFrameInfo(SMLoc Loc);
unsigned getNumFrameInfos() { return DwarfFrameInfos.size(); }
ArrayRef<MCDwarfFrameInfo> getDwarfFrameInfos() const {
return DwarfFrameInfos;
}
unsigned getNumFrameInfos();
ArrayRef<MCDwarfFrameInfo> getDwarfFrameInfos() const;
bool hasUnfinishedDwarfFrameInfo();

View File

@ -107,6 +107,11 @@ raw_ostream &MCStreamer::GetCommentOS() {
return nulls();
}
unsigned MCStreamer::getNumFrameInfos() { return DwarfFrameInfos.size(); }
ArrayRef<MCDwarfFrameInfo> MCStreamer::getDwarfFrameInfos() const {
return DwarfFrameInfos;
}
void MCStreamer::emitRawComment(const Twine &T, bool TabPrefix) {}
void MCStreamer::addExplicitComment(const Twine &T) {}