Skip to content

Commit

Permalink
[fir][NFC] rename canBePointerOrHeapElementType to cannotBePointerOrH…
Browse files Browse the repository at this point in the history
…eapElementType

This patch is part of the upstreaming effort from fir-dev branch.
Rename the function so the name conveys better what it does.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D110323

Co-authored-by: schweitz
Co-authored-by: jeanPerier
  • Loading branch information
clementval committed Sep 23, 2021
1 parent 1e3c6fc commit bbc74a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flang/lib/Optimizer/Dialect/FIRType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ BoxProcType::verify(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
return emitError() << "invalid type for boxproc" << eleTy << '\n';
}

static bool canBePointerOrHeapElementType(mlir::Type eleTy) {
static bool cannotBePointerOrHeapElementType(mlir::Type eleTy) {
return eleTy.isa<BoxType, BoxCharType, BoxProcType, ShapeType, ShapeShiftType,
SliceType, FieldType, LenType, HeapType, PointerType,
ReferenceType, TypeDescType>();
Expand Down Expand Up @@ -418,7 +418,7 @@ void fir::HeapType::print(mlir::DialectAsmPrinter &printer) const {
mlir::LogicalResult
fir::HeapType::verify(llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
mlir::Type eleTy) {
if (canBePointerOrHeapElementType(eleTy))
if (cannotBePointerOrHeapElementType(eleTy))
return emitError() << "cannot build a heap pointer to type: " << eleTy
<< '\n';
return mlir::success();
Expand Down Expand Up @@ -469,7 +469,7 @@ void fir::PointerType::print(mlir::DialectAsmPrinter &printer) const {
mlir::LogicalResult fir::PointerType::verify(
llvm::function_ref<mlir::InFlightDiagnostic()> emitError,
mlir::Type eleTy) {
if (canBePointerOrHeapElementType(eleTy))
if (cannotBePointerOrHeapElementType(eleTy))
return emitError() << "cannot build a pointer to type: " << eleTy << '\n';
return mlir::success();
}
Expand Down

0 comments on commit bbc74a1

Please sign in to comment.