Protect ChangeCompareStride from situations in which it is possible
[oota-llvm.git] / tools / llvmc2 / Action.h
index 43495c463aa2e1e56a1a1da030ca6912a4947776..c3b31d4e5589903588623eb4e80a07a0e52251e2 100644 (file)
@@ -1,4 +1,4 @@
-//===--- Tools.h - The LLVM Compiler Driver ---------------------*- C++ -*-===//
+//===--- Action.h - The LLVM Compiler Driver --------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
 #include <string>
 #include <vector>
 
-namespace llvmcc {
+namespace llvmc {
 
+  typedef std::vector<std::string> StrVector;
+
+  /// Action - A class that encapsulates a single shell command.
   class Action {
+    /// Command_ - The actual command (for example, 'ls').
     std::string Command_;
+    /// Args_ - Command arguments. Stdout redirection ("> file") is allowed.
     std::vector<std::string> Args_;
   public:
-    Action (std::string const& C,
-            std::vector<std::string> const& A)
+    Action() {}
+    Action (const std::string& C, const StrVector& A)
       : Command_(C), Args_(A)
     {}
 
-    int Execute();
+    /// Execute - Executes the represented action.
+    int Execute() const;
   };
 
 }