diff options
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 432428bb969..6734d7759b4 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -140,6 +140,7 @@ public: virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind, const std::string &Str); virtual void PragmaMessage(SourceLocation Loc, StringRef Str); + virtual void PragmaDebug(SourceLocation Loc, StringRef DebugType); virtual void PragmaDiagnosticPush(SourceLocation Loc, StringRef Namespace); virtual void PragmaDiagnosticPop(SourceLocation Loc, @@ -419,6 +420,17 @@ void PrintPPOutputPPCallbacks::PragmaMessage(SourceLocation Loc, setEmittedDirectiveOnThisLine(); } +void PrintPPOutputPPCallbacks::PragmaDebug(SourceLocation Loc, + StringRef DebugType) { + startNewLineIfNeeded(); + MoveToLine(Loc); + + OS << "#pragma clang __debug "; + OS << DebugType; + + setEmittedDirectiveOnThisLine(); +} + void PrintPPOutputPPCallbacks:: PragmaDiagnosticPush(SourceLocation Loc, StringRef Namespace) { startNewLineIfNeeded(); |