aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-08 15:36:55 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-08 15:36:55 +0000
commit8ba99c00327a4394e7568244d6cffd6e62625a7a (patch)
tree7ab9fa5634c95f5df8575db81b24ea5586e65b28 /lib/Basic/Targets.cpp
parent70b4596d9d0d559e94f9bad8f43463e5d98a577e (diff)
downloadsrc-8ba99c00327a4394e7568244d6cffd6e62625a7a.tar.gz
src-8ba99c00327a4394e7568244d6cffd6e62625a7a.zip
Notes
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 120d52543c0c..b4e32e9d9f37 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -244,6 +244,11 @@ static void GetDarwinLanguageOptions(LangOptions &Opts,
Opts.ObjCNonFragileABI = 1;
}
+/// GetWindowsLanguageOptions - Set the default language options for Windows.
+static void GetWindowsLanguageOptions(LangOptions &Opts,
+ const char *Triple) {
+ Opts.Microsoft = true;
+}
//===----------------------------------------------------------------------===//
// Specific target implementations.
@@ -924,9 +929,8 @@ public:
WindowsX86_32TargetInfo(const std::string& triple)
: X86_32TargetInfo(triple) {
TLSSupported = false;
- // FIXME: Fix wchar_t.
- // FIXME: We should probably enable -fms-extensions by default for
- // this target.
+ WCharType = SignedShort;
+ WCharWidth = WCharAlign = 16;
}
virtual void getTargetDefines(const LangOptions &Opts,
std::vector<char> &Defines) const {
@@ -938,6 +942,11 @@ public:
Define(Defines, "_X86_");
Define(Defines, "__MSVCRT__");
}
+
+ virtual void getDefaultLangOptions(LangOptions &Opts) {
+ X86_32TargetInfo::getDefaultLangOptions(Opts);
+ GetWindowsLanguageOptions(Opts, getTargetTriple());
+ }
};
} // end anonymous namespace