blob: 7aaf470cedc70e07cc1aacaaa19b3dfac432635c [file] [log] [blame]
Mikhail Glushenkovb90cd832008-05-06 16:34:12 +00001//===--- 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 Glushenkovbe9d9a12008-05-06 18:08:59 +000020namespace llvmc {
21
22 typedef std::vector<std::string> StringVector;
Mikhail Glushenkovb90cd832008-05-06 16:34:12 +000023
24 class Action {
25 std::string Command_;
26 std::vector<std::string> Args_;
27 public:
Mikhail Glushenkovbe9d9a12008-05-06 18:08:59 +000028 Action (const std::string& C,
29 const StringVector& A)
Mikhail Glushenkovb90cd832008-05-06 16:34:12 +000030 : Command_(C), Args_(A)
31 {}
32
Mikhail Glushenkovaa4948f2008-05-06 16:34:39 +000033 int Execute() const;
Mikhail Glushenkovb90cd832008-05-06 16:34:12 +000034 };
35
36}
37
38#endif // LLVM_TOOLS_LLVMC2_ACTION_H