Simplify, and fix a possible crash (never happens however, because we don't ever

take this path with non-builtin floating point types).

llvm-svn: 74303
This commit is contained in:
Daniel Dunbar 2009-06-26 18:32:06 +00:00
parent e5ebf02e0e
commit c7d0e6525d
1 changed files with 7 additions and 10 deletions

View File

@ -5014,16 +5014,13 @@ CodeGen::RValue CGObjCNonFragileABIMac::EmitMessageSend(
}
}
else if (!IsSuper && ResultType->isFloatingType()) {
if (const BuiltinType *BT = ResultType->getAsBuiltinType()) {
BuiltinType::Kind k = BT->getKind();
if (k == BuiltinType::LongDouble) {
Fn = ObjCTypes.getMessageSendFpretFixupFn();
Name += "objc_msgSend_fpret_fixup";
}
else {
Fn = ObjCTypes.getMessageSendFixupFn();
Name += "objc_msgSend_fixup";
}
if (ResultType->isSpecificBuiltinType(BuiltinType::LongDouble)) {
Fn = ObjCTypes.getMessageSendFpretFixupFn();
Name += "objc_msgSend_fpret_fixup";
}
else {
Fn = ObjCTypes.getMessageSendFixupFn();
Name += "objc_msgSend_fixup";
}
}
else {