[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule
authorAlexey Samsonov <vonosmas@gmail.com>
Mon, 7 Jul 2014 23:34:34 +0000 (23:34 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Mon, 7 Jul 2014 23:34:34 +0000 (23:34 +0000)
commite7a8ccfaad752f02b4f0e3bf49321b9f23313a75
tree862aed2a5ff7208f92a1fa44283ccc14514471f0
parent2620b877b6299e04767718358d6e1eb66b18cb49
[Sanitizer] Reduce the usage of sanitizer blacklist in CodeGenModule

Get rid of cached CodeGenModule::SanOpts, which was used to turn off
sanitizer codegen options if current LLVM Module is blacklisted, and use
plain LangOpts.Sanitize instead.

1) Some codegen decisions (turning TBAA or writable strings on/off)
   shouldn't depend on the contents of blacklist.

2) llvm.asan.globals should *always* be created, even if the module
   is blacklisted - soon Clang's CodeGen where we read sanitizer
   blacklist files, so we should properly report which globals are
   blacklisted to the backend.

llvm-svn: 212499
clang/lib/CodeGen/CGDeclCXX.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/test/CodeGen/asan-globals.cpp