Move Split DWARF handling to an MC option/command line argument rather than using...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 21 Apr 2017 23:35:36 +0000 (23:35 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 21 Apr 2017 23:35:36 +0000 (23:35 +0000)
commit81503554986331c683163f436643a0f327da264f
tree73cb8610eecf432ad55baba9d4ce0eae39d529e8
parent96b1ed50e879751637519b84a215255128b5dedd
Move Split DWARF handling to an MC option/command line argument rather than using metadata

Since Split DWARF needs to name the actual .dwo file that is generated,
it can't be known at the time the llvm::Module is produced as it may be
merged with other Modules before the object is generated and that object
may be generated with any name.

By passing the Split DWARF file name when LLVM is producing object code
the .dwo file name in the object file can match correctly.

The support for Split DWARF for implicit modules remains the same -
using metadata to store the dwo name and dwo id so that potentially
multiple skeleton CUs referring to different dwo files can be generated
from one llvm::Module.

llvm-svn: 301063
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Frontend/CodeGenOptions.def
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/split-debug-filename.c
clang/test/Driver/split-debug.c