aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r--lib/Basic/TargetInfo.cpp10
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;
+ }
+}
//===----------------------------------------------------------------------===//