aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend')
-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 43deaee8c1..774372c869 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);
}
}