aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-02-27 17:05:45 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-02-27 17:05:45 +0000
commit51f5fe3f2527cd1640d798d8d134268b14de3e86 (patch)
tree3ae17f584a97a95f6fef87c02e373a63ce6cd740 /include/clang/Lex/Preprocessor.h
parent3504475548ce6aab989553c2a38391a34fc7fddc (diff)
Move method out-of-line. I thought this would be a candidate for inlining but I was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 1ae0a7ea3f..db9c884662 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -574,19 +574,7 @@ public:
/// SmallVector. Note that the returned StringRef may not point to the
/// supplied buffer if a copy can be avoided.
llvm::StringRef getSpelling(const Token &Tok,
- llvm::SmallVectorImpl<char> &Buffer) const {
- // Try the fast path.
- if (const IdentifierInfo *II = Tok.getIdentifierInfo())
- return II->getName();
-
- // Resize the buffer if we need to copy into it.
- if (Tok.needsCleaning())
- Buffer.resize(Tok.getLength());
-
- const char *Ptr = Buffer.data();
- unsigned Len = getSpelling(Tok, Ptr);
- return llvm::StringRef(Ptr, Len);
- }
+ llvm::SmallVectorImpl<char> &Buffer) const;
/// getSpellingOfSingleCharacterNumericConstant - Tok is a numeric constant
/// with length 1, return the character.