Author: d0k
Date: Wed Jul  6 11:43:46 2011
New Revision: 134496

URL: http://llvm.org/viewvc/llvm-project?rev=134496&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Basic/SourceManager.cpp

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=134496&r1=134495&r2=134496&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Wed Jul  6 11:43:46 2011
@@ -917,7 +917,7 @@
 
   // 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);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to