File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -422,6 +422,18 @@ getProtocolRefsList(llvm::Constant *protocol) {
422422 if (objCProtocolList->isNullValue ()) {
423423 return std::make_pair (0 , nullptr );
424424 }
425+
426+ if (!protocol->getContext ().supportsTypedPointers ()) {
427+ auto protocolRefsVar = cast<llvm::GlobalVariable>(objCProtocolList);
428+ auto sizeListPair =
429+ cast<llvm::ConstantStruct>(protocolRefsVar->getInitializer ());
430+ auto size =
431+ cast<llvm::ConstantInt>(sizeListPair->getOperand (0 ))->getZExtValue ();
432+ auto protocolRefsList =
433+ cast<llvm::ConstantArray>(sizeListPair->getOperand (1 ));
434+ return std::make_pair (size, protocolRefsList);
435+ }
436+
425437 auto bitcast = cast<llvm::ConstantExpr>(objCProtocolList);
426438 assert (bitcast->getOpcode () == llvm::Instruction::BitCast);
427439 auto protocolRefsVar = cast<llvm::GlobalVariable>(bitcast->getOperand (0 ));
You can’t perform that action at this time.
0 commit comments