2011-09-14 01:21:33 +08:00
|
|
|
//===--- 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"
|
|
|
|
}
|
2011-09-14 04:44:41 +08:00
|
|
|
|
|
|
|
void LangOptions::resetNonModularOptions() {
|
|
|
|
#define LANGOPT(Name, Bits, Default, Description)
|
|
|
|
#define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
|
2011-09-15 22:56:27 +08:00
|
|
|
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
|
|
|
|
Name = Default;
|
|
|
|
#include "clang/Basic/LangOptions.def"
|
2013-01-18 19:30:38 +08:00
|
|
|
|
2013-02-07 09:09:29 +08:00
|
|
|
// FIXME: This should not be reset; modules can be different with different
|
|
|
|
// sanitizer options (this affects __has_feature(address_sanitizer) etc).
|
2014-10-31 03:33:44 +08:00
|
|
|
Sanitize.clear();
|
2015-02-05 01:40:08 +08:00
|
|
|
SanitizerBlacklistFiles.clear();
|
2013-01-18 19:30:38 +08:00
|
|
|
|
2011-11-16 03:35:01 +08:00
|
|
|
CurrentModule.clear();
|
2014-07-23 23:30:23 +08:00
|
|
|
ImplementationOfModule.clear();
|
2011-09-14 04:44:41 +08:00
|
|
|
}
|
|
|
|
|