diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-27 20:45:58 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-27 20:45:58 +0000 |
commit | 7400a979521a70be4d69071271e4543014fbfcf5 (patch) | |
tree | 8ec8ed8cb7e1915b48136bb97b292a0ed8f45efe /llvm/tools/llvm-mc | |
parent | 70bd1fd22f801fab4b01d7e0dd22d6fb927c8fcf (diff) | |
download | bcm5719-llvm-7400a979521a70be4d69071271e4543014fbfcf5.tar.gz bcm5719-llvm-7400a979521a70be4d69071271e4543014fbfcf5.zip |
DebugInfo: Support for compressed debug info sections
1) When creating a .debug_* section and instead create a .zdebug_
section.
2) When creating a fragment in a .zdebug_* section, make it a compressed
fragment.
3) When computing the size of a compressed section, compress the data
and use the size of the compressed data.
4) Emit the compressed bytes.
Also, check that only if a section has a compressed fragment, then that
is the only fragment in the section.
Assert-fail if the fragment's data is modified after it is compressed.
Initial review on llvm-commits by Eric Christopher and Rafael Espindola.
llvm-svn: 204958
Diffstat (limited to 'llvm/tools/llvm-mc')
-rw-r--r-- | llvm/tools/llvm-mc/llvm-mc.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index a4b4a844f67..b2e7a81488d 100644 --- a/llvm/tools/llvm-mc/llvm-mc.cpp +++ b/llvm/tools/llvm-mc/llvm-mc.cpp @@ -50,6 +50,9 @@ static cl::opt<bool> ShowEncoding("show-encoding", cl::desc("Show instruction encodings")); static cl::opt<bool> +CompressDebugSections("compress-debug-sections", cl::desc("Compress DWARF debug sections")); + +static cl::opt<bool> ShowInst("show-inst", cl::desc("Show internal instruction representation")); static cl::opt<bool> @@ -381,6 +384,9 @@ int main(int argc, char **argv) { std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*MRI, TripleName)); assert(MAI && "Unable to create target asm info!"); + if (CompressDebugSections) + MAI->setCompressDebugSections(true); + // FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and // MCObjectFileInfo needs a MCContext reference in order to initialize itself. std::unique_ptr<MCObjectFileInfo> MOFI(new MCObjectFileInfo()); |