This add a reset method for WinCOFFObjectWriter, like other MC* classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217907 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Yaron Keren 2014-09-16 21:31:04 +00:00
parent a0b4148700
commit ca7da16ca0

View File

@ -113,6 +113,11 @@ public:
StringTable();
size_t size() const;
size_t insert(StringRef String);
void clear() {
Map.clear();
Data.resize(4);
update_length();
}
};
class WinCOFFObjectWriter : public MCObjectWriter {
@ -139,6 +144,17 @@ public:
bool UseBigObj;
WinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS);
void reset() override {
memset(&Header, 0, sizeof(Header));
Header.Machine = TargetObjectWriter->getMachine();
Sections.clear();
Symbols.clear();
Strings.clear();
SectionMap.clear();
SymbolMap.clear();
MCObjectWriter::reset();
}
COFFSymbol *createSymbol(StringRef Name);
COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);