[cfe-commits] r74303 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jun 26 11:32:06 PDT 2009
Author: ddunbar
Date: Fri Jun 26 13:32:06 2009
New Revision: 74303
URL: http://llvm.org/viewvc/llvm-project?rev=74303&view=rev
Log:
Simplify, and fix a possible crash (never happens however, because we don't ever
take this path with non-builtin floating point types).
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=74303&r1=74302&r2=74303&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Fri Jun 26 13:32:06 2009
@@ -5014,16 +5014,13 @@
}
}
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 {
More information about the cfe-commits
mailing list