forked from OSchip/llvm-project
Revert r151357. That unreachable is reachable...
llvm-svn: 151359
This commit is contained in:
parent
69d7a91334
commit
4ed840421d
|
@ -499,24 +499,21 @@ double FloatingLiteral::getValueAsApproximateDouble() const {
|
||||||
return V.convertToDouble();
|
return V.convertToDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
int StringLiteral::mapCharByteWidth(TargetInfo const &Target,
|
int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) {
|
||||||
StringKind Kind) {
|
|
||||||
int CharByteWidth;
|
int CharByteWidth;
|
||||||
switch(Kind) {
|
switch(k) {
|
||||||
case Ascii:
|
case Ascii:
|
||||||
case UTF8:
|
case UTF8:
|
||||||
CharByteWidth = Target.getCharWidth();
|
CharByteWidth = target.getCharWidth();
|
||||||
break;
|
break;
|
||||||
case Wide:
|
case Wide:
|
||||||
CharByteWidth = Target.getWCharWidth();
|
CharByteWidth = target.getWCharWidth();
|
||||||
break;
|
break;
|
||||||
case UTF16:
|
case UTF16:
|
||||||
CharByteWidth = Target.getChar16Width();
|
CharByteWidth = target.getChar16Width();
|
||||||
break;
|
break;
|
||||||
case UTF32:
|
case UTF32:
|
||||||
CharByteWidth = Target.getChar32Width();
|
CharByteWidth = target.getChar32Width();
|
||||||
default:
|
|
||||||
llvm_unreachable("Don't know byte width of this string kind!");
|
|
||||||
}
|
}
|
||||||
assert((CharByteWidth & 7) == 0 && "Assumes character size is byte multiple");
|
assert((CharByteWidth & 7) == 0 && "Assumes character size is byte multiple");
|
||||||
CharByteWidth /= 8;
|
CharByteWidth /= 8;
|
||||||
|
|
Loading…
Reference in New Issue