mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-10 22:43:46 +00:00
Fix breakage after r303461
- Improve wchar_t size predicitions based on target triple. - Be less strict in wchar_t size verifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
204f8c0a24
commit
e60d79f9d7
@ -1521,7 +1521,11 @@ TargetLibraryInfoImpl &TargetLibraryAnalysis::lookupInfoImpl(const Triple &T) {
|
||||
|
||||
unsigned TargetLibraryInfoImpl::getTargetWCharSize(const Triple &T) {
|
||||
// See also clang/lib/Basic/Targets.cpp.
|
||||
return T.isPS4() || T.isOSWindows() || T.getArch() == Triple::xcore ? 2 : 4;
|
||||
if (T.isPS4() || T.isOSWindows() || T.isArch16Bit())
|
||||
return 2;
|
||||
if (T.getArch() == Triple::xcore)
|
||||
return 1;
|
||||
return 4;
|
||||
}
|
||||
|
||||
unsigned TargetLibraryInfoImpl::getWCharSize(const Module &M) const {
|
||||
|
@ -1322,9 +1322,6 @@ Verifier::visitModuleFlag(const MDNode *Op,
|
||||
ConstantInt *Value
|
||||
= mdconst::dyn_extract_or_null<ConstantInt>(Op->getOperand(2));
|
||||
Assert(Value, "wchar_size metadata requires constant integer argument");
|
||||
uint64_t WCharSize = Value->getZExtValue();
|
||||
Assert(WCharSize == 0 || WCharSize == 2 || WCharSize == 4,
|
||||
"wchar_size should be 0, 2 or 4");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user