1 //===--- LangOptions.cpp - C Language Family Language Options ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the LangOptions class.
12 //===----------------------------------------------------------------------===//
13 #include "clang/Basic/LangOptions.h"
15 using namespace clang;
17 LangOptions::LangOptions() {
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"
23 void LangOptions::resetNonModularOptions() {
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) \
28 #include "clang/Basic/LangOptions.def"
30 // FIXME: This should not be reset; modules can be different with different
31 // sanitizer options (this affects __has_feature(address_sanitizer) etc).
33 SanitizerBlacklistFiles.clear();
35 CurrentModule.clear();
36 ImplementationOfModule.clear();