clang  3.7.0
LangOptions.cpp
Go to the documentation of this file.
1 //===--- LangOptions.cpp - C Language Family Language Options ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the LangOptions class.
11 //
12 //===----------------------------------------------------------------------===//
14 
15 using namespace clang;
16 
18 #define LANGOPT(Name, Bits, Default, Description) Name = Default;
19 #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) set##Name(Default);
20 #include "clang/Basic/LangOptions.def"
21 }
22 
24 #define LANGOPT(Name, Bits, Default, Description)
25 #define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
26 #define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
27  Name = Default;
28 #include "clang/Basic/LangOptions.def"
29 
30  // FIXME: This should not be reset; modules can be different with different
31  // sanitizer options (this affects __has_feature(address_sanitizer) etc).
32  Sanitize.clear();
34 
35  CurrentModule.clear();
36  ImplementationOfModule.clear();
37 }
38 
SanitizerSet Sanitize
Set of enabled sanitizers.
Definition: LangOptions.h:79
void resetNonModularOptions()
Reset all of the options that are not considered when building a module.
Definition: LangOptions.cpp:23
std::string CurrentModule
The name of the current module.
Definition: LangOptions.h:96
void clear()
Disable all sanitizers.
Definition: Sanitizers.h:67
Defines the clang::LangOptions interface.
std::string ImplementationOfModule
The name of the module that the translation unit is an implementation of. Prevents semantic imports...
Definition: LangOptions.h:101
std::vector< std::string > SanitizerBlacklistFiles
Paths to blacklist files specifying which objects (files, functions, variables) should not be instrum...
Definition: LangOptions.h:83