Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.
Emit NeXT OBJC_IMAGE_INFO marker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index c55aa17..089faf1 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -373,6 +373,14 @@
Exceptions("fexceptions",
llvm::cl::desc("Enable support for exception handling."));
+static llvm::cl::opt<bool>
+GNURuntime("fgnu-runtime",
+ llvm::cl::desc("Generate output compatible with the standard GNU Objective-C runtime."));
+
+static llvm::cl::opt<bool>
+NeXTRuntime("fnext-runtime",
+ llvm::cl::desc("Generate output compatible with the NeXT runtime."));
+
// FIXME: add:
// -ansi
// -trigraphs
@@ -439,6 +447,15 @@
Options.WritableStrings = WritableStrings;
Options.LaxVectorConversions = LaxVectorConversions;
Options.Exceptions = Exceptions;
+
+ if (NeXTRuntime) {
+ Options.NeXTRuntime = 1;
+ } else if (GNURuntime) {
+ Options.NeXTRuntime = 0;
+ } else {
+ // FIXME: Should autoselect based on platform.
+ Options.NeXTRuntime = 0;
+ }
}
static llvm::cl::opt<bool>