diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /include/clang/Rewrite/Frontend | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'include/clang/Rewrite/Frontend')
-rw-r--r-- | include/clang/Rewrite/Frontend/ASTConsumers.h | 31 | ||||
-rw-r--r-- | include/clang/Rewrite/Frontend/FixItRewriter.h | 8 | ||||
-rw-r--r-- | include/clang/Rewrite/Frontend/FrontendActions.h | 16 | ||||
-rw-r--r-- | include/clang/Rewrite/Frontend/Rewriters.h | 4 |
4 files changed, 29 insertions, 30 deletions
diff --git a/include/clang/Rewrite/Frontend/ASTConsumers.h b/include/clang/Rewrite/Frontend/ASTConsumers.h index 584af3f..c9df889 100644 --- a/include/clang/Rewrite/Frontend/ASTConsumers.h +++ b/include/clang/Rewrite/Frontend/ASTConsumers.h @@ -11,10 +11,11 @@ // //===----------------------------------------------------------------------===// -#ifndef REWRITE_ASTCONSUMERS_H -#define REWRITE_ASTCONSUMERS_H +#ifndef LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H +#define LLVM_CLANG_REWRITE_FRONTEND_ASTCONSUMERS_H #include "clang/Basic/LLVM.h" +#include <memory> #include <string> namespace clang { @@ -26,23 +27,21 @@ class Preprocessor; // ObjC rewriter: attempts to rewrite ObjC constructs into pure C code. // This is considered experimental, and only works with Apple's ObjC runtime. -ASTConsumer *CreateObjCRewriter(const std::string &InFile, - raw_ostream *OS, - DiagnosticsEngine &Diags, - const LangOptions &LOpts, - bool SilenceRewriteMacroWarning); -ASTConsumer *CreateModernObjCRewriter(const std::string &InFile, - raw_ostream *OS, - DiagnosticsEngine &Diags, - const LangOptions &LOpts, - bool SilenceRewriteMacroWarning, - bool LineInfo); +std::unique_ptr<ASTConsumer> +CreateObjCRewriter(const std::string &InFile, raw_ostream *OS, + DiagnosticsEngine &Diags, const LangOptions &LOpts, + bool SilenceRewriteMacroWarning); +std::unique_ptr<ASTConsumer> +CreateModernObjCRewriter(const std::string &InFile, raw_ostream *OS, + DiagnosticsEngine &Diags, const LangOptions &LOpts, + bool SilenceRewriteMacroWarning, bool LineInfo); /// CreateHTMLPrinter - Create an AST consumer which rewrites source code to /// HTML with syntax highlighting suitable for viewing in a web-browser. -ASTConsumer *CreateHTMLPrinter(raw_ostream *OS, Preprocessor &PP, - bool SyntaxHighlight = true, - bool HighlightMacros = true); +std::unique_ptr<ASTConsumer> CreateHTMLPrinter(raw_ostream *OS, + Preprocessor &PP, + bool SyntaxHighlight = true, + bool HighlightMacros = true); } // end clang namespace diff --git a/include/clang/Rewrite/Frontend/FixItRewriter.h b/include/clang/Rewrite/Frontend/FixItRewriter.h index 3ad8f40..5994172 100644 --- a/include/clang/Rewrite/Frontend/FixItRewriter.h +++ b/include/clang/Rewrite/Frontend/FixItRewriter.h @@ -12,8 +12,8 @@ // then forwards any diagnostics to the adapted diagnostic client. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_REWRITE_FIX_IT_REWRITER_H -#define LLVM_CLANG_REWRITE_FIX_IT_REWRITER_H +#ifndef LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H +#define LLVM_CLANG_REWRITE_FRONTEND_FIXITREWRITER_H #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceLocation.h" @@ -66,7 +66,7 @@ class FixItRewriter : public DiagnosticConsumer { /// \brief The diagnostic client that performs the actual formatting /// of error messages. DiagnosticConsumer *Client; - bool OwnsClient; + std::unique_ptr<DiagnosticConsumer> Owner; /// \brief Turn an input path into an output path. NULL implies overwriting /// the original. @@ -125,4 +125,4 @@ public: } -#endif // LLVM_CLANG_REWRITE_FIX_IT_REWRITER_H +#endif diff --git a/include/clang/Rewrite/Frontend/FrontendActions.h b/include/clang/Rewrite/Frontend/FrontendActions.h index fc79270..c8ea8b2 100644 --- a/include/clang/Rewrite/Frontend/FrontendActions.h +++ b/include/clang/Rewrite/Frontend/FrontendActions.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_REWRITE_FRONTENDACTIONS_H -#define LLVM_CLANG_REWRITE_FRONTENDACTIONS_H +#ifndef LLVM_CLANG_REWRITE_FRONTEND_FRONTENDACTIONS_H +#define LLVM_CLANG_REWRITE_FRONTEND_FRONTENDACTIONS_H #include "clang/Frontend/FrontendAction.h" @@ -22,8 +22,8 @@ class FixItOptions; class HTMLPrintAction : public ASTFrontendAction { protected: - ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) override; + std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, + StringRef InFile) override; }; class FixItAction : public ASTFrontendAction { @@ -31,8 +31,8 @@ protected: std::unique_ptr<FixItRewriter> Rewriter; std::unique_ptr<FixItOptions> FixItOpts; - ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) override; + std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, + StringRef InFile) override; bool BeginSourceFileAction(CompilerInstance &CI, StringRef Filename) override; @@ -59,8 +59,8 @@ protected: class RewriteObjCAction : public ASTFrontendAction { protected: - ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) override; + std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, + StringRef InFile) override; }; class RewriteMacrosAction : public PreprocessorFrontendAction { diff --git a/include/clang/Rewrite/Frontend/Rewriters.h b/include/clang/Rewrite/Frontend/Rewriters.h index f5ade5a..3ad76df 100644 --- a/include/clang/Rewrite/Frontend/Rewriters.h +++ b/include/clang/Rewrite/Frontend/Rewriters.h @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_REWRITE_REWRITERS_H -#define LLVM_CLANG_REWRITE_REWRITERS_H +#ifndef LLVM_CLANG_REWRITE_FRONTEND_REWRITERS_H +#define LLVM_CLANG_REWRITE_FRONTEND_REWRITERS_H #include "clang/Basic/LLVM.h" |