aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorPedro Artigas <partigas@apple.com>2012-12-14 18:52:11 +0000
committerPedro Artigas <partigas@apple.com>2012-12-14 18:52:11 +0000
commit99cbdde6198623ff014c776743caec2cf48f4840 (patch)
tree37ba9f08c31167816c6ba44f76b8833601780ebf /lib/MC/MachObjectWriter.cpp
parenta5ed031fbcec67081d4857c9000f0180840fe2d5 (diff)
downloadexternal_llvm-99cbdde6198623ff014c776743caec2cf48f4840.zip
external_llvm-99cbdde6198623ff014c776743caec2cf48f4840.tar.gz
external_llvm-99cbdde6198623ff014c776743caec2cf48f4840.tar.bz2
Add more reset methods to make all objects that the backend may use for outputting code have a reset, some are not used but were declared for completeness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index cc8d2fb..0098bea 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/lib/MC/MachObjectWriter.cpp
@@ -27,6 +27,16 @@
using namespace llvm;
using namespace llvm::object;
+void MachObjectWriter::reset() {
+ Relocations.clear();
+ IndirectSymBase.clear();
+ StringTable.clear();
+ LocalSymbolData.clear();
+ ExternalSymbolData.clear();
+ UndefinedSymbolData.clear();
+ MCObjectWriter::reset();
+}
+
bool MachObjectWriter::
doesSymbolRequireExternRelocation(const MCSymbolData *SD) {
// Undefined symbols are always extern.