summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
diff options
context:
space:
mode:
authorDavid Stenberg <david.stenberg@ericsson.com>2019-10-15 09:21:09 +0000
committerDavid Stenberg <david.stenberg@ericsson.com>2019-10-15 09:21:09 +0000
commitd46ac44ecdc82ac42510e1ce2b9cd90ee2fa7faa (patch)
tree46943712f099db520681cd4f41f0caadf7fa7216 /llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
parentf7c213c9c43cba30fb22edde29ccbd19131660e4 (diff)
downloadbcm5719-llvm-d46ac44ecdc82ac42510e1ce2b9cd90ee2fa7faa.tar.gz
bcm5719-llvm-d46ac44ecdc82ac42510e1ce2b9cd90ee2fa7faa.zip
Change Comments SmallVector to std::vector in DebugLocStream [NFC]
This changes the 32-element SmallVector to a std::vector. When building a RelWithDebInfo clang-8 binary, the average size of the vector was ~10000, so it does not seem very beneficial or practical to use a small vector for that. The DWARFBytes SmallVector grows in the same way as Comments, so perhaps that also should be changed to a purely dynamically allocated structure, but that requires some more code changes, so I let that remain as a SmallVector for now. llvm-svn: 374871
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
index a062baf7698..4ee277a7674 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
@@ -48,7 +48,7 @@ private:
SmallVector<List, 4> Lists;
SmallVector<Entry, 32> Entries;
SmallString<256> DWARFBytes;
- SmallVector<std::string, 32> Comments;
+ std::vector<std::string> Comments;
/// Only verbose textual output needs comments. This will be set to
/// true for that case, and false otherwise.
OpenPOWER on IntegriCloud