aboutsummaryrefslogtreecommitdiffstats
path: root/src/SourceCompatibilityHelpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/SourceCompatibilityHelpers.h')
-rw-r--r--src/SourceCompatibilityHelpers.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/SourceCompatibilityHelpers.h b/src/SourceCompatibilityHelpers.h
index 27309f7f..5588d932 100644
--- a/src/SourceCompatibilityHelpers.h
+++ b/src/SourceCompatibilityHelpers.h
@@ -117,17 +117,13 @@ inline auto getBuffer(const clang::SourceManager &sm, clang::FileID id, bool *in
}
#if LLVM_VERSION_MAJOR >= 12
-inline clang::Lexer getLexer(clang::FileID id, llvm::Optional<llvm::MemoryBufferRef> inputFile,
- const clang::SourceManager &sm, const clang::LangOptions &lo)
-{
- return clang::Lexer(id, inputFile.getValue(), sm, lo);
-}
+
+#define GET_LEXER(id, inputFile, sm, lo) \
+clang::Lexer(id, inputFile.getValue(), sm, lo)
+
#else
-inline clang::Lexer getLexer(clang::FileID id, const llvm::MemoryBuffer *inputFile,
- const clang::SourceManager &sm, const clang::LangOptions &lo)
-{
- return clang::Lexer(id, inputFile, sm, lo);
-}
+#define GET_LEXER(id, inputFile, sm, lo) \
+clang::Lexer(id, inputFile.getValue(), sm, lo)
#endif
inline bool isFinal(const clang::CXXRecordDecl *record)