Modules builds are necessarily compile actions, but they don't
necessarily produce object files. Turn off split dwarf if we're not
producing a file that the driver believes is an object file.
llvm-svn: 264227
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 7d69756..e725e5a 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -5737,7 +5737,7 @@
// 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 && !isa<CompileJobAction>(JA) && !isa<BackendJobAction>(JA))
+ if (SplitDwarf && Output.getType() == types::TY_Object)
SplitDebugInfo(getToolChain(), C, *this, JA, Args, Output, SplitDwarfOut);
if (Arg *A = Args.getLastArg(options::OPT_pg))