提交 09acb3e8 编写于 作者: T Tres Popp 提交者: TensorFlower Gardener

Replace code with equivalent satisfiesLLVMModule() function call.

This is a general code cleanup and should be a NFC.

PiperOrigin-RevId: 285972718
Change-Id: Idbcc9664cff11287834b14e7522ddcd78342cfa1
上级 05e0a976
......@@ -1033,9 +1033,7 @@ static LogicalResult verify(GlobalOp op) {
if (!llvm::PointerType::isValidElementType(op.getType().getUnderlyingType()))
return op.emitOpError(
"expects type to be a valid element type for an LLVM pointer");
if (op.getParentOp() &&
!(op.getParentOp()->hasTrait<OpTrait::SymbolTable>() &&
op.getParentOp()->hasTrait<OpTrait::IsIsolatedFromAbove>()))
if (op.getParentOp() && !satisfiesLLVMModule(op.getParentOp()))
return op.emitOpError("must appear at the module level");
if (auto strAttr = op.getValueOrNull().dyn_cast_or_null<StringAttr>()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册