summaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r--include/clang/Frontend/CompilerInstance.h44
1 files changed, 18 insertions, 26 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index b28e1031b8358..2f3dc3f808476 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -11,6 +11,7 @@
#define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_
#include "clang/Frontend/CompilerInvocation.h"
+#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/ModuleLoader.h"
#include "llvm/ADT/ArrayRef.h"
@@ -130,8 +131,8 @@ class CompilerInstance : public ModuleLoader {
/// The list of active output files.
std::list<OutputFile> OutputFiles;
- void operator=(const CompilerInstance &); // DO NOT IMPLEMENT
- CompilerInstance(const CompilerInstance&); // DO NOT IMPLEMENT
+ CompilerInstance(const CompilerInstance &) LLVM_DELETED_FUNCTION;
+ void operator=(const CompilerInstance &) LLVM_DELETED_FUNCTION;
public:
CompilerInstance();
~CompilerInstance();
@@ -189,10 +190,7 @@ public:
/// @name Forwarding Methods
/// {
- AnalyzerOptions &getAnalyzerOpts() {
- return Invocation->getAnalyzerOpts();
- }
- const AnalyzerOptions &getAnalyzerOpts() const {
+ AnalyzerOptionsRef getAnalyzerOpts() {
return Invocation->getAnalyzerOpts();
}
@@ -393,7 +391,7 @@ public:
ASTConsumer *takeASTConsumer() { return Consumer.take(); }
/// setASTConsumer - Replace the current AST consumer; the compiler instance
- /// takes ownership of \arg Value.
+ /// takes ownership of \p Value.
void setASTConsumer(ASTConsumer *Value);
/// }
@@ -433,7 +431,7 @@ public:
}
/// setCodeCompletionConsumer - Replace the current code completion consumer;
- /// the compiler instance takes ownership of \arg Value.
+ /// the compiler instance takes ownership of \p Value.
void setCodeCompletionConsumer(CodeCompleteConsumer *Value);
/// }
@@ -488,7 +486,7 @@ public:
/// Create a DiagnosticsEngine object with a the TextDiagnosticPrinter.
///
- /// The \arg Argc and \arg Argv arguments are used only for logging purposes,
+ /// The \p Argc and \p Argv arguments are used only for logging purposes,
/// when the diagnostic options indicate that the compiler should output
/// logging information.
///
@@ -498,8 +496,7 @@ public:
/// releasing the returned DiagnosticsEngine's client eventually.
///
/// \param Opts - The diagnostic options; note that the created text
- /// diagnostic object contains a reference to these options and its lifetime
- /// must extend past that of the diagnostic engine.
+ /// diagnostic object contains a reference to these options.
///
/// \param Client If non-NULL, a diagnostic client that will be
/// attached to (and, then, owned by) the returned DiagnosticsEngine
@@ -510,7 +507,7 @@ public:
///
/// \return The new object on success, or null on failure.
static IntrusiveRefCntPtr<DiagnosticsEngine>
- createDiagnostics(const DiagnosticOptions &Opts, int Argc,
+ createDiagnostics(DiagnosticOptions *Opts, int Argc,
const char* const *Argv,
DiagnosticConsumer *Client = 0,
bool ShouldOwnClient = true,
@@ -534,7 +531,6 @@ public:
/// context.
void createPCHExternalASTSource(StringRef Path,
bool DisablePCHValidation,
- bool DisableStatCache,
bool AllowPCHWithCompilerErrors,
void *DeserializationListener);
@@ -544,7 +540,6 @@ public:
static ExternalASTSource *
createPCHExternalASTSource(StringRef Path, const std::string &Sysroot,
bool DisablePCHValidation,
- bool DisableStatCache,
bool AllowPCHWithCompilerErrors,
Preprocessor &PP, ASTContext &Context,
void *DeserializationListener, bool Preamble);
@@ -555,8 +550,7 @@ public:
void createCodeCompletionConsumer();
/// Create a code completion consumer to print code completion results, at
- /// \arg Filename, \arg Line, and \arg Column, to the given output stream \arg
- /// OS.
+ /// \p Filename, \p Line, and \p Column, to the given output stream \p OS.
static CodeCompleteConsumer *
createCodeCompletionConsumer(Preprocessor &PP, const std::string &Filename,
unsigned Line, unsigned Column,
@@ -596,15 +590,15 @@ public:
/// Create a new output file, optionally deriving the output path name.
///
- /// If \arg OutputPath is empty, then createOutputFile will derive an output
- /// path location as \arg BaseInput, with any suffix removed, and \arg
- /// Extension appended. If OutputPath is not stdout and \arg UseTemporary
+ /// If \p OutputPath is empty, then createOutputFile will derive an output
+ /// path location as \p BaseInput, with any suffix removed, and \p Extension
+ /// appended. If \p OutputPath is not stdout and \p UseTemporary
/// is true, createOutputFile will create a new temporary file that must be
- /// renamed to OutputPath in the end.
+ /// renamed to \p OutputPath in the end.
///
/// \param OutputPath - If given, the path to the output file.
/// \param Error [out] - On failure, the error message.
- /// \param BaseInput - If \arg OutputPath is empty, the input path name to use
+ /// \param BaseInput - If \p OutputPath is empty, the input path name to use
/// for deriving the output path.
/// \param Extension - The extension to use for derived output names.
/// \param Binary - The mode to open the file in.
@@ -613,7 +607,7 @@ public:
/// multithreaded use, as the underlying signal mechanism is not reentrant
/// \param UseTemporary - Create a new temporary file that must be renamed to
/// OutputPath in the end.
- /// \param CreateMissingDirectories - When \arg UseTemporary is true, create
+ /// \param CreateMissingDirectories - When \p UseTemporary is true, create
/// missing directories in the output path.
/// \param ResultPathName [out] - If given, the result path name will be
/// stored here on success.
@@ -637,15 +631,13 @@ public:
/// as the main file.
///
/// \return True on success.
- bool InitializeSourceManager(StringRef InputFile,
- SrcMgr::CharacteristicKind Kind = SrcMgr::C_User);
+ bool InitializeSourceManager(const FrontendInputFile &Input);
/// InitializeSourceManager - Initialize the source manager to set InputFile
/// as the main file.
///
/// \return True on success.
- static bool InitializeSourceManager(StringRef InputFile,
- SrcMgr::CharacteristicKind Kind,
+ static bool InitializeSourceManager(const FrontendInputFile &Input,
DiagnosticsEngine &Diags,
FileManager &FileMgr,
SourceManager &SourceMgr,