diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-08 15:36:55 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-08 15:36:55 +0000 |
commit | 8ba99c00327a4394e7568244d6cffd6e62625a7a (patch) | |
tree | 7ab9fa5634c95f5df8575db81b24ea5586e65b28 /lib/Basic | |
parent | 70b4596d9d0d559e94f9bad8f43463e5d98a577e (diff) |
Notes
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 3 | ||||
-rw-r--r-- | lib/Basic/Targets.cpp | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 7d2d0ae172537..ed5eb46c2847f 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 120d52543c0c8..b4e32e9d9f371 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 |