aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorTareq A. Siraj <tareq.a.sriaj@intel.com>2013-04-16 19:37:38 +0000
committerTareq A. Siraj <tareq.a.sriaj@intel.com>2013-04-16 19:37:38 +0000
commit6afcf8875d4e447645cd7bf3733dd8e2eb8455dc (patch)
tree492ea5c7e442ea915d1f9feeafc8b24624942d96 /lib/Frontend
parent596eea7cc26979c952a0b177d024787a99b299df (diff)
Sema for Captured Statements
Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic analysis. Currently captures all variables by reference. TODO: templates Author: Ben Langmuir <ben.langmuir@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index 6734d7759b..7e1cae95d7 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -137,6 +137,7 @@ public:
StringRef RelativePath,
const Module *Imported);
virtual void Ident(SourceLocation Loc, const std::string &str);
+ virtual void PragmaCaptured(SourceLocation Loc, StringRef Str);
virtual void PragmaComment(SourceLocation Loc, const IdentifierInfo *Kind,
const std::string &Str);
virtual void PragmaMessage(SourceLocation Loc, StringRef Str);
@@ -345,6 +346,15 @@ void PrintPPOutputPPCallbacks::Ident(SourceLocation Loc, const std::string &S) {
EmittedTokensOnThisLine = true;
}
+void PrintPPOutputPPCallbacks::PragmaCaptured(SourceLocation Loc,
+ StringRef Str) {
+ startNewLineIfNeeded();
+ MoveToLine(Loc);
+ OS << "#pragma captured";
+
+ setEmittedDirectiveOnThisLine();
+}
+
/// MacroDefined - This hook is called whenever a macro definition is seen.
void PrintPPOutputPPCallbacks::MacroDefined(const Token &MacroNameTok,
const MacroDirective *MD) {