diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-13 12:17:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-13 12:17:08 +0000 |
commit | 85da0071a4ab7d6f06831d20bad79122d7407df7 (patch) | |
tree | 16615b9b06bfa82bbf7433cadfeca94518fdcab1 /lib/Driver/Action.cpp | |
parent | 26308bafd3610f566891eec6c29480ac5ec1c433 (diff) |
Driver: Add cast<> support for Action, and some other accessors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Action.cpp')
-rw-r--r-- | lib/Driver/Action.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index d9bfce1ad3..86d676f698 100644 --- a/lib/Driver/Action.cpp +++ b/lib/Driver/Action.cpp @@ -13,3 +13,20 @@ using namespace clang::driver; Action::~Action() {} + +const char *Action::getClassName(ActionClass AC) { + switch (AC) { + case InputClass: return "input"; + case BindArchClass: return "bind-arch"; + case PreprocessJobClass: return "preprocess"; + case PrecompileJobClass: return "precompile"; + case AnalyzeJobClass: return "analyze"; + case CompileJobClass: return "compile"; + case AssembleJobClass: return "assemble"; + case LinkJobClass: return "link"; + case LipoJobClass: return "lipo"; + } + + assert(0 && "invalid class"); + return 0; +} |