aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Lower/Bridge.cpp
diff options
context:
space:
mode:
authorKiran Chandramohan <kiran.chandramohan@arm.com>2023-11-07 11:50:24 +0000
committerKiran Chandramohan <kiran.chandramohan@arm.com>2023-11-07 11:50:24 +0000
commitba116ff41d525a4b6c931664f1b4437a7dd55b1d (patch)
tree1fc6853e8c4a6ce309fe86c79946f2fb1b0861a6 /flang/lib/Lower/Bridge.cpp
parent192bee0db1dfb8b2f570031102a2326037b75fa1 (diff)
downloadllvm-ba116ff41d525a4b6c931664f1b4437a7dd55b1d.zip
llvm-ba116ff41d525a4b6c931664f1b4437a7dd55b1d.tar.gz
llvm-ba116ff41d525a4b6c931664f1b4437a7dd55b1d.tar.bz2
Revert "[Flang][OpenMP] Fix to support privatisation of alloc strings (#71204)"
This reverts commit 192bee0db1dfb8b2f570031102a2326037b75fa1. Reverting to fix the CI. https://lab.llvm.org/buildbot/#/builders/21/builds/84995
Diffstat (limited to 'flang/lib/Lower/Bridge.cpp')
-rw-r--r--flang/lib/Lower/Bridge.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 8eb5e68..9875e37 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -677,27 +677,18 @@ public:
if (auto seqTy = symType.dyn_cast<fir::SequenceType>()) {
fir::ExtendedValue read = fir::factory::genMutableBoxRead(
*builder, loc, box, /*mayBePolymorphic=*/false);
- if (auto read_arr_box = read.getBoxOf<fir::ArrayBoxValue>()) {
- fir::factory::genInlinedAllocation(
- *builder, loc, *new_box, read_arr_box->getLBounds(),
- read_arr_box->getExtents(),
- /*lenParams=*/std::nullopt, name,
- /*mustBeHeap=*/true);
- } else if (auto read_char_arr_box =
- read.getBoxOf<fir::CharArrayBoxValue>()) {
- fir::factory::genInlinedAllocation(
- *builder, loc, *new_box, read_char_arr_box->getLBounds(),
- read_char_arr_box->getExtents(),
- read_char_arr_box->getLen(), name,
- /*mustBeHeap=*/true);
- } else {
- TODO(loc, "Unhandled allocatable box type");
- }
+ auto read_box = read.getBoxOf<fir::ArrayBoxValue>();
+ fir::factory::genInlinedAllocation(
+ *builder, loc, *new_box, read_box->getLBounds(),
+ read_box->getExtents(),
+ /*lenParams=*/std::nullopt, name,
+ /*mustBeHeap=*/true);
} else {
fir::factory::genInlinedAllocation(
- *builder, loc, *new_box, box.getMutableProperties().lbounds,
- box.getMutableProperties().extents,
- box.nonDeferredLenParams(), name,
+ *builder, loc, *new_box,
+ new_box->getMutableProperties().lbounds,
+ new_box->getMutableProperties().extents,
+ /*lenParams=*/std::nullopt, name,
/*mustBeHeap=*/true);
}
});