summaryrefslogtreecommitdiffstats
path: root/clang/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
commit6dfa25a19f3f28fcdc4a4c0130bf4a6fcdce0cd1 (patch)
treee4355c0d4969b0173e9b0a10d4ed67d60a2f6994 /clang/lib/Frontend
parent93383381d7fc1c80b3dd8711164ad858a95718ff (diff)
downloadbcm5719-llvm-6dfa25a19f3f28fcdc4a4c0130bf4a6fcdce0cd1.tar.gz
bcm5719-llvm-6dfa25a19f3f28fcdc4a4c0130bf4a6fcdce0cd1.zip
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 llvm-svn: 179618
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 6734d7759b4..7e1cae95d7e 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud