aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-05 17:18:09 +0000
commit8f57cb0305232cb53fff00ef151ca716766f3437 (patch)
tree8b316eca843681b024034db1125707173b9adb4a /lib/Lex/Preprocessor.cpp
parent51fb8b013e7734b795139f49d3b1f77c539be20a (diff)
downloadsrc-8f57cb0305232cb53fff00ef151ca716766f3437.tar.gz
src-8f57cb0305232cb53fff00ef151ca716766f3437.zip
Update clang to r86140.
Notes
Notes: svn path=/vendor/clang/dist/; revision=198954
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 7f3afc60764c..487b9d63c169 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -43,8 +43,6 @@ using namespace clang;
//===----------------------------------------------------------------------===//
-PreprocessorFactory::~PreprocessorFactory() {}
-
Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts,
TargetInfo &target, SourceManager &SM,
HeaderSearch &Headers,
@@ -403,7 +401,7 @@ void Preprocessor::EnterMainSourceFile() {
/// LookUpIdentifierInfo - Given a tok::identifier token, look up the
/// identifier information for the token and install it into the token.
IdentifierInfo *Preprocessor::LookUpIdentifierInfo(Token &Identifier,
- const char *BufPtr) {
+ const char *BufPtr) const {
assert(Identifier.is(tok::identifier) && "Not an identifier!");
assert(Identifier.getIdentifierInfo() == 0 && "Identinfo already exists!");
@@ -411,14 +409,14 @@ IdentifierInfo *Preprocessor::LookUpIdentifierInfo(Token &Identifier,
IdentifierInfo *II;
if (BufPtr && !Identifier.needsCleaning()) {
// No cleaning needed, just use the characters from the lexed buffer.
- II = getIdentifierInfo(BufPtr, BufPtr+Identifier.getLength());
+ II = getIdentifierInfo(llvm::StringRef(BufPtr, Identifier.getLength()));
} else {
// Cleaning needed, alloca a buffer, clean into it, then use the buffer.
llvm::SmallVector<char, 64> IdentifierBuffer;
IdentifierBuffer.resize(Identifier.getLength());
const char *TmpBuf = &IdentifierBuffer[0];
unsigned Size = getSpelling(Identifier, TmpBuf);
- II = getIdentifierInfo(TmpBuf, TmpBuf+Size);
+ II = getIdentifierInfo(llvm::StringRef(TmpBuf, Size));
}
Identifier.setIdentifierInfo(II);
return II;