diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-06 16:43:46 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-06 16:43:46 +0000 |
commit | e855448bc8dddac24a72ba8dc7e936d31e896fe4 (patch) | |
tree | 247a69311760369c1f26f3b845b72ab7e50bb594 /lib/Basic/SourceManager.cpp | |
parent | 39c411fa229b2a6747b92f945d1702ee674d3470 (diff) | |
download | clang-e855448bc8dddac24a72ba8dc7e936d31e896fe4.tar.gz |
SmallVectorize a critical vector.
The small number of elements was determined by taking the median
file length in clang+llvm and /usr/include on OS X with xcode installed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 92557a421f..de709de9a2 100644 --- a/lib/Basic/SourceManager.cpp +++ b/lib/Basic/SourceManager.cpp @@ -917,7 +917,7 @@ static void ComputeLineNumbers(Diagnostic &Diag, ContentCache *FI, // Find the file offsets of all of the *physical* source lines. This does // not look at trigraphs, escaped newlines, or anything else tricky. - std::vector<unsigned> LineOffsets; + llvm::SmallVector<unsigned, 256> LineOffsets; // Line #1 starts at char 0. LineOffsets.push_back(0); |