forked from OSchip/llvm-project
This add a reset method for WinCOFFObjectWriter, like other MC* classes.
llvm-svn: 217907
This commit is contained in:
parent
53a80d3a46
commit
cca43c15b5
|
@ -113,6 +113,11 @@ public:
|
||||||
StringTable();
|
StringTable();
|
||||||
size_t size() const;
|
size_t size() const;
|
||||||
size_t insert(StringRef String);
|
size_t insert(StringRef String);
|
||||||
|
void clear() {
|
||||||
|
Map.clear();
|
||||||
|
Data.resize(4);
|
||||||
|
update_length();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class WinCOFFObjectWriter : public MCObjectWriter {
|
class WinCOFFObjectWriter : public MCObjectWriter {
|
||||||
|
@ -139,6 +144,17 @@ public:
|
||||||
bool UseBigObj;
|
bool UseBigObj;
|
||||||
|
|
||||||
WinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, raw_ostream &OS);
|
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 *createSymbol(StringRef Name);
|
||||||
COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);
|
COFFSymbol *GetOrCreateCOFFSymbol(const MCSymbol * Symbol);
|
||||||
|
|
Loading…
Reference in New Issue