aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-08-23 17:56:55 +0000
committerEric Christopher <echristo@apple.com>2011-08-23 17:56:55 +0000
commitf857186fd1995b34185d063a29b11ad4f948519f (patch)
tree00f28f2be0134e6adc866b37be56aaaa2d040d5f /lib/Driver/Tools.cpp
parent5033be1b3a6f1d1c1ab9b2d284267c8f6f531f2e (diff)
Add support for a verifier to the driver. Currently only verifies debug
output on darwin so is hard coded there. As a note this will need a little bit of refactoring in the class hierarchy to separate it out for different verifiers based on input type. Fixes rdar://8256258. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e147c05ffe..33e11fb849 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -3482,6 +3482,26 @@ void darwin::Dsymutil::ConstructJob(Compilation &C, const JobAction &JA,
C.addCommand(new Command(JA, *this, Exec, CmdArgs));
}
+void darwin::VerifyDebug::ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const ArgList &Args,
+ const char *LinkingOutput) const {
+ ArgStringList CmdArgs;
+ CmdArgs.push_back("--verify");
+
+ assert(Inputs.size() == 1 && "Unable to handle multiple inputs.");
+ const InputInfo &Input = Inputs[0];
+ assert(Input.isFilename() && "Unexpected verify input");
+
+ // Grabbing the output of the earlier dsymutil run.
+ CmdArgs.push_back(Input.getFilename());
+
+ const char *Exec =
+ Args.MakeArgString(getToolChain().GetProgramPath("dwarfdump"));
+ C.addCommand(new Command(JA, *this, Exec, CmdArgs));
+}
+
void auroraux::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
const InputInfo &Output,
const InputInfoList &Inputs,