[NFC] Adopt FuncOp::isPublic() and friends
PiperOrigin-RevId: 317335755 Change-Id: I6f1b25798150bb3a255d4572831d3be4747d28c7
This commit is contained in:
parent
fbf407383c
commit
1332b9365e
@ -231,12 +231,12 @@ static LogicalResult VerifySavedModelModule(
|
||||
for (auto func : module.getOps<FuncOp>()) {
|
||||
const bool is_exported = IsExported(func);
|
||||
|
||||
if (is_exported && func.getVisibility() != FuncOp::Visibility::Public) {
|
||||
if (is_exported && !func.isPublic()) {
|
||||
return func.emitError()
|
||||
<< "exported function @" << func.getName() << " should be public";
|
||||
}
|
||||
|
||||
if (!is_exported && func.getVisibility() == FuncOp::Visibility::Public) {
|
||||
if (!is_exported && func.isPublic()) {
|
||||
return func.emitError() << "non-exported function @" << func.getName()
|
||||
<< " should be private";
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ LogicalResult HandlePartitionedCallOp(
|
||||
}
|
||||
llvm::SmallDenseMap<Value, Value> callee_map;
|
||||
FuncOp lowered_callee = callee;
|
||||
if (callee.getVisibility() != SymbolTable::Visibility::Private) {
|
||||
if (!callee.isPrivate()) {
|
||||
// Clone non-private callee in case of signature change.
|
||||
lowered_callee = callee.clone();
|
||||
lowered_callee.setVisibility(SymbolTable::Visibility::Private);
|
||||
|
@ -759,7 +759,7 @@ LogicalResult HandlePartitionedCallOp(
|
||||
return it->getSecond().accumulate_on_write;
|
||||
};
|
||||
FuncOp lowered_callee = callee;
|
||||
if (callee.getVisibility() != SymbolTable::Visibility::Private) {
|
||||
if (!callee.isPrivate()) {
|
||||
// Clone non-private callee in case of signature change.
|
||||
lowered_callee = callee.clone();
|
||||
lowered_callee.setVisibility(SymbolTable::Visibility::Private);
|
||||
|
@ -322,7 +322,7 @@ LogicalResult HandlePartitionedCallOp(
|
||||
// Rewrite the callee.
|
||||
llvm::SmallDenseMap<Value, SizeInfo> callee_map;
|
||||
FuncOp lowered_callee = callee;
|
||||
if (callee.getVisibility() != SymbolTable::Visibility::Private) {
|
||||
if (!callee.isPrivate()) {
|
||||
// Clone non-private callee in case of signature change.
|
||||
lowered_callee = callee.clone();
|
||||
lowered_callee.setVisibility(SymbolTable::Visibility::Private);
|
||||
|
Loading…
Reference in New Issue
Block a user