diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2009-11-05 20:14:16 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2009-11-05 20:14:16 +0000 |
commit | a6fda124bf380479529d6a80b84b62cacd3cb707 (patch) | |
tree | 05d3c1f3783965c416f1930a64ea46d0cd5b5124 /lib/Basic/TargetInfo.cpp | |
parent | c2f38827ba0b868ec093741799ba74fa9ab6a16b (diff) |
Adding -fshort-wchar option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r-- | lib/Basic/TargetInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 12caf0c8e5..e965b9aec3 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/LangOptions.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/STLExtras.h" #include <cstdlib> @@ -124,6 +125,15 @@ bool TargetInfo::isTypeSigned(IntType T) const { }; } +/// setForcedLangOptions - Set forced language options. +/// Apply changes to the target information with respect to certain +/// language options which change the target configuration. +void TargetInfo::setForcedLangOptions(LangOptions &Opts) { + if (Opts.ShortWChar) { + WCharType = UnsignedShort; + WCharWidth = WCharAlign = 16; + } +} //===----------------------------------------------------------------------===// |