diff options
author | Eric Christopher <echristo@apple.com> | 2012-02-06 19:43:51 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-02-06 19:43:51 +0000 |
commit | 65c05fa79cce9cd434a7fabbb352c17e4a000f2c (patch) | |
tree | c71608450471daa2836b0f5f27056a93e9ad3636 /clang/lib | |
parent | a27a16c04d8ecbd52e312edf03d4607508955bf8 (diff) | |
download | bcm5719-llvm-65c05fa79cce9cd434a7fabbb352c17e4a000f2c.tar.gz bcm5719-llvm-65c05fa79cce9cd434a7fabbb352c17e4a000f2c.zip |
Rewrite the debug action handling to take -verify into account.
Add a quiet option for dwarfdump and move it out of NDEBUG only.
Still requires an option as we don't want this on by default.
llvm-svn: 149894
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 34 | ||||
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 1 |
2 files changed, 17 insertions, 18 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 5815fda754e..bc571b9ef1a 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -853,34 +853,32 @@ void Driver::BuildUniversalActions(const ToolChain &TC, else Actions.push_back(new LipoJobAction(Inputs, Act->getType())); - // Add a 'dsymutil' step if necessary, when debug info is enabled and we - // have a compile input. We need to run 'dsymutil' ourselves in such cases - // because the debug info will refer to a temporary object file which is - // will be removed at the end of the compilation process. - if (Act->getType() == types::TY_Image) { - Arg *A = Args.getLastArg(options::OPT_g_Group); + // Handle debug info queries. + Arg *A = Args.getLastArg(options::OPT_g_Group); if (A && !A->getOption().matches(options::OPT_g0) && !A->getOption().matches(options::OPT_gstabs) && ContainsCompileOrAssembleAction(Actions.back())) { - ActionList Inputs; - Inputs.push_back(Actions.back()); - Actions.pop_back(); - - Actions.push_back(new DsymutilJobAction(Inputs, types::TY_dSYM)); + + // Add a 'dsymutil' step if necessary, when debug info is enabled and we + // have a compile input. We need to run 'dsymutil' ourselves in such cases + // because the debug info will refer to a temporary object file which is + // will be removed at the end of the compilation process. + if (Act->getType() == types::TY_Image) { + ActionList Inputs; + Inputs.push_back(Actions.back()); + Actions.pop_back(); + Actions.push_back(new DsymutilJobAction(Inputs, types::TY_dSYM)); + } - // Verify the debug information if we're in debug mode and '-verify' - // is passed. - #ifndef NDEBUG - if (Args.hasArg(options::OPT_verify)) { - ActionList VerifyInputs; + // Verify the output (debug information only) if we passed '-verify'. + if (Args.hasArg(options::OPT_verify)) { + ActionList VerifyInputs; VerifyInputs.push_back(Actions.back()); Actions.pop_back(); Actions.push_back(new VerifyJobAction(VerifyInputs, types::TY_Nothing)); } - #endif } - } } } diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 0b713c111b0..ef065e8fc03 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4081,6 +4081,7 @@ void darwin::VerifyDebug::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("--verify"); CmdArgs.push_back("--debug-info"); CmdArgs.push_back("--eh-frame"); + CmdArgs.push_back("--quiet"); assert(Inputs.size() == 1 && "Unable to handle multiple inputs."); const InputInfo &Input = Inputs[0]; |