diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
commit | e289d81369914678db386f6aa86faf8f178e245d (patch) | |
tree | 5fb05e9bbab057038b28cf6e4e87696f1c8cc8de /lib/Basic/LangOptions.cpp | |
parent | 8c7f4bca64d5128311ce50449ae9d2048c2ffea4 (diff) |
Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/LangOptions.cpp')
-rw-r--r-- | lib/Basic/LangOptions.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Basic/LangOptions.cpp b/lib/Basic/LangOptions.cpp new file mode 100644 index 0000000000..d29f7774dc --- /dev/null +++ b/lib/Basic/LangOptions.cpp @@ -0,0 +1,21 @@ +//===--- 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" +} |