do not store wchar/char16/char32/intmax width/alignment info

into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!

llvm-svn: 86976
This commit is contained in:
Chris Lattner
2009-11-12 08:04:33 +00:00
parent eb9acbfb05
commit 0fb5bbd401
6 changed files with 14 additions and 33 deletions

View File

@@ -364,11 +364,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
DefineTypeSize("__INT_MAX__", TargetInfo::SignedInt, TI, Buf);
DefineTypeSize("__LONG_MAX__", TargetInfo::SignedLong, TI, Buf);
DefineTypeSize("__LONG_LONG_MAX__", TargetInfo::SignedLongLong, TI, Buf);
// FIXME: TI.getWCharWidth() and TI.getTypeWidth(TI.getWCharType()) return
// different values on PIC16 and MSP430. TargetInfo needs to be corrected
// and the following line substituted for the one below it.
// DefineTypeSize("__WCHAR_MAX__", TI.getWCharType(), TI, Buf);
DefineTypeSize("__WCHAR_MAX__", TI.getWCharWidth(), "", true, Buf);
DefineTypeSize("__WCHAR_MAX__", TI.getWCharType(), TI, Buf);
DefineTypeSize("__INTMAX_MAX__", TI.getIntMaxType(), TI, Buf);
DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Buf);