1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
llvm-mirror/tools/llvmc2/Action.h

43 lines
1.1 KiB
C
Raw Normal View History

//===--- Action.h - The LLVM Compiler Driver --------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open
// Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
2008-05-06 18:34:12 +02:00
// Action - encapsulates a single shell command.
//
//===----------------------------------------------------------------------===//
2008-05-06 18:34:12 +02:00
#ifndef LLVM_TOOLS_LLVMC2_ACTION_H
#define LLVM_TOOLS_LLVMC2_ACTION_H
2008-05-06 18:34:12 +02:00
#include <string>
#include <vector>
namespace llvmc {
typedef std::vector<std::string> StrVector;
/// Action - A class that encapsulates a single shell command.
2008-05-06 18:34:12 +02:00
class Action {
/// Command_ - The actual command (for example, 'ls').
2008-05-06 18:34:12 +02:00
std::string Command_;
/// Args_ - Command arguments. Stdout redirection ("> file") is allowed.
2008-05-06 18:34:12 +02:00
std::vector<std::string> Args_;
public:
Action() {}
Action (const std::string& C, const StrVector& A)
2008-05-06 18:34:12 +02:00
: Command_(C), Args_(A)
{}
/// Execute - Executes the represented action.
int Execute() const;
2008-05-06 18:34:12 +02:00
};
}
2008-05-06 18:34:12 +02:00
#endif // LLVM_TOOLS_LLVMC2_ACTION_H