From: Benjamin Kramer Date: Wed, 6 Jul 2011 16:43:46 +0000 (+0000) Subject: SmallVectorize a critical vector. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e855448bc8dddac24a72ba8dc7e936d31e896fe4;p=clang 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 --- 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 LineOffsets; + llvm::SmallVector LineOffsets; // Line #1 starts at char 0. LineOffsets.push_back(0);