1e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//===--- LangOptions.cpp - C Language Family Language Options ---*- C++ -*-===//
2e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//
3e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//                     The LLVM Compiler Infrastructure
4e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//
5e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor// This file is distributed under the University of Illinois Open Source
6e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor// License. See LICENSE.TXT for details.
7e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//
8e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//===----------------------------------------------------------------------===//
9e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//
10e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//  This file defines the LangOptions class.
11e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//
12e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor//===----------------------------------------------------------------------===//
13e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor#include "clang/Basic/LangOptions.h"
14e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor
15e289d81369914678db386f6aa86faf8f178e245dDouglas Gregorusing namespace clang;
16e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor
17e289d81369914678db386f6aa86faf8f178e245dDouglas GregorLangOptions::LangOptions() {
18e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor#define LANGOPT(Name, Bits, Default, Description) Name = Default;
19e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) set##Name(Default);
20e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor#include "clang/Basic/LangOptions.def"
21e289d81369914678db386f6aa86faf8f178e245dDouglas Gregor}
221c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregor
231c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregorvoid LangOptions::resetNonModularOptions() {
241c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregor#define LANGOPT(Name, Bits, Default, Description)
251c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregor#define BENIGN_LANGOPT(Name, Bits, Default, Description) Name = Default;
260f50b08940ea0a9a44f2715f49ccf6bc64b95491Douglas Gregor#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
270f50b08940ea0a9a44f2715f49ccf6bc64b95491Douglas Gregor  Name = Default;
280f50b08940ea0a9a44f2715f49ccf6bc64b95491Douglas Gregor#include "clang/Basic/LangOptions.def"
29b86b8dc7ef89405205f94635c1073cdb1a7093ebDouglas Gregor
30b86b8dc7ef89405205f94635c1073cdb1a7093ebDouglas Gregor  CurrentModule.clear();
311c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregor}
321c7e0472f5683a8ade62285f366637050cf113e5Douglas Gregor
33