diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-17 06:31:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-17 06:31:48 +0000 |
commit | 48cf9824fbad42995f4d91d59d08d2620effd683 (patch) | |
tree | 8be476c8eaab89780017337dcd1cef5ed2e2d1fa /include/clang/Lex/Preprocessor.h | |
parent | 91f54ce93bec136fb9e18740b895cf1c1339524b (diff) |
add a static form of the efficient PP::getSpelling method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index b45f47bf11..380d116386 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -664,7 +664,13 @@ public: /// copy). The caller is not allowed to modify the returned buffer pointer /// if an internal buffer is returned. unsigned getSpelling(const Token &Tok, const char *&Buffer, - bool *Invalid = 0) const; + bool *Invalid = 0) const { + return getSpelling(Tok, Buffer, SourceMgr, Features, Invalid); + } + static unsigned getSpelling(const Token &Tok, const char *&Buffer, + const SourceManager &SourceMgr, + const LangOptions &Features, + bool *Invalid = 0); /// getSpelling - This method is used to get the spelling of a token into a /// SmallVector. Note that the returned StringRef may not point to the |