[llvm] [RemoveDIs] Add flag to control loading into new debug mode from bitcode (PR #85649)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 02:21:58 PDT 2024
OCHyams wrote:
Thanks @CarlosAlbertoEnciso - To answer your two inline questions about the `cl::opt` being a `boolOrDefault`: the default value is `BOU_UNSET`. So at the moment with the check `LoadBitcodeIntoNewDbgInforFormat == cl::boolOrDefault::BOU_TRUE` in BitcodeReader.cpp, `BOU_FALSE` and `BOU_UNSET` have the same meaning. However, we can have individual tools make this change:
```
if (LoadBitcodeIntoNewDbgInforFormat == cl::boolOrDefault::BOU_UNSET)
LoadBitcodeIntoNewDbgInforFormat = cl::boolOrDefault::BOU_TRUE;
```
Which effectively means for that tool only, the default is changed from false to true.
It's useful to be able to give each tool control over this while we're implementing support, so it can be done incrementally. Eventually the flag will be removed.
https://github.com/llvm/llvm-project/pull/85649
More information about the llvm-commits
mailing list