aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/CMakeLists.txt1
-rw-r--r--lib/Basic/LangOptions.cpp21
-rw-r--r--lib/Basic/Targets.cpp2
3 files changed, 23 insertions, 1 deletions
diff --git a/lib/Basic/CMakeLists.txt b/lib/Basic/CMakeLists.txt
index c1e7cf6bf9..ff348896e3 100644
--- a/lib/Basic/CMakeLists.txt
+++ b/lib/Basic/CMakeLists.txt
@@ -8,6 +8,7 @@ add_clang_library(clangBasic
FileManager.cpp
FileSystemStatCache.cpp
IdentifierTable.cpp
+ LangOptions.cpp
SourceLocation.cpp
SourceManager.cpp
TargetInfo.cpp
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"
+}
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 206ff65df5..6a6030f518 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -89,7 +89,7 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))");
// Darwin defines __strong even in C mode (just to nothing).
- if (Opts.getGCMode() != LangOptions::NonGC)
+ if (Opts.getGC() != LangOptions::NonGC)
Builder.defineMacro("__strong", "__attribute__((objc_gc(strong)))");
else
Builder.defineMacro("__strong", "");