diff options
author | Ben Langmuir <blangmuir@apple.com> | 2014-02-06 18:53:25 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2014-02-06 18:53:25 +0000 |
commit | 847330dafd940675cc4486569c358343c5d14264 (patch) | |
tree | 9f170031a447059544acabdfe2775de939d08366 /lib/Driver/Action.cpp | |
parent | 65ad11b062684b7e4fb6877415b4a30386310e83 (diff) | |
download | clang-847330dafd940675cc4486569c358343c5d14264.tar.gz |
Move -verify-pch to use VerifyJobAction
Use the verify hook rather than the compile hook to represent the
-verify-pch action, and move the exising --verify-debug-info action
into its own subclass of VerifyJobAction. Incidentally change the name
printed by -ccc-print-phases for --verify-debug-info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Action.cpp')
-rw-r--r-- | lib/Driver/Action.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index ddd2d599da..86a48fd8b7 100644 --- a/lib/Driver/Action.cpp +++ b/lib/Driver/Action.cpp @@ -33,7 +33,8 @@ const char *Action::getClassName(ActionClass AC) { case LinkJobClass: return "linker"; case LipoJobClass: return "lipo"; case DsymutilJobClass: return "dsymutil"; - case VerifyJobClass: return "verify"; + case VerifyDebugInfoJobClass: return "verify-debug-info"; + case VerifyPCHJobClass: return "verify-pch"; } llvm_unreachable("invalid class"); @@ -117,6 +118,29 @@ DsymutilJobAction::DsymutilJobAction(ActionList &Inputs, types::ID Type) void VerifyJobAction::anchor() {} -VerifyJobAction::VerifyJobAction(ActionList &Inputs, types::ID Type) - : JobAction(VerifyJobClass, Inputs, Type) { +VerifyJobAction::VerifyJobAction(ActionClass Kind, Action *Input, + types::ID Type) + : JobAction(Kind, Input, Type) { + assert((Kind == VerifyDebugInfoJobClass || Kind == VerifyPCHJobClass) && + "ActionClass is not a valid VerifyJobAction"); +} + +VerifyJobAction::VerifyJobAction(ActionClass Kind, ActionList &Inputs, + types::ID Type) + : JobAction(Kind, Inputs, Type) { + assert((Kind == VerifyDebugInfoJobClass || Kind == VerifyPCHJobClass) && + "ActionClass is not a valid VerifyJobAction"); +} + +void VerifyDebugInfoJobAction::anchor() {} + +VerifyDebugInfoJobAction::VerifyDebugInfoJobAction(Action *Input, + types::ID Type) + : VerifyJobAction(VerifyDebugInfoJobClass, Input, Type) { +} + +void VerifyPCHJobAction::anchor() {} + +VerifyPCHJobAction::VerifyPCHJobAction(Action *Input, types::ID Type) + : VerifyJobAction(VerifyPCHJobClass, Input, Type) { } |