aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInvocation.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r--include/clang/Frontend/CompilerInvocation.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h
index 33234ec898..9d068c523c 100644
--- a/include/clang/Frontend/CompilerInvocation.h
+++ b/include/clang/Frontend/CompilerInvocation.h
@@ -20,8 +20,14 @@
#include "clang/Frontend/HeaderSearchOptions.h"
#include "clang/Frontend/PreprocessorOptions.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringMap.h"
#include <string>
+#include <vector>
+
+namespace llvm {
+ template<typename T> class SmallVectorImpl;
+}
namespace clang {
@@ -65,6 +71,23 @@ class CompilerInvocation {
public:
CompilerInvocation() {}
+ /// @name Utility Methods
+ /// @{
+
+ /// CreateFromArgs - Create a compiler invocation from a list of input
+ /// options.
+ ///
+ /// FIXME: Documenting error behavior.
+ ///
+ /// \param Res [out] - The resulting invocation.
+ /// \param Args - The input argument strings.
+ static void CreateFromArgs(CompilerInvocation &Res,
+ const llvm::SmallVectorImpl<llvm::StringRef> &Args);
+
+ /// toArgs - Convert the CompilerInvocation to a list of strings suitable for
+ /// passing to CreateFromArgs.
+ void toArgs(std::vector<std::string> &Res);
+
/// @}
/// @name Option Subgroups
/// @{