diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 01:21:22 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 01:21:22 +0000 |
commit | 6f69aa356136ada3d414d04cfab4341e87b63165 (patch) | |
tree | ba99e8755bad0903ebc6daa21a79434293e3db60 /utils/FileCheck | |
parent | 18f54c07e13837fe36531f4a6fe02ca9fd10ebf3 (diff) |
Fix an ENABLE_EXPENSIVE_CHECKS error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/FileCheck')
-rw-r--r-- | utils/FileCheck/FileCheck.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp index ac203bd517..45ce610469 100644 --- a/utils/FileCheck/FileCheck.cpp +++ b/utils/FileCheck/FileCheck.cpp @@ -153,7 +153,7 @@ static void CanonicalizeCheckStrings(std::vector<std::pair<std::string, SMLoc> > /// 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 @@ static MemoryBuffer *CanonicalizeInputFile(MemoryBuffer *MB) { // 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; |