Mikhail Glushenkov | b90cd83 | 2008-05-06 16:34:12 +0000 | [diff] [blame] | 1 | //===--- Tools.h - The LLVM Compiler Driver ---------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open |
| 6 | // Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // Action - encapsulates a single shell command. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_TOOLS_LLVMC2_ACTION_H |
| 15 | #define LLVM_TOOLS_LLVMC2_ACTION_H |
| 16 | |
| 17 | #include <string> |
| 18 | #include <vector> |
| 19 | |
Mikhail Glushenkov | be9d9a1 | 2008-05-06 18:08:59 +0000 | [diff] [blame^] | 20 | namespace llvmc { |
| 21 | |
| 22 | typedef std::vector<std::string> StringVector; |
Mikhail Glushenkov | b90cd83 | 2008-05-06 16:34:12 +0000 | [diff] [blame] | 23 | |
| 24 | class Action { |
| 25 | std::string Command_; |
| 26 | std::vector<std::string> Args_; |
| 27 | public: |
Mikhail Glushenkov | be9d9a1 | 2008-05-06 18:08:59 +0000 | [diff] [blame^] | 28 | Action (const std::string& C, |
| 29 | const StringVector& A) |
Mikhail Glushenkov | b90cd83 | 2008-05-06 16:34:12 +0000 | [diff] [blame] | 30 | : Command_(C), Args_(A) |
| 31 | {} |
| 32 | |
Mikhail Glushenkov | aa4948f | 2008-05-06 16:34:39 +0000 | [diff] [blame] | 33 | int Execute() const; |
Mikhail Glushenkov | b90cd83 | 2008-05-06 16:34:12 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } |
| 37 | |
| 38 | #endif // LLVM_TOOLS_LLVMC2_ACTION_H |