summaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInvocation.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:09 +0000
commit519fc96c475680de2cc49e7811dbbfadb912cbcc (patch)
tree310ca684459b7e9ae13c9a3b9abf308b3a634afe /include/clang/Frontend/CompilerInvocation.h
parent2298981669bf3bd63335a4be179bc0f96823a8f4 (diff)
Notes
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r--include/clang/Frontend/CompilerInvocation.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h
index 413134be4cef0..f3253d5b40e3c 100644
--- a/include/clang/Frontend/CompilerInvocation.h
+++ b/include/clang/Frontend/CompilerInvocation.h
@@ -14,13 +14,14 @@
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
+#include "clang/Basic/LangStandard.h"
#include "clang/Frontend/DependencyOutputOptions.h"
#include "clang/Frontend/FrontendOptions.h"
-#include "clang/Frontend/LangStandard.h"
#include "clang/Frontend/MigratorOptions.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/ArrayRef.h"
#include <memory>
#include <string>
@@ -147,13 +148,14 @@ public:
/// Create a compiler invocation from a list of input options.
/// \returns true on success.
///
+ /// \returns false if an error was encountered while parsing the arguments
+ /// and attempts to recover and continue parsing the rest of the arguments.
+ /// The recovery is best-effort and only guarantees that \p Res will end up in
+ /// one of the vaild-to-access (albeit arbitrary) states.
+ ///
/// \param [out] Res - The resulting invocation.
- /// \param ArgBegin - The first element in the argument vector.
- /// \param ArgEnd - The last element in the argument vector.
- /// \param Diags - The diagnostic engine to use for errors.
static bool CreateFromArgs(CompilerInvocation &Res,
- const char* const *ArgBegin,
- const char* const *ArgEnd,
+ ArrayRef<const char *> CommandLineArgs,
DiagnosticsEngine &Diags);
/// Get the directory where the compiler headers