Add a LLVM_NOEXCEPT to Compiler.h.
[oota-llvm.git] / include / llvm / Support / Process.h
index ce39d048bb96aaeb82b8c668238ca6e95e13ab82..7f6441ea206aa774de9334a7265daa96e0cc0c95 100644 (file)
 #ifndef LLVM_SUPPORT_PROCESS_H
 #define LLVM_SUPPORT_PROCESS_H
 
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/Config/llvm-config.h"
+#include "llvm/Support/Allocator.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/TimeValue.h"
+#include "llvm/Support/system_error.h"
 
 namespace llvm {
 class StringRef;
@@ -107,10 +110,10 @@ class self_process : public process {
   virtual ~self_process();
 
 public:
-  virtual id_type get_id();
-  virtual TimeValue get_user_time() const;
-  virtual TimeValue get_system_time() const;
-  virtual TimeValue get_wall_time() const;
+  id_type get_id() override;
+  TimeValue get_user_time() const override;
+  TimeValue get_system_time() const override;
+  TimeValue get_wall_time() const override;
 
   /// \name Process configuration (sysconf on POSIX)
   /// @{
@@ -168,6 +171,14 @@ public:
   // string. \arg Name is assumed to be in UTF-8 encoding too.
   static Optional<std::string> GetEnv(StringRef name);
 
+  /// This function returns a SmallVector containing the arguments passed from
+  /// the operating system to the program.  This function expects to be handed
+  /// the vector passed in from main.
+  static error_code
+  GetArgumentVector(SmallVectorImpl<const char *> &Args,
+                    ArrayRef<const char *> ArgsFromMain,
+                    SpecificBumpPtrAllocator<char> &ArgAllocator);
+
   /// This function determines if the standard input is connected directly
   /// to a user's input (keyboard probably), rather than coming from a file
   /// or pipe.