aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/SourceManager.cpp3
-rw-r--r--lib/Basic/Targets.cpp15
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index 7d2d0ae17253..ed5eb46c2847 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -347,9 +347,6 @@ FileID SourceManager::createFileID(const ContentCache *File,
SrcMgr::CharacteristicKind FileCharacter,
unsigned PreallocatedID,
unsigned Offset) {
- SLocEntry NewEntry = SLocEntry::get(NextOffset,
- FileInfo::get(IncludePos, File,
- FileCharacter));
if (PreallocatedID) {
// If we're filling in a preallocated ID, just load in the file
// entry and return.
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