diff options
author | Tareq A. Siraj <tareq.a.sriaj@intel.com> | 2013-04-16 18:41:26 +0000 |
---|---|---|
committer | Tareq A. Siraj <tareq.a.sriaj@intel.com> | 2013-04-16 18:41:26 +0000 |
commit | 0de0dd49231a9613339b95c0e1e4a3838eeb6bb3 (patch) | |
tree | 4a663f0871760f09966aff9fba5c1e1c3af70256 /clang/lib/Frontend/PrintPreprocessedOutput.cpp | |
parent | efed27c115f4e0d9f155ea5ae96c5801bda19804 (diff) | |
download | bcm5719-llvm-0de0dd49231a9613339b95c0e1e4a3838eeb6bb3.tar.gz bcm5719-llvm-0de0dd49231a9613339b95c0e1e4a3838eeb6bb3.zip |
Parser support for #pragma clang __debug captured
This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.
Currently returns StmtEmpty
Author: Andy Zhang <andy.zhang@intel.com>
Differential Revision: http://llvm-reviews.chandlerc.com/D369
llvm-svn: 179614
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(); |