Skip to content

Commit 88b84f4

Browse files
SC llvm teamSC llvm team
SC llvm team
authored and
SC llvm team
committed
Merged main:16b8c9608f20 into amd-gfx:eb2567585b87
Local branch amd-gfx eb25675 Merged main:738c3ede315a into amd-gfx:2fa5a20ffe88 Remote branch main 16b8c96 [libc++][format] Fixes formatting code units as integers. (llvm#73396)
2 parents eb25675 + 16b8c96 commit 88b84f4

File tree

186 files changed

+8328
-731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+8328
-731
lines changed

.github/workflows/sync-release-repo.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

clang/lib/Format/ContinuationIndenter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,8 +1208,10 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
12081208

12091209
// Indentation of the statement following a Verilog case label is taken care
12101210
// of in moveStateToNextToken.
1211-
if (Style.isVerilog() && Keywords.isVerilogEndOfLabel(Previous))
1211+
if (Style.isVerilog() && PreviousNonComment &&
1212+
Keywords.isVerilogEndOfLabel(*PreviousNonComment)) {
12121213
return State.FirstIndent;
1214+
}
12131215

12141216
if (Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths &&
12151217
State.Line->First->is(tok::kw_enum)) {
@@ -1612,6 +1614,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State,
16121614
State.NextToken->MustBreakBefore &&
16131615
Keywords.isVerilogEndOfLabel(Current)) {
16141616
State.FirstIndent += Style.IndentWidth;
1617+
CurrentState.Indent = State.FirstIndent;
16151618
}
16161619

16171620
unsigned Penalty =

clang/lib/Format/FormatTokenLexer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ void FormatTokenLexer::tryMergePreviousTokens() {
253253
TT_BinaryOperator)) {
254254
return;
255255
}
256-
// Module paths in specify blocks and implications in properties.
256+
// Module paths in specify blocks and the implication and boolean equality
257+
// operators.
257258
if (tryMergeTokensAny({{tok::plusequal, tok::greater},
258259
{tok::plus, tok::star, tok::greater},
259260
{tok::minusequal, tok::greater},
@@ -265,7 +266,8 @@ void FormatTokenLexer::tryMergePreviousTokens() {
265266
{tok::pipe, tok::arrow},
266267
{tok::hash, tok::minus, tok::hash},
267268
{tok::hash, tok::equal, tok::hash}},
268-
TT_BinaryOperator)) {
269+
TT_BinaryOperator) ||
270+
Tokens.back()->is(tok::arrow)) {
269271
Tokens.back()->ForcedPrecedence = prec::Comma;
270272
return;
271273
}

clang/lib/Format/TokenAnnotator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,9 @@ class AnnotatingParser {
20282028
} else if (Current.is(tok::arrow) &&
20292029
Style.Language == FormatStyle::LK_Java) {
20302030
Current.setType(TT_TrailingReturnArrow);
2031+
} else if (Current.is(tok::arrow) && Style.isVerilog()) {
2032+
// The implication operator.
2033+
Current.setType(TT_BinaryOperator);
20312034
} else if (Current.is(tok::arrow) && AutoFound &&
20322035
Line.MightBeFunctionDecl && Current.NestingLevel == 0 &&
20332036
!Current.Previous->isOneOf(tok::kw_operator, tok::identifier)) {
@@ -4717,6 +4720,9 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line,
47174720
(Left.is(TT_VerilogNumberBase) && Right.is(tok::numeric_constant))) {
47184721
return false;
47194722
}
4723+
// Add spaces around the implication operator `->`.
4724+
if (Left.is(tok::arrow) || Right.is(tok::arrow))
4725+
return true;
47204726
// Don't add spaces between two at signs. Like in a coverage event.
47214727
// Don't add spaces between at and a sensitivity list like
47224728
// `@(posedge clk)`.

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class DSAStackTy {
161161
LoopControlVariablesMapTy LCVMap;
162162
DefaultDataSharingAttributes DefaultAttr = DSA_unspecified;
163163
SourceLocation DefaultAttrLoc;
164-
DefaultmapInfo DefaultmapMap[OMPC_DEFAULTMAP_unknown];
164+
DefaultmapInfo DefaultmapMap[OMPC_DEFAULTMAP_unknown + 1];
165165
OpenMPDirectiveKind Directive = OMPD_unknown;
166166
/// GenericLoopDirective with bind clause is mapped to other directives,
167167
/// like for, distribute and simd. Presently, set MappedDirective to
@@ -3689,7 +3689,7 @@ class DSAAttrChecker final : public StmtVisitor<DSAAttrChecker, void> {
36893689
bool ErrorFound = false;
36903690
bool TryCaptureCXXThisMembers = false;
36913691
CapturedStmt *CS = nullptr;
3692-
const static unsigned DefaultmapKindNum = OMPC_DEFAULTMAP_pointer + 1;
3692+
const static unsigned DefaultmapKindNum = OMPC_DEFAULTMAP_unknown + 1;
36933693
llvm::SmallVector<Expr *, 4> ImplicitFirstprivate;
36943694
llvm::SmallVector<Expr *, 4> ImplicitPrivate;
36953695
llvm::SmallVector<Expr *, 4> ImplicitMap[DefaultmapKindNum][OMPC_MAP_delete];
@@ -6276,7 +6276,7 @@ StmtResult Sema::ActOnOpenMPExecutableDirective(
62766276
SmallVector<Expr *, 4> ImplicitPrivates(
62776277
DSAChecker.getImplicitPrivate().begin(),
62786278
DSAChecker.getImplicitPrivate().end());
6279-
const unsigned DefaultmapKindNum = OMPC_DEFAULTMAP_pointer + 1;
6279+
const unsigned DefaultmapKindNum = OMPC_DEFAULTMAP_unknown + 1;
62806280
SmallVector<Expr *, 4> ImplicitMaps[DefaultmapKindNum][OMPC_MAP_delete];
62816281
SmallVector<OpenMPMapModifierKind, NumberOfOMPMapClauseModifiers>
62826282
ImplicitMapModifiers[DefaultmapKindNum];

clang/test/OpenMP/target_ast_print.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,8 @@ T tmain(T argc, T *argv) {
11101110
foo();
11111111
#pragma omp target thread_limit(C)
11121112
foo();
1113+
#pragma omp target defaultmap(present)
1114+
foo();
11131115

11141116
return 0;
11151117
}
@@ -1123,6 +1125,8 @@ T tmain(T argc, T *argv) {
11231125
// OMP51-NEXT: foo()
11241126
// OMP51-NEXT: #pragma omp target thread_limit(C)
11251127
// OMP51-NEXT: foo()
1128+
// OMP51-NEXT: #pragma omp target defaultmap(present)
1129+
// OMP51-NEXT: foo()
11261130

11271131
// OMP51-LABEL: int main(int argc, char **argv) {
11281132
int main (int argc, char **argv) {

clang/unittests/Format/FormatTestVerilog.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,20 @@ TEST_F(FormatTestVerilog, Case) {
344344
" longfunction( //\n"
345345
" arg);\n"
346346
"endcase");
347+
verifyFormat("case (data)\n"
348+
" 16'd0:\n"
349+
" //\n"
350+
" result = //\n"
351+
" 10'b0111111111;\n"
352+
"endcase");
353+
verifyFormat("case (data)\n"
354+
" 16'd0:\n"
355+
" //\n"
356+
"\n"
357+
" //\n"
358+
" result = //\n"
359+
" 10'b0111111111;\n"
360+
"endcase");
347361
Style = getDefaultStyle();
348362
Style.ContinuationIndentWidth = 1;
349363
verifyFormat("case (data)\n"
@@ -1005,7 +1019,7 @@ TEST_F(FormatTestVerilog, Operators) {
10051019
verifyFormat("x = x ^~ x;");
10061020
verifyFormat("x = x && x;");
10071021
verifyFormat("x = x || x;");
1008-
verifyFormat("x = x->x;");
1022+
verifyFormat("x = x -> x;");
10091023
verifyFormat("x = x <-> x;");
10101024
verifyFormat("x += x;");
10111025
verifyFormat("x -= x;");

clang/unittests/Format/TokenAnnotatorTest.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,17 +1980,18 @@ TEST_F(TokenAnnotatorTest, UnderstandsVerilogOperators) {
19801980
// joined operators, we don't have a separate type, so we only test for their
19811981
// precedence.
19821982
std::pair<prec::Level, std::string> JoinedBinary[] = {
1983-
{prec::Comma, "<->"}, {prec::Assignment, "+="},
1984-
{prec::Assignment, "-="}, {prec::Assignment, "*="},
1985-
{prec::Assignment, "/="}, {prec::Assignment, "%="},
1986-
{prec::Assignment, "&="}, {prec::Assignment, "^="},
1987-
{prec::Assignment, "<<="}, {prec::Assignment, ">>="},
1988-
{prec::Assignment, "<<<="}, {prec::Assignment, ">>>="},
1989-
{prec::LogicalOr, "||"}, {prec::LogicalAnd, "&&"},
1990-
{prec::Equality, "=="}, {prec::Equality, "!="},
1991-
{prec::Equality, "==="}, {prec::Equality, "!=="},
1992-
{prec::Equality, "==?"}, {prec::Equality, "!=?"},
1993-
{prec::ExclusiveOr, "~^"}, {prec::ExclusiveOr, "^~"},
1983+
{prec::Comma, "->"}, {prec::Comma, "<->"},
1984+
{prec::Assignment, "+="}, {prec::Assignment, "-="},
1985+
{prec::Assignment, "*="}, {prec::Assignment, "/="},
1986+
{prec::Assignment, "%="}, {prec::Assignment, "&="},
1987+
{prec::Assignment, "^="}, {prec::Assignment, "<<="},
1988+
{prec::Assignment, ">>="}, {prec::Assignment, "<<<="},
1989+
{prec::Assignment, ">>>="}, {prec::LogicalOr, "||"},
1990+
{prec::LogicalAnd, "&&"}, {prec::Equality, "=="},
1991+
{prec::Equality, "!="}, {prec::Equality, "==="},
1992+
{prec::Equality, "!=="}, {prec::Equality, "==?"},
1993+
{prec::Equality, "!=?"}, {prec::ExclusiveOr, "~^"},
1994+
{prec::ExclusiveOr, "^~"},
19941995
};
19951996
for (auto Operator : JoinedBinary) {
19961997
auto Tokens = Annotate(std::string("x = x ") + Operator.second + " x;");

flang/include/flang/Lower/ConvertExpr.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,6 @@ mlir::Value createSubroutineCall(AbstractConverter &converter,
225225
SymMap &symMap, StatementContext &stmtCtx,
226226
bool isUserDefAssignment);
227227

228-
// Attribute for an alloca that is a trivial adaptor for converting a value to
229-
// pass-by-ref semantics for a VALUE parameter. The optimizer may be able to
230-
// eliminate these.
231-
inline mlir::NamedAttribute getAdaptToByRefAttr(fir::FirOpBuilder &builder) {
232-
return {mlir::StringAttr::get(builder.getContext(),
233-
fir::getAdaptToByRefAttrName()),
234-
builder.getUnitAttr()};
235-
}
236-
237228
mlir::Value addCrayPointerInst(mlir::Location loc, fir::FirOpBuilder &builder,
238229
mlir::Value ptrVal, mlir::Type ptrTy,
239230
mlir::Type pteTy);

flang/include/flang/Optimizer/Builder/HLFIRTools.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ fir::FortranVariableOpInterface genDeclare(mlir::Location loc,
239239
/// Generate an hlfir.associate to build a variable from an expression value.
240240
/// The type of the variable must be provided so that scalar logicals are
241241
/// properly typed when placed in memory.
242-
hlfir::AssociateOp genAssociateExpr(mlir::Location loc,
243-
fir::FirOpBuilder &builder,
244-
hlfir::Entity value,
245-
mlir::Type variableType,
246-
llvm::StringRef name);
242+
hlfir::AssociateOp
243+
genAssociateExpr(mlir::Location loc, fir::FirOpBuilder &builder,
244+
hlfir::Entity value, mlir::Type variableType,
245+
llvm::StringRef name,
246+
std::optional<mlir::NamedAttribute> attr = std::nullopt);
247247

248248
/// Get the raw address of a variable (simple fir.ref/fir.ptr, or fir.heap
249249
/// value). The returned value should be used with care, it does not contain any

flang/include/flang/Optimizer/Dialect/FIROps.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ mlir::ParseResult parseSelector(mlir::OpAsmParser &parser,
3838
mlir::OpAsmParser::UnresolvedOperand &selector,
3939
mlir::Type &type);
4040

41-
static constexpr llvm::StringRef getAdaptToByRefAttrName() {
42-
return "adapt.valuebyref";
43-
}
44-
4541
static constexpr llvm::StringRef getNormalizedLowerBoundAttrName() {
4642
return "normalized.lb";
4743
}

flang/include/flang/Optimizer/Dialect/FIROpsSupport.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ inline std::optional<std::int64_t> getIntIfConstant(mlir::Value value) {
141141
return {};
142142
}
143143

144+
static constexpr llvm::StringRef getAdaptToByRefAttrName() {
145+
return "adapt.valuebyref";
146+
}
147+
148+
// Attribute for an alloca that is a trivial adaptor for converting a value to
149+
// pass-by-ref semantics for a VALUE parameter. The optimizer may be able to
150+
// eliminate these.
151+
// Template is used to avoid compiler errors in places that don't include
152+
// FIRBuilder.h
153+
template <typename Builder>
154+
inline mlir::NamedAttribute getAdaptToByRefAttr(Builder &builder) {
155+
return {mlir::StringAttr::get(builder.getContext(),
156+
fir::getAdaptToByRefAttrName()),
157+
builder.getUnitAttr()};
158+
}
159+
144160
} // namespace fir
145161

146162
#endif // FORTRAN_OPTIMIZER_DIALECT_FIROPSSUPPORT_H

flang/include/flang/Optimizer/HLFIR/HLFIROps.td

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def hlfir_AssociateOp : hlfir_Op<"associate", [AttrSizedOperandSegments,
660660
AnyFortranValue:$source,
661661
Optional<AnyShapeOrShiftType>:$shape,
662662
Variadic<AnyIntegerType>:$typeparams,
663-
Builtin_StringAttr:$uniq_name,
663+
OptionalAttr<Builtin_StringAttr>:$uniq_name,
664664
OptionalAttr<fir_FortranVariableFlagsAttr>:$fortran_attrs
665665
);
666666

@@ -672,9 +672,13 @@ def hlfir_AssociateOp : hlfir_Op<"associate", [AttrSizedOperandSegments,
672672
}];
673673

674674
let builders = [
675-
OpBuilder<(ins "mlir::Value":$source, "llvm::StringRef":$uniq_name,
675+
OpBuilder<(ins "mlir::Value":$source, CArg<"llvm::StringRef", "{}">:$uniq_name,
676676
CArg<"mlir::Value", "{}">:$shape, CArg<"mlir::ValueRange", "{}">:$typeparams,
677-
CArg<"fir::FortranVariableFlagsAttr", "{}">:$fortran_attrs)>];
677+
CArg<"fir::FortranVariableFlagsAttr", "{}">:$fortran_attrs)>,
678+
OpBuilder<(ins "mlir::Value":$memref, CArg<"mlir::Value", "{}">:$shape,
679+
CArg<"mlir::ValueRange", "{}">:$typeparams,
680+
CArg<"fir::FortranVariableFlagsAttr", "{}">:$fortran_attrs,
681+
CArg<"llvm::ArrayRef<mlir::NamedAttribute>", "{}">:$attributes)>];
678682

679683
let extraClassDeclaration = [{
680684
/// Override FortranVariableInterface default implementation

flang/lib/Lower/Bridge.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,10 +2083,10 @@ class FirConverter : public Fortran::lower::AbstractConverter {
20832083
assert(sym && "There must be a symbol to bind");
20842084
mlir::Type toTy = genType(*sym);
20852085
// FIXME: this should be a "per iteration" temporary.
2086-
mlir::Value tmp = builder->createTemporary(
2087-
loc, toTy, toStringRef(sym->name()),
2088-
llvm::ArrayRef<mlir::NamedAttribute>{
2089-
Fortran::lower::getAdaptToByRefAttr(*builder)});
2086+
mlir::Value tmp =
2087+
builder->createTemporary(loc, toTy, toStringRef(sym->name()),
2088+
llvm::ArrayRef<mlir::NamedAttribute>{
2089+
fir::getAdaptToByRefAttr(*builder)});
20902090
mlir::Value cast = builder->createConvert(loc, toTy, inducVar);
20912091
builder->create<fir::StoreOp>(loc, cast, tmp);
20922092
addSymbol(*sym, tmp, /*force=*/true);

flang/lib/Lower/ConvertCall.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "flang/Lower/ConvertCall.h"
1414
#include "flang/Lower/Allocatable.h"
15+
#include "flang/Lower/ConvertExpr.h"
1516
#include "flang/Lower/ConvertExprToHLFIR.h"
1617
#include "flang/Lower/ConvertVariable.h"
1718
#include "flang/Lower/CustomIntrinsicCall.h"
@@ -958,8 +959,9 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
958959
// Make a copy in a temporary.
959960
auto copy = builder.create<hlfir::AsExprOp>(loc, entity);
960961
mlir::Type storageType = entity.getType();
962+
mlir::NamedAttribute byRefAttr = fir::getAdaptToByRefAttr(builder);
961963
hlfir::AssociateOp associate = hlfir::genAssociateExpr(
962-
loc, builder, hlfir::Entity{copy}, storageType, "adapt.valuebyref");
964+
loc, builder, hlfir::Entity{copy}, storageType, "", byRefAttr);
963965
entity = hlfir::Entity{associate.getBase()};
964966
// Register the temporary destruction after the call.
965967
preparedDummy.pushExprAssociateCleanUp(associate);
@@ -986,8 +988,9 @@ static PreparedDummyArgument preparePresentUserCallActualArgument(
986988
// The actual is an expression value, place it into a temporary
987989
// and register the temporary destruction after the call.
988990
mlir::Type storageType = converter.genType(expr);
991+
mlir::NamedAttribute byRefAttr = fir::getAdaptToByRefAttr(builder);
989992
hlfir::AssociateOp associate = hlfir::genAssociateExpr(
990-
loc, builder, entity, storageType, "adapt.valuebyref");
993+
loc, builder, entity, storageType, "", byRefAttr);
991994
entity = hlfir::Entity{associate.getBase()};
992995
preparedDummy.pushExprAssociateCleanUp(associate);
993996
if (mustSetDynamicTypeToDummyType) {
@@ -1395,8 +1398,9 @@ static std::optional<hlfir::EntityWithAttributes> genCustomIntrinsicRefCore(
13951398
CallContext &callContext) {
13961399
auto &builder = callContext.getBuilder();
13971400
const auto &loc = callContext.loc;
1398-
assert(intrinsic && Fortran::lower::intrinsicRequiresCustomOptionalHandling(
1399-
callContext.procRef, *intrinsic, callContext.converter));
1401+
assert(intrinsic &&
1402+
Fortran::lower::intrinsicRequiresCustomOptionalHandling(
1403+
callContext.procRef, *intrinsic, callContext.converter));
14001404

14011405
// helper to get a particular prepared argument
14021406
auto getArgument = [&](std::size_t i, bool loadArg) -> fir::ExtendedValue {

flang/lib/Lower/ConvertExpr.cpp

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,7 @@ placeScalarValueInMemory(fir::FirOpBuilder &builder, mlir::Location loc,
358358
mlir::Value val = builder.createConvert(loc, storageType, valBase);
359359
mlir::Value temp = builder.createTemporary(
360360
loc, storageType,
361-
llvm::ArrayRef<mlir::NamedAttribute>{
362-
Fortran::lower::getAdaptToByRefAttr(builder)});
361+
llvm::ArrayRef<mlir::NamedAttribute>{fir::getAdaptToByRefAttr(builder)});
363362
builder.create<fir::StoreOp>(loc, val, temp);
364363
return fir::substBase(exv, temp);
365364
}
@@ -2401,19 +2400,18 @@ class ScalarExprLowering {
24012400
mlir::Value len = charBox->getLen();
24022401
mlir::Value zero = builder.createIntegerConstant(loc, len.getType(), 0);
24032402
len = builder.create<mlir::arith::SelectOp>(loc, isPresent, len, zero);
2404-
mlir::Value temp = builder.createTemporary(
2405-
loc, type, /*name=*/{},
2406-
/*shape=*/{}, mlir::ValueRange{len},
2407-
llvm::ArrayRef<mlir::NamedAttribute>{
2408-
Fortran::lower::getAdaptToByRefAttr(builder)});
2403+
mlir::Value temp =
2404+
builder.createTemporary(loc, type, /*name=*/{},
2405+
/*shape=*/{}, mlir::ValueRange{len},
2406+
llvm::ArrayRef<mlir::NamedAttribute>{
2407+
fir::getAdaptToByRefAttr(builder)});
24092408
return fir::CharBoxValue{temp, len};
24102409
}
24112410
assert((fir::isa_trivial(type) || type.isa<fir::RecordType>()) &&
24122411
"must be simple scalar");
2413-
return builder.createTemporary(
2414-
loc, type,
2415-
llvm::ArrayRef<mlir::NamedAttribute>{
2416-
Fortran::lower::getAdaptToByRefAttr(builder)});
2412+
return builder.createTemporary(loc, type,
2413+
llvm::ArrayRef<mlir::NamedAttribute>{
2414+
fir::getAdaptToByRefAttr(builder)});
24172415
}
24182416

24192417
template <typename A>
@@ -4752,10 +4750,10 @@ class ArrayExprLowering {
47524750
} else {
47534751
// Store scalar value in a temp to fulfill VALUE attribute.
47544752
mlir::Value val = fir::getBase(asScalar(*expr));
4755-
mlir::Value temp = builder.createTemporary(
4756-
loc, val.getType(),
4757-
llvm::ArrayRef<mlir::NamedAttribute>{
4758-
Fortran::lower::getAdaptToByRefAttr(builder)});
4753+
mlir::Value temp =
4754+
builder.createTemporary(loc, val.getType(),
4755+
llvm::ArrayRef<mlir::NamedAttribute>{
4756+
fir::getAdaptToByRefAttr(builder)});
47594757
builder.create<fir::StoreOp>(loc, val, temp);
47604758
operands.emplace_back(
47614759
[=](IterSpace iters) -> ExtValue { return temp; });
@@ -5843,10 +5841,10 @@ class ArrayExprLowering {
58435841
base = builder.create<fir::ArrayFetchOp>(
58445842
loc, eleTy, arrLd, iters.iterVec(), arrLdTypeParams);
58455843
}
5846-
mlir::Value temp = builder.createTemporary(
5847-
loc, base.getType(),
5848-
llvm::ArrayRef<mlir::NamedAttribute>{
5849-
Fortran::lower::getAdaptToByRefAttr(builder)});
5844+
mlir::Value temp =
5845+
builder.createTemporary(loc, base.getType(),
5846+
llvm::ArrayRef<mlir::NamedAttribute>{
5847+
fir::getAdaptToByRefAttr(builder)});
58505848
builder.create<fir::StoreOp>(loc, base, temp);
58515849
return fir::factory::arraySectionElementToExtendedValue(
58525850
builder, loc, extMemref, temp, slice);

0 commit comments

Comments
 (0)