summaryrefslogtreecommitdiff
path: root/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-03-03 17:28:16 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-03-03 17:28:16 +0000
commit79ade4e028932fcb9dab15e2fb2305ca15ab0f14 (patch)
treee1a885aadfd80632f5bd70d4bd2d37e715e35a79 /lib/Frontend/PrintPreprocessedOutput.cpp
parentecb7e5c8afe929ee38155db94de6b084ec32a645 (diff)
Notes
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 43deaee8c1db..774372c86934 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -67,12 +67,7 @@ static void PrintMacroDefinition(const IdentifierInfo &II, const MacroInfo &MI,
if (I->hasLeadingSpace())
OS << ' ';
- // Make sure we have enough space in the spelling buffer.
- if (I->getLength() > SpellingBuffer.size())
- SpellingBuffer.resize(I->getLength());
- const char *Buffer = SpellingBuffer.data();
- unsigned SpellingLen = PP.getSpelling(*I, Buffer);
- OS.write(Buffer, SpellingLen);
+ OS << PP.getSpelling(*I, SpellingBuffer);
}
}