mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Fix an ENABLE_EXPENSIVE_CHECKS error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18f54c07e1
commit
6f69aa3561
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user