@@ -64,7 +64,8 @@ findInterfaceIfSeperateMP(const Fortran::semantics::Symbol &symbol) {
64
64
scope.IsSubmodule ()) {
65
65
// FIXME symbol from MpSubprogramStmt do not seem to have
66
66
// Attr::MODULE set.
67
- const Fortran::semantics::Symbol *iface = scope.parent ().FindSymbol (symbol.name ());
67
+ const Fortran::semantics::Symbol *iface =
68
+ scope.parent ().FindSymbol (symbol.name ());
68
69
assert (iface && " Separate module procedure must be declared" );
69
70
return iface;
70
71
}
@@ -97,7 +98,8 @@ Fortran::lower::mangle::mangleName(const Fortran::semantics::Symbol &symbol,
97
98
const Fortran::semantics::Symbol *interface = &ultimateSymbol;
98
99
if (const auto *mpIface = findInterfaceIfSeperateMP (ultimateSymbol))
99
100
interface = mpIface;
100
- llvm::SmallVector<llvm::StringRef> modNames = moduleNames (*interface);
101
+ llvm::SmallVector<llvm::StringRef> modNames =
102
+ moduleNames (*interface);
101
103
return fir::NameUniquer::doProcedure (modNames, hostName (*interface),
102
104
symbolName);
103
105
},
@@ -115,15 +117,17 @@ Fortran::lower::mangle::mangleName(const Fortran::semantics::Symbol &symbol,
115
117
symbolName);
116
118
},
117
119
[&](const Fortran::semantics::ObjectEntityDetails &) {
118
- llvm::SmallVector<llvm::StringRef> modNames = moduleNames (ultimateSymbol);
120
+ llvm::SmallVector<llvm::StringRef> modNames =
121
+ moduleNames (ultimateSymbol);
119
122
llvm::Optional<llvm::StringRef> optHost = hostName (ultimateSymbol);
120
123
if (Fortran::semantics::IsNamedConstant (ultimateSymbol))
121
124
return fir::NameUniquer::doConstant (modNames, optHost,
122
125
symbolName);
123
126
return fir::NameUniquer::doVariable (modNames, optHost, symbolName);
124
127
},
125
128
[&](const Fortran::semantics::NamelistDetails &) {
126
- llvm::SmallVector<llvm::StringRef> modNames = moduleNames (ultimateSymbol);
129
+ llvm::SmallVector<llvm::StringRef> modNames =
130
+ moduleNames (ultimateSymbol);
127
131
llvm::Optional<llvm::StringRef> optHost = hostName (ultimateSymbol);
128
132
return fir::NameUniquer::doNamelistGroup (modNames, optHost,
129
133
symbolName);
@@ -145,7 +149,8 @@ Fortran::lower::mangle::mangleName(const Fortran::semantics::Symbol &symbol,
145
149
std::string Fortran::lower::mangle::mangleName (
146
150
const Fortran::semantics::DerivedTypeSpec &derivedType) {
147
151
// Resolve host and module association before mangling
148
- const Fortran::semantics::Symbol &ultimateSymbol = derivedType.typeSymbol ().GetUltimate ();
152
+ const Fortran::semantics::Symbol &ultimateSymbol =
153
+ derivedType.typeSymbol ().GetUltimate ();
149
154
llvm::StringRef symbolName = toStringRef (ultimateSymbol.name ());
150
155
llvm::SmallVector<llvm::StringRef> modNames = moduleNames (ultimateSymbol);
151
156
llvm::Optional<llvm::StringRef> optHost = hostName (ultimateSymbol);
@@ -155,11 +160,14 @@ std::string Fortran::lower::mangle::mangleName(
155
160
const auto ¶mDetails =
156
161
param->get <Fortran::semantics::TypeParamDetails>();
157
162
if (paramDetails.attr () == Fortran::common::TypeParamAttr::Kind) {
158
- const Fortran::semantics::ParamValue *paramValue = derivedType.FindParameter (param->name ());
163
+ const Fortran::semantics::ParamValue *paramValue =
164
+ derivedType.FindParameter (param->name ());
159
165
assert (paramValue && " derived type kind parameter value not found" );
160
- const Fortran::semantics::MaybeIntExpr paramExpr = paramValue->GetExplicit ();
166
+ const Fortran::semantics::MaybeIntExpr paramExpr =
167
+ paramValue->GetExplicit ();
161
168
assert (paramExpr && " derived type kind param not explicit" );
162
- std::optional<int64_t > init = Fortran::evaluate::ToInt64 (paramValue->GetExplicit ());
169
+ std::optional<int64_t > init =
170
+ Fortran::evaluate::ToInt64 (paramValue->GetExplicit ());
163
171
assert (init && " derived type kind param is not constant" );
164
172
kinds.emplace_back (*init);
165
173
}
@@ -206,7 +214,8 @@ std::string Fortran::lower::mangle::mangleArrayLiteral(
206
214
if (charLen >= 0 )
207
215
typeId.append (std::to_string (charLen)).append (" x" );
208
216
typeId.append (typeToString (cat, kind));
209
- std::string name = fir::NameUniquer::doGenerated (" ro." s.append (typeId).append (" ." ));
217
+ std::string name =
218
+ fir::NameUniquer::doGenerated (" ro." s.append (typeId).append (" ." ));
210
219
if (!size)
211
220
return name += " null" ;
212
221
llvm::MD5 hashValue{};
0 commit comments