[PATCH] D63167: [Clang] Remove unused -split-dwarf and obsolete -enable-split-dwarf
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 17:12:36 PDT 2019
aaronpuchert added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:864
default:
- if (!CodeGenOpts.SplitDwarfOutput.empty() &&
- (CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) {
+ if (!CodeGenOpts.SplitDwarfOutput.empty()) {
DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
----------------
aaronpuchert wrote:
> Perhaps I should also check whether `SplitDwarfFile` is empty.
Maybe not. As it is, we just create an empty (but valid) debug info file when we have `-split-dwarf-output` but no `-split-dwarf-file`. This is exactly what `llc` does as well.
```
$ clang -c -g -o clang.o -Xclang -split-dwarf-output -Xclang clang.dwo test.cpp
$ clang -c -S -emit-llvm -g -o test.ll test.cpp
$ llc -filetype=obj -o llc.o -split-dwarf-output llc.dwo test.ll
$ diff <(llvm-dwarfdump clang.o) <(llvm-dwarfdump llc.o)
1c1
< clang.o: file format ELF64-x86-64
---
> llc.o: file format ELF64-x86-64
$ diff clang.dwo llc.dwo
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63167/new/
https://reviews.llvm.org/D63167
More information about the cfe-commits
mailing list