diff options
| author | Tres Popp <tpopp@google.com> | 2019-12-17 07:05:06 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-17 07:05:40 -0800 |
| commit | 8d68fe684e6f8a4012e4d0047df45b6e200244e2 (patch) | |
| tree | 1f10d20575183bcaf4105b83f6c41d268c8a56f8 /mlir/lib/Dialect/LLVMIR | |
| parent | 4e825c59be48b602a4790c91df0801138f3cbb6e (diff) | |
| download | bcm5719-llvm-8d68fe684e6f8a4012e4d0047df45b6e200244e2.tar.gz bcm5719-llvm-8d68fe684e6f8a4012e4d0047df45b6e200244e2.zip | |
Replace code with equivalent satisfiesLLVMModule() function call.
This is a general code cleanup and should be a NFC.
PiperOrigin-RevId: 285972718
Diffstat (limited to 'mlir/lib/Dialect/LLVMIR')
| -rw-r--r-- | mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp index 9201da2322b..9ac564599db 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<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>()) { |

