summaryrefslogtreecommitdiff
path: root/include/clang/Lex/PPCallbacks.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:49 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:50:49 +0000
commit2298981669bf3bd63335a4be179bc0f96823a8f4 (patch)
tree1cbe2eb27f030d2d70b80ee5ca3c86bee7326a9f /include/clang/Lex/PPCallbacks.h
parent9a83721404652cea39e9f02ae3e3b5c964602a5c (diff)
Notes
Diffstat (limited to 'include/clang/Lex/PPCallbacks.h')
-rw-r--r--include/clang/Lex/PPCallbacks.h59
1 files changed, 55 insertions, 4 deletions
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 2448b34c8af49..f3f3796b1a309 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/include/clang/Lex/PPCallbacks.h
@@ -1,9 +1,8 @@
//===--- PPCallbacks.h - Callbacks for Preprocessor actions -----*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
@@ -133,6 +132,28 @@ public:
SrcMgr::CharacteristicKind FileType) {
}
+ /// Callback invoked whenever a submodule was entered.
+ ///
+ /// \param M The submodule we have entered.
+ ///
+ /// \param ImportLoc The location of import directive token.
+ ///
+ /// \param ForPragma If entering from pragma directive.
+ ///
+ virtual void EnteredSubmodule(Module *M, SourceLocation ImportLoc,
+ bool ForPragma) { }
+
+ /// Callback invoked whenever a submodule was left.
+ ///
+ /// \param M The submodule we have left.
+ ///
+ /// \param ImportLoc The location of import directive token.
+ ///
+ /// \param ForPragma If entering from pragma directive.
+ ///
+ virtual void LeftSubmodule(Module *M, SourceLocation ImportLoc,
+ bool ForPragma) { }
+
/// Callback invoked whenever there was an explicit module-import
/// syntax.
///
@@ -240,6 +261,14 @@ public:
virtual void PragmaWarningPop(SourceLocation Loc) {
}
+ /// Callback invoked when a \#pragma execution_character_set(push) directive
+ /// is read.
+ virtual void PragmaExecCharsetPush(SourceLocation Loc, StringRef Str) {}
+
+ /// Callback invoked when a \#pragma execution_character_set(pop) directive
+ /// is read.
+ virtual void PragmaExecCharsetPop(SourceLocation Loc) {}
+
/// Callback invoked when a \#pragma clang assume_nonnull begin directive
/// is read.
virtual void PragmaAssumeNonNullBegin(SourceLocation Loc) {}
@@ -388,6 +417,18 @@ public:
Imported, FileType);
}
+ void EnteredSubmodule(Module *M, SourceLocation ImportLoc,
+ bool ForPragma) override {
+ First->EnteredSubmodule(M, ImportLoc, ForPragma);
+ Second->EnteredSubmodule(M, ImportLoc, ForPragma);
+ }
+
+ void LeftSubmodule(Module *M, SourceLocation ImportLoc,
+ bool ForPragma) override {
+ First->LeftSubmodule(M, ImportLoc, ForPragma);
+ Second->LeftSubmodule(M, ImportLoc, ForPragma);
+ }
+
void moduleImport(SourceLocation ImportLoc, ModuleIdPath Path,
const Module *Imported) override {
First->moduleImport(ImportLoc, Path, Imported);
@@ -478,6 +519,16 @@ public:
Second->PragmaWarningPop(Loc);
}
+ void PragmaExecCharsetPush(SourceLocation Loc, StringRef Str) override {
+ First->PragmaExecCharsetPush(Loc, Str);
+ Second->PragmaExecCharsetPush(Loc, Str);
+ }
+
+ void PragmaExecCharsetPop(SourceLocation Loc) override {
+ First->PragmaExecCharsetPop(Loc);
+ Second->PragmaExecCharsetPop(Loc);
+ }
+
void PragmaAssumeNonNullBegin(SourceLocation Loc) override {
First->PragmaAssumeNonNullBegin(Loc);
Second->PragmaAssumeNonNullBegin(Loc);