diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:52:58 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:52:58 +0000 |
commit | 5f970ec96e421f64db6b1c6509a902ea73d98cc7 (patch) | |
tree | 0dd020f28a4846707f8d60717d9b2921ea187bd8 /utils/FileCheck/FileCheck.cpp | |
parent | 62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a (diff) | |
download | FreeBSD-src-5f970ec96e421f64db6b1c6509a902ea73d98cc7.zip FreeBSD-src-5f970ec96e421f64db6b1c6509a902ea73d98cc7.tar.gz |
Update LLVM to r100520.
Diffstat (limited to 'utils/FileCheck/FileCheck.cpp')
-rw-r--r-- | utils/FileCheck/FileCheck.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp index c6a1392..e7cd713 100644 --- a/utils/FileCheck/FileCheck.cpp +++ b/utils/FileCheck/FileCheck.cpp @@ -441,7 +441,7 @@ struct CheckString { /// CanonicalizeInputFile - Remove duplicate horizontal space from the specified /// memory buffer, free it, and return a new one. static MemoryBuffer *CanonicalizeInputFile(MemoryBuffer *MB) { - SmallVector<char, 16> NewFile; + SmallString<128> NewFile; NewFile.reserve(MB->getBufferSize()); for (const char *Ptr = MB->getBufferStart(), *End = MB->getBufferEnd(); @@ -461,9 +461,7 @@ static MemoryBuffer *CanonicalizeInputFile(MemoryBuffer *MB) { // Free the old buffer and return a new one. MemoryBuffer *MB2 = - MemoryBuffer::getMemBufferCopy(NewFile.data(), - NewFile.data() + NewFile.size(), - MB->getBufferIdentifier()); + MemoryBuffer::getMemBufferCopy(NewFile.str(), MB->getBufferIdentifier()); delete MB; return MB2; |