[flang-commits] [flang] bbc74a1 - [fir][NFC] rename canBePointerOrHeapElementType to cannotBePointerOrHeapElementType
Valentin Clement via flang-commits
flang-commits at lists.llvm.org
Thu Sep 23 09:50:02 PDT 2021
Author: Valentin Clement
Date: 2021-09-23T18:49:41+02:00
New Revision: bbc74a11bc15f4ce962ac7f915309145dcfc2582
URL: https://github.com/llvm/llvm-project/commit/bbc74a11bc15f4ce962ac7f915309145dcfc2582
DIFF: https://github.com/llvm/llvm-project/commit/bbc74a11bc15f4ce962ac7f915309145dcfc2582.diff
LOG: [fir][NFC] rename canBePointerOrHeapElementType to cannotBePointerOrHeapElementType
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
Added:
Modified:
flang/lib/Optimizer/Dialect/FIRType.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/Dialect/FIRType.cpp b/flang/lib/Optimizer/Dialect/FIRType.cpp
index 57d202014e4eb..2030e0b669998 100644
--- a/flang/lib/Optimizer/Dialect/FIRType.cpp
+++ b/flang/lib/Optimizer/Dialect/FIRType.cpp
@@ -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>();
@@ -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();
@@ -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();
}
More information about the flang-commits
mailing list