From c7d0e6525d4bb668f5e0b2586601dc18bfa77f85 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 26 Jun 2009 18:32:06 +0000 Subject: [PATCH] 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 --- clang/lib/CodeGen/CGObjCMac.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 325b2ccaa229..865e8c240be2 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -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 {