From a041610f11e9be018e125a5789e3ea258659dab4 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 11 Nov 2014 01:26:14 +0000 Subject: [Sanitizer] Refactor sanitizer options in LangOptions. Get rid of ugly SanitizerOptions class thrust into LangOptions: * Make SanitizeAddressFieldPadding a regular language option, and rely on default behavior to initialize/reset it. * Make SanitizerBlacklistFile a regular member LangOptions. * Introduce the helper class "SanitizerSet" to represent the set of enabled sanitizers and make it a member of LangOptions. It is exactly the entity we want to cache and modify in CodeGenFunction, for instance. We'd also be able to reuse SanitizerSet in CodeGenOptions for storing the set of recoverable sanitizers, and in the Driver to represent the set of sanitizers turned on/off by the commandline flags. No functionality change. llvm-svn: 221653 --- clang/lib/CodeGen/CGClass.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGClass.cpp') diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 1a4c1564270..f64b8fef3fa 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -842,7 +842,7 @@ namespace { } private: CodeGenFunction &CGF; - SanitizerOptions OldSanOpts; + SanitizerSet OldSanOpts; }; } @@ -858,7 +858,7 @@ namespace { bool isMemcpyableField(FieldDecl *F) const { // Never memcpy fields when we are adding poisoned paddings. - if (CGF.getContext().getLangOpts().Sanitize.SanitizeAddressFieldPadding) + if (CGF.getContext().getLangOpts().SanitizeAddressFieldPadding) return false; Qualifiers Qual = F->getType().getQualifiers(); if (Qual.hasVolatile() || Qual.hasObjCLifetime()) -- cgit v1.2.3