[llvm-branch-commits] [flang] [flang] Add traits to more AST nodes (PR #175578)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jan 12 08:23:17 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-openacc
Author: Krzysztof Parzyszek (kparzysz)
<details>
<summary>Changes</summary>
Follow-up to PR175211.
There are still a few AST nodes that don't have any of the standard traits (Wrapper/Tuple/etc). Because of that they require special handling in the parse tree visitor.
Convert a subset of these nodes to the typical format, and remove the special cases from the parse tree visitor.
The members of these nodes were frequently used, so instead of extracting them by hand each time use helper member functions to access them.
---
Patch is 55.90 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/175578.diff
23 Files Affected:
- (modified) flang/include/flang/Parser/parse-tree-visitor.h (-65)
- (modified) flang/include/flang/Parser/parse-tree.h (+21-24)
- (modified) flang/lib/Lower/Bridge.cpp (+7-7)
- (modified) flang/lib/Lower/IO.cpp (+5-5)
- (modified) flang/lib/Lower/OpenACC.cpp (+8-8)
- (modified) flang/lib/Lower/OpenMP/OpenMP.cpp (+5-5)
- (modified) flang/lib/Lower/OpenMP/Utils.cpp (+12-10)
- (modified) flang/lib/Lower/PFTBuilder.cpp (+1-1)
- (modified) flang/lib/Parser/parse-tree.cpp (+8-4)
- (modified) flang/lib/Parser/tools.cpp (+12-8)
- (modified) flang/lib/Parser/unparse.cpp (+7-7)
- (modified) flang/lib/Semantics/check-cuda.cpp (+4-4)
- (modified) flang/lib/Semantics/check-data.cpp (+2-2)
- (modified) flang/lib/Semantics/check-deallocate.cpp (+3-3)
- (modified) flang/lib/Semantics/check-do-forall.cpp (+10-10)
- (modified) flang/lib/Semantics/check-nullify.cpp (+1-1)
- (modified) flang/lib/Semantics/check-omp-loop.cpp (+1-1)
- (modified) flang/lib/Semantics/check-omp-structure.cpp (+9-9)
- (modified) flang/lib/Semantics/data-to-inits.cpp (+7-7)
- (modified) flang/lib/Semantics/expression.cpp (+40-38)
- (modified) flang/lib/Semantics/resolve-directives.cpp (+9-9)
- (modified) flang/lib/Semantics/resolve-names-utils.cpp (+2-2)
- (modified) flang/lib/Semantics/resolve-names.cpp (+20-19)
``````````diff
diff --git a/flang/include/flang/Parser/parse-tree-visitor.h b/flang/include/flang/Parser/parse-tree-visitor.h
index 191e74ee89f1c..5aff5152a3793 100644
--- a/flang/include/flang/Parser/parse-tree-visitor.h
+++ b/flang/include/flang/Parser/parse-tree-visitor.h
@@ -314,56 +314,6 @@ struct ParseTreeVisitorLookupScope {
}
}
- template <typename V> static void Walk(const ArrayElement &x, V &visitor) {
- if (visitor.Pre(x)) {
- Walk(x.base, visitor);
- Walk(x.subscripts, visitor);
- visitor.Post(x);
- }
- }
- template <typename M> static void Walk(ArrayElement &x, M &mutator) {
- if (mutator.Pre(x)) {
- Walk(x.base, mutator);
- Walk(x.subscripts, mutator);
- mutator.Post(x);
- }
- }
- template <typename V>
- static void Walk(const CoindexedNamedObject &x, V &visitor) {
- if (visitor.Pre(x)) {
- Walk(x.base, visitor);
- Walk(x.imageSelector, visitor);
- visitor.Post(x);
- }
- }
- template <typename M> static void Walk(CoindexedNamedObject &x, M &mutator) {
- if (mutator.Pre(x)) {
- Walk(x.base, mutator);
- Walk(x.imageSelector, mutator);
- mutator.Post(x);
- }
- }
- template <typename A, typename B, typename V>
- static void Walk(const LoopBounds<A, B> &x, V &visitor) {
- if (visitor.Pre(x)) {
- Walk(x.name, visitor);
- Walk(x.lower, visitor);
- Walk(x.upper, visitor);
- Walk(x.step, visitor);
- visitor.Post(x);
- }
- }
- template <typename A, typename B, typename M>
- static void Walk(LoopBounds<A, B> &x, M &mutator) {
- if (mutator.Pre(x)) {
- Walk(x.name, mutator);
- Walk(x.lower, mutator);
- Walk(x.upper, mutator);
- Walk(x.step, mutator);
- mutator.Post(x);
- }
- }
-
// Expr traversal uses iteration rather than recursion to avoid
// blowing out the stack on very deep expression parse trees.
// It replaces implementations that looked like:
@@ -451,21 +401,6 @@ struct ParseTreeVisitorLookupScope {
mutator.Post(x);
}
}
- template <typename V>
- static void Walk(const StructureComponent &x, V &visitor) {
- if (visitor.Pre(x)) {
- Walk(x.base, visitor);
- Walk(x.component, visitor);
- visitor.Post(x);
- }
- }
- template <typename M> static void Walk(StructureComponent &x, M &mutator) {
- if (mutator.Pre(x)) {
- Walk(x.base, mutator);
- Walk(x.component, mutator);
- mutator.Post(x);
- }
- }
template <typename V> static void Walk(const UseStmt &x, V &visitor) {
if (visitor.Pre(x)) {
Walk(x.nature, visitor);
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index c03823b60f0de..6c1aace66275f 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -1256,15 +1256,13 @@ WRAPPER_CLASS(ArrayConstructor, AcSpec);
using DoVariable = Scalar<Integer<Name>>;
template <typename VAR, typename BOUND> struct LoopBounds {
- LoopBounds(LoopBounds &&that) = default;
- LoopBounds(
- VAR &&name, BOUND &&lower, BOUND &&upper, std::optional<BOUND> &&step)
- : name{std::move(name)}, lower{std::move(lower)}, upper{std::move(upper)},
- step{std::move(step)} {}
- LoopBounds &operator=(LoopBounds &&) = default;
- VAR name;
- BOUND lower, upper;
- std::optional<BOUND> step;
+ TUPLE_CLASS_BOILERPLATE(LoopBounds);
+ std::tuple<VAR, BOUND, BOUND, std::optional<BOUND>> t;
+
+ const VAR &Name() const { return std::get<0>(t); }
+ const BOUND &Lower() const { return std::get<1>(t); }
+ const BOUND &Upper() const { return std::get<2>(t); }
+ const std::optional<BOUND> &Step() const { return std::get<3>(t); }
};
using ScalarName = Scalar<Name>;
@@ -1858,11 +1856,11 @@ using ScalarIntVariable = Scalar<Integer<Variable>>;
// R913 structure-component -> data-ref
struct StructureComponent {
- BOILERPLATE(StructureComponent);
- StructureComponent(DataRef &&dr, Name &&n)
- : base{std::move(dr)}, component(std::move(n)) {}
- DataRef base;
- Name component;
+ TUPLE_CLASS_BOILERPLATE(StructureComponent);
+ std::tuple<DataRef, Name> t;
+
+ const DataRef &Base() const { return std::get<DataRef>(t); }
+ const Name &Component() const { return std::get<Name>(t); }
};
// R1039 proc-component-ref -> scalar-variable % procedure-component-name
@@ -1873,23 +1871,22 @@ struct ProcComponentRef {
// R914 coindexed-named-object -> data-ref
struct CoindexedNamedObject {
- BOILERPLATE(CoindexedNamedObject);
- CoindexedNamedObject(DataRef &&dr, ImageSelector &&is)
- : base{std::move(dr)}, imageSelector{std::move(is)} {}
- DataRef base;
- ImageSelector imageSelector;
+ TUPLE_CLASS_BOILERPLATE(CoindexedNamedObject);
+ std::tuple<DataRef, ImageSelector> t;
};
// R917 array-element -> data-ref
struct ArrayElement {
- BOILERPLATE(ArrayElement);
- ArrayElement(DataRef &&dr, std::list<SectionSubscript> &&ss)
- : base{std::move(dr)}, subscripts(std::move(ss)) {}
+ TUPLE_CLASS_BOILERPLATE(ArrayElement);
Substring ConvertToSubstring();
StructureConstructor ConvertToStructureConstructor(
const semantics::DerivedTypeSpec &);
- DataRef base;
- std::list<SectionSubscript> subscripts;
+ std::tuple<DataRef, std::list<SectionSubscript>> t;
+
+ const DataRef &Base() const { return std::get<DataRef>(t); }
+ const std::list<SectionSubscript> &Subscripts() const {
+ return std::get<std::list<SectionSubscript>>(t);
+ }
};
// R933 allocate-object -> variable-name | structure-component
diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 609050511f6c9..656940986809d 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -2491,8 +2491,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
&loopControl->u)) {
// Non-concurrent increment loop.
IncrementLoopInfo &info = incrementLoopNestInfo.emplace_back(
- *bounds->name.thing.symbol, bounds->lower, bounds->upper,
- bounds->step);
+ *bounds->Name().thing.symbol, bounds->Lower(), bounds->Upper(),
+ bounds->Step());
if (unstructuredContext) {
maybeStartBlock(preheaderBlock);
info.hasRealControl = info.loopVariableSym->GetType()->IsNumeric(
@@ -3842,22 +3842,22 @@ class FirConverter : public Fortran::lower::AbstractConverter {
assert(bounds && "Expected bounds on the loop construct");
Fortran::semantics::Symbol &ivSym =
- bounds->name.thing.symbol->GetUltimate();
+ bounds->Name().thing.symbol->GetUltimate();
ivValues.push_back(getSymbolAddress(ivSym));
lbs.push_back(builder->createConvert(
crtLoc, idxTy,
fir::getBase(genExprValue(
- *Fortran::semantics::GetExpr(bounds->lower), stmtCtx))));
+ *Fortran::semantics::GetExpr(bounds->Lower()), stmtCtx))));
ubs.push_back(builder->createConvert(
crtLoc, idxTy,
fir::getBase(genExprValue(
- *Fortran::semantics::GetExpr(bounds->upper), stmtCtx))));
- if (bounds->step)
+ *Fortran::semantics::GetExpr(bounds->Upper()), stmtCtx))));
+ if (auto &step = bounds->Step())
steps.push_back(builder->createConvert(
crtLoc, idxTy,
fir::getBase(genExprValue(
- *Fortran::semantics::GetExpr(bounds->step), stmtCtx))));
+ *Fortran::semantics::GetExpr(step), stmtCtx))));
else // If `step` is not present, assume it is `1`.
steps.push_back(builder->createIntegerConstant(loc, idxTy, 1));
diff --git a/flang/lib/Lower/IO.cpp b/flang/lib/Lower/IO.cpp
index c3f9c1a882423..de2afb70636d5 100644
--- a/flang/lib/Lower/IO.cpp
+++ b/flang/lib/Lower/IO.cpp
@@ -951,7 +951,7 @@ static void genIoLoop(Fortran::lower::AbstractConverter &converter,
const auto &itemList = std::get<0>(ioImpliedDo.t);
const auto &control = std::get<1>(ioImpliedDo.t);
const auto &loopSym =
- *Fortran::parser::UnwrapRef<Fortran::parser::Name>(control.name).symbol;
+ *Fortran::parser::UnwrapRef<Fortran::parser::Name>(control.Name()).symbol;
mlir::Value loopVar = fir::getBase(converter.genExprAddr(
Fortran::evaluate::AsGenericExpr(loopSym).value(), stmtCtx));
auto genControlValue = [&](const Fortran::parser::ScalarIntExpr &expr) {
@@ -959,11 +959,11 @@ static void genIoLoop(Fortran::lower::AbstractConverter &converter,
converter.genExprValue(*Fortran::semantics::GetExpr(expr), stmtCtx));
return builder.createConvert(loc, builder.getIndexType(), v);
};
- mlir::Value lowerValue = genControlValue(control.lower);
- mlir::Value upperValue = genControlValue(control.upper);
+ mlir::Value lowerValue = genControlValue(control.Lower());
+ mlir::Value upperValue = genControlValue(control.Upper());
mlir::Value stepValue =
- control.step.has_value()
- ? genControlValue(*control.step)
+ control.Step().has_value()
+ ? genControlValue(*control.Step())
: mlir::arith::ConstantIndexOp::create(builder, loc, 1);
auto genItemList = [&](const D &ioImpliedDo) {
if constexpr (std::is_same_v<D, Fortran::parser::InputImpliedDo>)
diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 52fee7baf9de1..64e39b610aa6e 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -305,13 +305,13 @@ getSymbolFromAccObject(const Fortran::parser::AccObject &accObject) {
Fortran::parser::Unwrap<Fortran::parser::ArrayElement>(
*designator)) {
const Fortran::parser::Name &name =
- Fortran::parser::GetLastName(arrayElement->base);
+ Fortran::parser::GetLastName(arrayElement->Base());
return *name.symbol;
}
if (const auto *component =
Fortran::parser::Unwrap<Fortran::parser::StructureComponent>(
*designator)) {
- return *component->component.symbol;
+ return *component->Component().symbol;
}
} else if (const auto *name =
std::get_if<Fortran::parser::Name>(&accObject.u)) {
@@ -2173,18 +2173,18 @@ static void processDoLoopBounds(
mlir::Location loc) {
locs.push_back(loc);
lowerbounds.push_back(fir::getBase(converter.genExprValue(
- *Fortran::semantics::GetExpr(bounds.lower), stmtCtx)));
+ *Fortran::semantics::GetExpr(bounds.Lower()), stmtCtx)));
upperbounds.push_back(fir::getBase(converter.genExprValue(
- *Fortran::semantics::GetExpr(bounds.upper), stmtCtx)));
- if (bounds.step)
+ *Fortran::semantics::GetExpr(bounds.Upper()), stmtCtx)));
+ if (auto &step = bounds.Step())
steps.push_back(fir::getBase(converter.genExprValue(
- *Fortran::semantics::GetExpr(bounds.step), stmtCtx)));
+ *Fortran::semantics::GetExpr(step), stmtCtx)));
else // If `step` is not present, assume it is `1`.
steps.push_back(builder.createIntegerConstant(
currentLocation, upperbounds[upperbounds.size() - 1].getType(),
1));
Fortran::semantics::Symbol &ivSym =
- bounds.name.thing.symbol->GetUltimate();
+ bounds.Name().thing.symbol->GetUltimate();
privatizeIv(converter, ivSym, currentLocation, ivTypes, ivLocs,
privateOperands, ivPrivate);
@@ -2355,7 +2355,7 @@ static void privatizeInductionVariables(
mlir::Location loc) {
locs.push_back(loc);
Fortran::semantics::Symbol &ivSym =
- bounds.name.thing.symbol->GetUltimate();
+ bounds.Name().thing.symbol->GetUltimate();
privatizeIv(converter, ivSym, currentLocation, ivTypes,
ivLocs, privateOperands, ivPrivate);
});
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 989e370870f33..1c84d8a38d6b6 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2090,13 +2090,13 @@ static void genCanonicalLoopNest(
assert(bounds && "Expected bounds for canonical loop");
lower::StatementContext stmtCtx;
mlir::Value loopLBVar = fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->lower), stmtCtx));
+ converter.genExprValue(*semantics::GetExpr(bounds->Lower()), stmtCtx));
mlir::Value loopUBVar = fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->upper), stmtCtx));
+ converter.genExprValue(*semantics::GetExpr(bounds->Upper()), stmtCtx));
mlir::Value loopStepVar = [&]() {
- if (bounds->step) {
+ if (auto &step = bounds->Step()) {
return fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->step), stmtCtx));
+ converter.genExprValue(*semantics::GetExpr(step), stmtCtx));
}
// If `step` is not present, assume it is `1`.
@@ -2105,7 +2105,7 @@ static void genCanonicalLoopNest(
}();
// Get the integer kind for the loop variable and cast the loop bounds
- size_t loopVarTypeSize = bounds->name.thing.symbol->GetUltimate().size();
+ size_t loopVarTypeSize = bounds->Name().thing.symbol->GetUltimate().size();
mlir::Type loopVarType = getLoopVarType(converter, loopVarTypeSize);
loopVarTypes.push_back(loopVarType);
loopLBVar = firOpBuilder.createConvert(loc, loopVarType, loopLBVar);
diff --git a/flang/lib/Lower/OpenMP/Utils.cpp b/flang/lib/Lower/OpenMP/Utils.cpp
index a818d635668de..dce8580856664 100644
--- a/flang/lib/Lower/OpenMP/Utils.cpp
+++ b/flang/lib/Lower/OpenMP/Utils.cpp
@@ -31,6 +31,7 @@
#include <flang/Semantics/tools.h>
#include <flang/Semantics/type.h>
#include <flang/Utils/OpenMP.h>
+#include <llvm/ADT/STLExtras.h>
#include <llvm/ADT/SmallPtrSet.h>
#include <llvm/ADT/StringRef.h>
#include <llvm/Support/CommandLine.h>
@@ -255,9 +256,10 @@ getIterationVariableSymbol(const lower::pft::Evaluation &eval) {
if (const auto &maybeCtrl = doLoop.GetLoopControl()) {
using LoopControl = parser::LoopControl;
if (auto *bounds = std::get_if<LoopControl::Bounds>(&maybeCtrl->u)) {
- static_assert(std::is_same_v<decltype(bounds->name),
- parser::Scalar<parser::Name>>);
- return bounds->name.thing.symbol;
+ using NameType = llvm::remove_cvref_t<decltype(bounds->Name())>;
+ static_assert(
+ std::is_same_v<NameType, parser::Scalar<parser::Name>>);
+ return bounds->Name().thing.symbol;
}
}
return static_cast<semantics::Symbol *>(nullptr);
@@ -894,19 +896,19 @@ void collectLoopRelatedInfo(
assert(bounds && "Expected bounds for worksharing do loop");
lower::StatementContext stmtCtx;
result.loopLowerBounds.push_back(fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->lower), stmtCtx)));
+ converter.genExprValue(*semantics::GetExpr(bounds->Lower()), stmtCtx)));
result.loopUpperBounds.push_back(fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->upper), stmtCtx)));
- if (bounds->step) {
+ converter.genExprValue(*semantics::GetExpr(bounds->Upper()), stmtCtx)));
+ if (auto &step = bounds->Step()) {
result.loopSteps.push_back(fir::getBase(
- converter.genExprValue(*semantics::GetExpr(bounds->step), stmtCtx)));
+ converter.genExprValue(*semantics::GetExpr(step), stmtCtx)));
} else { // If `step` is not present, assume it as `1`.
result.loopSteps.push_back(firOpBuilder.createIntegerConstant(
currentLocation, firOpBuilder.getIntegerType(32), 1));
}
- iv.push_back(bounds->name.thing.symbol);
- loopVarTypeSize = std::max(loopVarTypeSize,
- bounds->name.thing.symbol->GetUltimate().size());
+ iv.push_back(bounds->Name().thing.symbol);
+ loopVarTypeSize = std::max(
+ loopVarTypeSize, bounds->Name().thing.symbol->GetUltimate().size());
if (--collapseValue)
doConstructEval = getNestedDoConstruct(*doConstructEval);
} while (collapseValue > 0);
diff --git a/flang/lib/Lower/PFTBuilder.cpp b/flang/lib/Lower/PFTBuilder.cpp
index 1a7fb41f3273c..308db726f073c 100644
--- a/flang/lib/Lower/PFTBuilder.cpp
+++ b/flang/lib/Lower/PFTBuilder.cpp
@@ -1055,7 +1055,7 @@ class PFTBuilder {
eval.controlSuccessor = &evaluationList.back();
if (const auto *bounds =
std::get_if<parser::LoopControl::Bounds>(&loopControl->u)) {
- if (bounds->name.thing.symbol->GetType()->IsNumeric(
+ if (bounds->Name().thing.symbol->GetType()->IsNumeric(
common::TypeCategory::Real))
eval.isUnstructured = true; // real-valued loop control
} else if (std::get_if<parser::ScalarLogicalExpr>(
diff --git a/flang/lib/Parser/parse-tree.cpp b/flang/lib/Parser/parse-tree.cpp
index e0c668ddc328b..afe28182f8627 100644
--- a/flang/lib/Parser/parse-tree.cpp
+++ b/flang/lib/Parser/parse-tree.cpp
@@ -102,8 +102,9 @@ static Designator MakeArrayElementRef(
const Name &name, std::list<Expr> &&subscripts) {
ArrayElement arrayElement{DataRef{Name{name}}, std::list<SectionSubscript>{}};
for (Expr &expr : subscripts) {
- arrayElement.subscripts.push_back(
- SectionSubscript{Integer{common::Indirection{std::move(expr)}}});
+ std::get<std::list<SectionSubscript>>(arrayElement.t)
+ .push_back(
+ SectionSubscript{Integer{common::Indirection{std::move(expr)}}});
}
return Designator{DataRef{common::Indirection{std::move(arrayElement)}}};
}
@@ -113,8 +114,9 @@ static Designator MakeArrayElementRef(
ArrayElement arrayElement{DataRef{common::Indirection{std::move(sc)}},
std::list<SectionSubscript>{}};
for (Expr &expr : subscripts) {
- arrayElement.subscripts.push_back(
- SectionSubscript{Integer{common::Indirection{std::move(expr)}}});
+ std::get<std::list<SectionSubscript>>(arrayElement.t)
+ .push_back(
+ SectionSubscript{Integer{common::Indirection{std::move(expr)}}});
}
return Designator{DataRef{common::Indirection{std::move(arrayElement)}}};
}
@@ -186,6 +188,7 @@ StructureConstructor FunctionReference::ConvertToStructureConstructor(
StructureConstructor ArrayElement::ConvertToStructureConstructor(
const semantics::DerivedTypeSpec &derived) {
+ auto &[base, subscripts]{t};
Name name{std::get<parser::Name>(base.u)};
std::list<ComponentSpec> components;
for (auto &subscript : subscripts) {
@@ -198,6 +201,7 @@ StructureConstructor ArrayElement::ConvertToStructureConstructor(
}
Substring ArrayElement::ConvertToSubstring() {
+ auto &[base, subscripts]{t};
auto iter{subscripts.begin()};
CHECK(iter != subscripts.end());
auto &triplet{std::get<SubscriptTriplet>(iter->u)};
diff --git a/flang/lib/Parser/tools.cpp b/flang/lib/Parser/tools.cpp
index ed6d194c17dc3..ff0538ae565b2 100644
--- a/flang/lib/Parser/tools.cpp
+++ b/flang/lib/Parser/tools.cpp
@@ -13,7 +13,7 @@ namespace Fortran::parser {
const Name &GetLastName(const Name &x) { return x; }
const Name &GetLastName(const StructureComponent &x) {
- return GetLastName(x.component);
+ return GetLastName(x.Component());
}
const Name &GetLastName(const DataRef &x) {
@@ -23,10 +23,12 @@ const Name &GetLastName(const DataRef &x) {
[](const common::Indirection<StructureComponent> &sc)
-> const Name & { return GetLastName(sc.value()); },
[](const common::Indirection<ArrayElement> &sc) -> const Name & {
- return GetLastName(sc.value().base);
+ return GetLastName(sc.value().Base());
},
[](const common::Indirection<CoindexedNamedObject> &ci)
- -> const Name & { return GetLastName(ci.value().base); },
+ -> const Name & {
+ return GetLastName(std::get<DataRef>(ci.value().t));
+ },
},
x.u);
}
@@ -71,7 +73,7 @@ const Name &GetLastName(const AllocateObject &x) {
const Name &GetFirstName(const Name &x) { return x; }
const Na...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/175578
More information about the llvm-branch-commits
mailing list