@@ -32,10 +32,9 @@ using namespace llvm::sys;
3232
3333Multilib::Multilib (StringRef GCCSuffix, StringRef OSSuffix,
3434 StringRef IncludeSuffix, const flags_list &Flags,
35- StringRef ExclusiveGroup,
36- std::optional<StringRef> FatalError)
35+ StringRef ExclusiveGroup, std::optional<StringRef> Error)
3736 : GCCSuffix(GCCSuffix), OSSuffix(OSSuffix), IncludeSuffix(IncludeSuffix),
38- Flags(Flags), ExclusiveGroup(ExclusiveGroup), FatalError(FatalError ) {
37+ Flags(Flags), ExclusiveGroup(ExclusiveGroup), Error(Error ) {
3938 assert (GCCSuffix.empty () ||
4039 (StringRef (GCCSuffix).front () == ' /' && GCCSuffix.size () > 1 ));
4140 assert (OSSuffix.empty () ||
@@ -123,11 +122,11 @@ bool MultilibSet::select(const Driver &D, const Multilib::flags_list &Flags,
123122 continue ;
124123 }
125124
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 ();
131130 return false ;
132131 }
133132
@@ -173,7 +172,7 @@ static const VersionTuple MultilibVersionCurrent(1, 0);
173172
174173struct MultilibSerialization {
175174 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
177176 std::vector<std::string> Flags;
178177 std::string Group;
179178};
@@ -217,15 +216,15 @@ struct MultilibSetSerialization {
217216template <> struct llvm ::yaml::MappingTraits<MultilibSerialization> {
218217 static void mapping (llvm::yaml::IO &io, MultilibSerialization &V) {
219218 io.mapOptional (" Dir" , V.Dir );
220- io.mapOptional (" FatalError " , V.FatalError );
219+ io.mapOptional (" Error " , V.Error );
221220 io.mapRequired (" Flags" , V.Flags );
222221 io.mapOptional (" Group" , V.Group );
223222 }
224223 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" ;
229228 if (StringRef (V.Dir ).starts_with (" /" ))
230229 return " paths must be relative but \" " + V.Dir + " \" starts with \" /\" " ;
231230 return std::string{};
@@ -311,8 +310,8 @@ MultilibSet::parseYaml(llvm::MemoryBufferRef Input,
311310 multilib_list Multilibs;
312311 Multilibs.reserve (MS.Multilibs .size ());
313312 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 );
316315 } else {
317316 std::string Dir;
318317 if (M.Dir != " ." )
0 commit comments