Enabled -fsanitize-address-use-after-scope for -DLLVM_USE_SANITIZER=Address

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D28823

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vitaly Buka 2017-01-17 21:04:23 +00:00
parent e3aa75949b
commit 73275fd4d0

View File

@ -588,6 +588,9 @@ if(LLVM_USE_SANITIZER)
else()
message(FATAL_ERROR "LLVM_USE_SANITIZER is not supported on this platform.")
endif()
if (LLVM_USE_SANITIZER MATCHES "(Undefined;)?Address(;Undefined)?")
append("-fsanitize-address-use-after-scope" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
if (LLVM_USE_SANITIZE_COVERAGE)
append("-fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()