diff options
author | Eli Bendersky <eliben@google.com> | 2012-12-05 22:11:02 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2012-12-05 22:11:02 +0000 |
commit | 5c10f509f45820d1198bfb975840e93a782745ac (patch) | |
tree | d035334f74255b1ca2cab584303873c0cafcc44f /include/llvm/MC/MCAssembler.h | |
parent | 5807fd41a79357b9a9e75c4a4154b1da89d06c78 (diff) |
Change std::vector to SmallVector<4> and remove some unused methods.
This is more consistent with other vectors in this code. In addition, I ran some
tests compiling a large program and >96% of fragments have 4 or less fixups, so
SmallVector<4> is a good optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 057faac91a..266e0c7f48 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -107,11 +107,11 @@ class MCDataFragment : public MCFragment { SmallString<32> Contents; /// Fixups - The list of fixups in this fragment. - std::vector<MCFixup> Fixups; + SmallVector<MCFixup, 4> Fixups; public: - typedef std::vector<MCFixup>::const_iterator const_fixup_iterator; - typedef std::vector<MCFixup>::iterator fixup_iterator; + typedef SmallVectorImpl<MCFixup>::const_iterator const_fixup_iterator; + typedef SmallVectorImpl<MCFixup>::iterator fixup_iterator; public: MCDataFragment(MCSectionData *SD = 0) : MCFragment(FT_Data, SD) {} @@ -133,9 +133,6 @@ public: Fixups.push_back(Fixup); } - std::vector<MCFixup> &getFixups() { return Fixups; } - const std::vector<MCFixup> &getFixups() const { return Fixups; } - fixup_iterator fixup_begin() { return Fixups.begin(); } const_fixup_iterator fixup_begin() const { return Fixups.begin(); } |