diff options
author | Owen Anderson <resistor@mac.com> | 2008-06-24 21:44:59 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-06-24 21:44:59 +0000 |
commit | 230b3eb80cc97293708852eb6c8c70250f94c146 (patch) | |
tree | d06bfe8ecbbcf20e86fdce6c5e1fcccfcada1c0e /llvm/lib/CodeGen/DwarfWriter.cpp | |
parent | 04c8bd7e115fc9b4e53f3fd115142b27754aa820 (diff) | |
download | bcm5719-llvm-230b3eb80cc97293708852eb6c8c70250f94c146.tar.gz bcm5719-llvm-230b3eb80cc97293708852eb6c8c70250f94c146.zip |
Use SmallVector instead of std::vector for a minor compile time improvement.
llvm-svn: 52689
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 086786bcab3..cc5cf4d89ad 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -140,7 +140,7 @@ private: /// Data - Raw data bytes for abbreviation. /// - std::vector<DIEAbbrevData> Data; + SmallVector<DIEAbbrevData, 8> Data; public: @@ -155,7 +155,7 @@ public: unsigned getTag() const { return Tag; } unsigned getNumber() const { return Number; } unsigned getChildrenFlag() const { return ChildrenFlag; } - const std::vector<DIEAbbrevData> &getData() const { return Data; } + const SmallVector<DIEAbbrevData, 8> &getData() const { return Data; } void setTag(unsigned T) { Tag = T; } void setChildrenFlag(unsigned CF) { ChildrenFlag = CF; } void setNumber(unsigned N) { Number = N; } @@ -219,7 +219,7 @@ protected: /// Attributes values. /// - std::vector<DIEValue *> Values; + SmallVector<DIEValue*, 32> Values; public: explicit DIE(unsigned Tag) @@ -240,7 +240,7 @@ public: unsigned getOffset() const { return Offset; } unsigned getSize() const { return Size; } const std::vector<DIE *> &getChildren() const { return Children; } - std::vector<DIEValue *> &getValues() { return Values; } + SmallVector<DIEValue*, 32> &getValues() { return Values; } void setTag(unsigned Tag) { Abbrev.setTag(Tag); } void setOffset(unsigned O) { Offset = O; } void setSize(unsigned S) { Size = S; } @@ -2081,8 +2081,8 @@ private: ":0x" + utohexstr(Die->getSize()) + " " + TagString(Abbrev->getTag()))); - std::vector<DIEValue *> &Values = Die->getValues(); - const std::vector<DIEAbbrevData> &AbbrevData = Abbrev->getData(); + SmallVector<DIEValue*, 32> &Values = Die->getValues(); + const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev->getData(); // Emit the DIE attribute values. for (unsigned i = 0, N = Values.size(); i < N; ++i) { @@ -2139,8 +2139,8 @@ private: // Start the size with the size of abbreviation code. Offset += Asm->SizeULEB128(AbbrevNumber); - const std::vector<DIEValue *> &Values = Die->getValues(); - const std::vector<DIEAbbrevData> &AbbrevData = Abbrev->getData(); + const SmallVector<DIEValue*, 32> &Values = Die->getValues(); + const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev->getData(); // Size the DIE attribute values. for (unsigned i = 0, N = Values.size(); i < N; ++i) { @@ -3726,7 +3726,7 @@ void DIEntry::EmitValue(DwarfDebug &DD, unsigned Form) { /// unsigned DIEBlock::ComputeSize(DwarfDebug &DD) { if (!Size) { - const std::vector<DIEAbbrevData> &AbbrevData = Abbrev.getData(); + const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev.getData(); for (unsigned i = 0, N = Values.size(); i < N; ++i) { Size += Values[i]->SizeOf(DD, AbbrevData[i].getForm()); @@ -3746,7 +3746,7 @@ void DIEBlock::EmitValue(DwarfDebug &DD, unsigned Form) { default: assert(0 && "Improper form for block"); break; } - const std::vector<DIEAbbrevData> &AbbrevData = Abbrev.getData(); + const SmallVector<DIEAbbrevData, 8> &AbbrevData = Abbrev.getData(); for (unsigned i = 0, N = Values.size(); i < N; ++i) { DD.getAsm()->EOL(); @@ -3819,7 +3819,7 @@ void DIE::print(std::ostream &O, unsigned IncIndent) { } O << "\n"; - const std::vector<DIEAbbrevData> &Data = Abbrev.getData(); + const SmallVector<DIEAbbrevData, 8> &Data = Abbrev.getData(); IndentCount += 2; for (unsigned i = 0, N = Data.size(); i < N; ++i) { |