diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-04 22:54:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-04 22:54:33 +0000 |
commit | 8fc4dfb30e8bd94ca2ea7adb6cbece04fb96cd99 (patch) | |
tree | 863f9eab479214595bfe5b10415dc199806d67b7 /lib/Basic/Targets.cpp | |
parent | 0e50b6e7c104d00614baa3d80df62f1630a94d9c (diff) |
replace useNeXTRuntimeAsDefault with a generic hook that allows targets
to specify their default language options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 71321f19cc..6f563a55c3 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -15,6 +15,7 @@ #include "clang/AST/Builtins.h" #include "clang/AST/TargetBuiltins.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/LangOptions.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/APFloat.h" using namespace clang; @@ -366,7 +367,12 @@ public: getDarwinDefines(Defines, getTargetTriple()); } - virtual bool useNeXTRuntimeAsDefault() const { return true; } + /// getDefaultLangOptions - Allow the target to specify default settings for + /// various language options. These may be overridden by command line + /// options. + virtual void getDefaultLangOptions(LangOptions &Opts) { + Opts.NeXTRuntime = true; + } }; } // end anonymous namespace. @@ -379,7 +385,12 @@ public: getDarwinDefines(Defines, getTargetTriple()); } - virtual bool useNeXTRuntimeAsDefault() const { return true; } + /// getDefaultLangOptions - Allow the target to specify default settings for + /// various language options. These may be overridden by command line + /// options. + virtual void getDefaultLangOptions(LangOptions &Opts) { + Opts.NeXTRuntime = true; + } }; } // end anonymous namespace. @@ -526,7 +537,12 @@ public: X86_32TargetInfo::getTargetDefines(Defines); getDarwinDefines(Defines, getTargetTriple()); } - virtual bool useNeXTRuntimeAsDefault() const { return true; } + /// getDefaultLangOptions - Allow the target to specify default settings for + /// various language options. These may be overridden by command line + /// options. + virtual void getDefaultLangOptions(LangOptions &Opts) { + Opts.NeXTRuntime = true; + } }; } // end anonymous namespace @@ -670,7 +686,12 @@ public: getDarwinDefines(Defines, getTargetTriple()); } - virtual bool useNeXTRuntimeAsDefault() const { return true; } + /// getDefaultLangOptions - Allow the target to specify default settings for + /// various language options. These may be overridden by command line + /// options. + virtual void getDefaultLangOptions(LangOptions &Opts) { + Opts.NeXTRuntime = true; + } }; } // end anonymous namespace. |