@@ -32,10 +32,9 @@ using namespace llvm::sys;
32
32
33
33
Multilib::Multilib (StringRef GCCSuffix, StringRef OSSuffix,
34
34
StringRef IncludeSuffix, const flags_list &Flags,
35
- StringRef ExclusiveGroup,
36
- std::optional<StringRef> FatalError)
35
+ StringRef ExclusiveGroup, std::optional<StringRef> Error)
37
36
: GCCSuffix(GCCSuffix), OSSuffix(OSSuffix), IncludeSuffix(IncludeSuffix),
38
- Flags(Flags), ExclusiveGroup(ExclusiveGroup), FatalError(FatalError ) {
37
+ Flags(Flags), ExclusiveGroup(ExclusiveGroup), Error(Error ) {
39
38
assert (GCCSuffix.empty () ||
40
39
(StringRef (GCCSuffix).front () == ' /' && GCCSuffix.size () > 1 ));
41
40
assert (OSSuffix.empty () ||
@@ -123,11 +122,11 @@ bool MultilibSet::select(const Driver &D, const Multilib::flags_list &Flags,
123
122
continue ;
124
123
}
125
124
126
- // If this multilib is actually a placeholder containing a fatal
127
- // error message written by the multilib.yaml author, display that
128
- // error message, and return failure.
129
- if (M.isFatalError ()) {
130
- D.Diag (clang::diag::err_drv_multilib_custom_error) << M.getFatalError ();
125
+ // If this multilib is actually a placeholder containing an error message
126
+ // written by the multilib.yaml author, display that error message, and
127
+ // return failure.
128
+ if (M.isError ()) {
129
+ D.Diag (clang::diag::err_drv_multilib_custom_error) << M.getErrorMessage ();
131
130
return false ;
132
131
}
133
132
@@ -173,7 +172,7 @@ static const VersionTuple MultilibVersionCurrent(1, 0);
173
172
174
173
struct MultilibSerialization {
175
174
std::string Dir; // if this record successfully selects a library dir
176
- std::string FatalError; // if this record reports a fatal error message
175
+ std::string Error; // if this record reports a fatal error message
177
176
std::vector<std::string> Flags;
178
177
std::string Group;
179
178
};
@@ -217,15 +216,15 @@ struct MultilibSetSerialization {
217
216
template <> struct llvm ::yaml::MappingTraits<MultilibSerialization> {
218
217
static void mapping (llvm::yaml::IO &io, MultilibSerialization &V) {
219
218
io.mapOptional (" Dir" , V.Dir );
220
- io.mapOptional (" FatalError " , V.FatalError );
219
+ io.mapOptional (" Error " , V.Error );
221
220
io.mapRequired (" Flags" , V.Flags );
222
221
io.mapOptional (" Group" , V.Group );
223
222
}
224
223
static std::string validate (IO &io, MultilibSerialization &V) {
225
- if (V.Dir .empty () && V.FatalError .empty ())
226
- return " one of the 'Dir' and 'FatalError ' keys must be specified" ;
227
- if (!V.Dir .empty () && !V.FatalError .empty ())
228
- return " the 'Dir' and 'FatalError ' keys may not both be specified" ;
224
+ if (V.Dir .empty () && V.Error .empty ())
225
+ return " one of the 'Dir' and 'Error ' keys must be specified" ;
226
+ if (!V.Dir .empty () && !V.Error .empty ())
227
+ return " the 'Dir' and 'Error ' keys may not both be specified" ;
229
228
if (StringRef (V.Dir ).starts_with (" /" ))
230
229
return " paths must be relative but \" " + V.Dir + " \" starts with \" /\" " ;
231
230
return std::string{};
@@ -311,8 +310,8 @@ MultilibSet::parseYaml(llvm::MemoryBufferRef Input,
311
310
multilib_list Multilibs;
312
311
Multilibs.reserve (MS.Multilibs .size ());
313
312
for (const auto &M : MS.Multilibs ) {
314
- if (!M.FatalError .empty ()) {
315
- Multilibs.emplace_back (" " , " " , " " , M.Flags , M.Group , M.FatalError );
313
+ if (!M.Error .empty ()) {
314
+ Multilibs.emplace_back (" " , " " , " " , M.Flags , M.Group , M.Error );
316
315
} else {
317
316
std::string Dir;
318
317
if (M.Dir != " ." )
0 commit comments