diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-01 14:34:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-06-01 14:34:40 +0000 |
commit | 499c99c2296d85617f274cca1ec53cc5e6367345 (patch) | |
tree | eff33331aff092f712eff61f1f7feeba234a30af /llvm/lib/MC/MCAssembler.cpp | |
parent | f6289f24f7fb806b598151a812a4cc4985405723 (diff) | |
download | llvm-499c99c2296d85617f274cca1ec53cc5e6367345.zip llvm-499c99c2296d85617f274cca1ec53cc5e6367345.tar.gz llvm-499c99c2296d85617f274cca1ec53cc5e6367345.tar.bz2 |
The fragment implies the section, don't store both.
This reduces MCSymbol from 64 to 56 bytes on x86_64.
llvm-svn: 238747
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 7f09e74..087caae 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -579,6 +579,16 @@ static void writeFragmentContents(const MCFragment &F, MCObjectWriter *OW) { OW->WriteBytes(EF.getContents()); } +void MCAssembler::registerSymbol(const MCSymbol &Symbol, bool *Created) { + bool New = !Symbol.isRegistered(); + if (Created) + *Created = New; + if (New) { + Symbol.setIsRegistered(true); + Symbols.push_back(&Symbol); + } +} + void MCAssembler::writeFragmentPadding(const MCFragment &F, uint64_t FSize, MCObjectWriter *OW) const { // Should NOP padding be written out before this fragment? |