summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-06-01 20:01:01 +0000
committerVedant Kumar <vsk@apple.com>2017-06-01 20:01:01 +0000
commit85a83c2cedc2884e9c08e5031198c42beeeb54f1 (patch)
treeda00aba83dc4d8a6507c8d963bfbcbbc5fa5e036 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent962aa247de478f161d4efa4d5aa521d7d2bac41b (diff)
downloadbcm5719-llvm-85a83c2cedc2884e9c08e5031198c42beeeb54f1.tar.gz
bcm5719-llvm-85a83c2cedc2884e9c08e5031198c42beeeb54f1.zip
[Modules] Handle sanitizer feature mismatches when importing modules
This patch makes it an error to have a mismatch between the enabled sanitizers in a CU, and in any module being imported into the CU. Only mismatches between non-modular sanitizers are treated as errors. This patch also includes non-modular sanitizers in module hashes, in order to ensure module rebuilds occur when -fsanitize=X is toggled on and off for non-modular sanitizers, and to cut down on module rebuilds when the option is toggled for modular sanitizers. This fixes a longstanding issue with implicit modules and sanitizers, which Duncan originally diagnosed. When building with implicit modules it's possible to hit a scenario where modules are built without -fsanitize=address, and are subsequently imported into CUs with -fsanitize=address enabled. This causes strange failures at runtime. The case Duncan found affects libcxx, since its vector implementation behaves differently when ASan is enabled. Implicit module builds should "just work" when -fsanitize=X is toggled on and off across multiple compiler invocations, which is what this patch does. Differential Revision: https://reviews.llvm.org/D32724 llvm-svn: 304463
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud