diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-07-04 22:33:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-07-04 22:33:12 +0000 |
| commit | ef9eae1c444ae1ecd7a5dd5d9e937d420343b3e1 (patch) | |
| tree | 20b5b7f5a4c6fe6334a2e993f6a289b9b5a34a7a /clang/Lex/Lexer.cpp | |
| parent | a3f827e0a613320478ca23b1aaf2e90c56fe7714 (diff) | |
| download | bcm5719-llvm-ef9eae1c444ae1ecd7a5dd5d9e937d420343b3e1.tar.gz bcm5719-llvm-ef9eae1c444ae1ecd7a5dd5d9e937d420343b3e1.zip | |
Change the Preprocessor::getSpelling interface to let it be zero-copy in
the common case.
llvm-svn: 38671
Diffstat (limited to 'clang/Lex/Lexer.cpp')
| -rw-r--r-- | clang/Lex/Lexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp index 325c013cdee..d54ecf0fbe7 100644 --- a/clang/Lex/Lexer.cpp +++ b/clang/Lex/Lexer.cpp @@ -360,7 +360,7 @@ FinishIdentifier: II = PP.getIdentifierInfo(IdStart, IdEnd); } else { // Cleaning needed, alloca a buffer, clean into it, then use the buffer. - char *TmpBuf = (char*)alloca(Result.getLength()); + const char *TmpBuf = (char*)alloca(Result.getLength()); unsigned Size = PP.getSpelling(Result, TmpBuf); II = PP.getIdentifierInfo(TmpBuf, TmpBuf+Size); } |

