diff options
author | Eric Christopher <echristo@gmail.com> | 2013-02-22 23:50:16 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-02-22 23:50:16 +0000 |
commit | f1545838d7127563b161cfe63d27145c6fe5e982 (patch) | |
tree | dfd76a4f1244f4e9ab849cdb256d7ea91bb52f3b /clang/lib/Driver/Tools.cpp | |
parent | dae389bb98c73d4d5a609d415ba00a417832b350 (diff) | |
download | bcm5719-llvm-f1545838d7127563b161cfe63d27145c6fe5e982.tar.gz bcm5719-llvm-f1545838d7127563b161cfe63d27145c6fe5e982.zip |
Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.
llvm-svn: 175935
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 12833a84229..ce005d05af9 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3269,7 +3269,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // can propagate it to the backend. bool SplitDwarf = Args.hasArg(options::OPT_gsplit_dwarf) && (getToolChain().getTriple().getOS() == llvm::Triple::Linux) && - isa<AssembleJobAction>(JA); + (isa<AssembleJobAction>(JA) || isa<CompileJobAction>(JA)); const char *SplitDwarfOut; if (SplitDwarf) { CmdArgs.push_back("-split-dwarf-file"); @@ -3280,9 +3280,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Finally add the compile command to the compilation. C.addCommand(new Command(JA, *this, Exec, CmdArgs)); - // Handle the debug info splitting at object creation time. + // Handle the debug info splitting at object creation time if we're + // creating an object. // TODO: Currently only works on linux with newer objcopy. - if (SplitDwarf) + if (SplitDwarf && !isa<CompileJobAction>(JA)) SplitDebugInfo(getToolChain(), C, *this, JA, Args, Output, SplitDwarfOut); if (Arg *A = Args.getLastArg(options::OPT_pg)) |