aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2022-04-01 16:38:30 -0400
committerLouis Dionne <ldionne.2@gmail.com>2022-06-07 16:33:53 -0400
commitf3966eaf869b7bdd9113ab9d5b78469eb0f5f028 (patch)
treebcf158f004cdc3420525a87579837d445536e3b0 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent89c4b29e8d35ec352019d828e546bea3850403df (diff)
downloadllvm-f3966eaf869b7bdd9113ab9d5b78469eb0f5f028.zip
llvm-f3966eaf869b7bdd9113ab9d5b78469eb0f5f028.tar.gz
llvm-f3966eaf869b7bdd9113ab9d5b78469eb0f5f028.tar.bz2
[libc++] Make the Debug mode a configuration-time only option
The debug mode has been broken pretty much ever since it was shipped because it was possible to enable the debug mode in user code without actually enabling it in the dylib, leading to ODR violations that caused various kinds of failures. This commit makes the debug mode a knob that is configured when building the library and which can't be changed afterwards. This is less flexible for users, however it will actually work as intended and it will allow us, in the future, to add various kinds of checks that do not assume the same ABI as the normal library. Furthermore, this will make the debug mode more robust, which means that vendors might be more tempted to support it properly, which hasn't been the case with the current debug mode. This patch shouldn't break any user code, except folks who are building against a library that doesn't have the debug mode enabled and who try to enable the debug mode in their code. Such users will get a compile-time error explaining that this configuration isn't supported anymore. In the future, we should further increase the granularity of the debug mode checks so that we can cherry-pick which checks to enable, like we do for unspecified behavior randomization. Differential Revision: https://reviews.llvm.org/D122941
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions