mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-20 04:46:33 +00:00

Summary: Allow user to provide multiple blacklists by passing several -fsanitize-blacklist= options. These options now don't override default blacklist from Clang resource directory, which is always applied (which fixes PR22431). -fno-sanitize-blacklist option now disables all blacklists that were specified earlier in the command line (including the default one). This change depends on http://reviews.llvm.org/D7367. Test Plan: regression test suite Reviewers: timurrrr Subscribers: cfe-commits, kcc, pcc Differential Revision: http://reviews.llvm.org/D7368 llvm-svn: 228156
39 lines
1.3 KiB
C++
39 lines
1.3 KiB
C++
//===--- LangOptions.cpp - C Language Family Language Options ---*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the LangOptions class.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#include "clang/Basic/LangOptions.h"
|
|
|
|
using namespace clang;
|
|
|
|
LangOptions::LangOptions() {
|
|
#define LANGOPT(Name, Bits, Default, Description) Name = Default;
|
|
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) set##Name(Default);
|
|
#include "clang/Basic/LangOptions.def"
|
|
}
|
|
|
|
void LangOptions::resetNonModularOptions() {
|
|
#define LANGOPT(Name, Bits, Default, Description)
|
|
#define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
|
|
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
|
|
Name = Default;
|
|
#include "clang/Basic/LangOptions.def"
|
|
|
|
// FIXME: This should not be reset; modules can be different with different
|
|
// sanitizer options (this affects __has_feature(address_sanitizer) etc).
|
|
Sanitize.clear();
|
|
SanitizerBlacklistFiles.clear();
|
|
|
|
CurrentModule.clear();
|
|
ImplementationOfModule.clear();
|
|
}
|
|
|