From: Tres Popp Date: Tue, 17 Dec 2019 15:05:06 +0000 (-0800) Subject: Replace code with equivalent satisfiesLLVMModule() function call. X-Git-Tag: llvmorg-11-init~1466^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d68fe684e6f8a4012e4d0047df45b6e200244e2;p=platform%2Fupstream%2Fllvm.git Replace code with equivalent satisfiesLLVMModule() function call. This is a general code cleanup and should be a NFC. PiperOrigin-RevId: 285972718 --- diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp index 9201da2..9ac5645 100644 --- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp +++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp @@ -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() && - op.getParentOp()->hasTrait())) + if (op.getParentOp() && !satisfiesLLVMModule(op.getParentOp())) return op.emitOpError("must appear at the module level"); if (auto strAttr = op.getValueOrNull().dyn_cast_or_null()) {