Use ValueDecl::isDynamic() instead of getAttrs().hasAttribute<DynamicAttr>()

This commit is contained in:
Slava Pestov
2017-03-29 00:14:45 -07:00
parent 96db387ad3
commit 53759f7126
9 changed files with 35 additions and 36 deletions

View File

@@ -136,7 +136,7 @@ SILGenFunction::emitSiblingMethodRef(SILLocation loc,
// If the method is dynamic, access it through runtime-hookable virtual
// dispatch (viz. objc_msgSend for now).
if (methodConstant.hasDecl()
&& methodConstant.getDecl()->getAttrs().hasAttribute<DynamicAttr>())
&& methodConstant.getDecl()->isDynamic())
methodValue = emitDynamicMethodRef(loc, methodConstant,
SGM.Types.getConstantInfo(methodConstant));
else