From 9b9a8d330c142f1c445446ab7053a5bb1bf581c1 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Thu, 6 Feb 2014 18:53:25 +0000 Subject: 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. llvm-svn: 200938 --- clang/lib/Driver/Action.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'clang/lib/Driver/Action.cpp') diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp index ddd2d599da0..86a48fd8b7f 100644 --- a/clang/lib/Driver/Action.cpp +++ b/clang/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) { } -- cgit v1.2.3