[llvm-commits] [llvm] r77845 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
Daniel Dunbar
daniel at zuster.org
Sat Aug 1 18:21:22 PDT 2009
Author: ddunbar
Date: Sat Aug 1 20:21:22 2009
New Revision: 77845
URL: http://llvm.org/viewvc/llvm-project?rev=77845&view=rev
Log:
Fix an ENABLE_EXPENSIVE_CHECKS error.
Modified:
llvm/trunk/utils/FileCheck/FileCheck.cpp
Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=77845&r1=77844&r2=77845&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Sat Aug 1 20:21:22 2009
@@ -153,7 +153,7 @@
/// CanonicalizeInputFile - Remove duplicate horizontal space from the specified
/// memory buffer, free it, and return a new one.
static MemoryBuffer *CanonicalizeInputFile(MemoryBuffer *MB) {
- std::vector<char> NewFile;
+ SmallVector<char, 16> NewFile;
NewFile.reserve(MB->getBufferSize());
for (const char *Ptr = MB->getBufferStart(), *End = MB->getBufferEnd();
@@ -173,7 +173,8 @@
// Free the old buffer and return a new one.
MemoryBuffer *MB2 =
- MemoryBuffer::getMemBufferCopy(&NewFile[0], &NewFile[0]+NewFile.size(),
+ MemoryBuffer::getMemBufferCopy(NewFile.data(),
+ NewFile.data() + NewFile.size(),
MB->getBufferIdentifier());
delete MB;
More information about the llvm-commits
mailing list