forked from OSchip/llvm-project
llvm-config: replace assertions with a helpful error message
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260700
This commit is contained in:
parent
abece15858
commit
907313a9cf
|
@ -83,6 +83,14 @@ static void VisitComponent(const std::string &Name,
|
|||
const std::string &DirSep) {
|
||||
// Lookup the component.
|
||||
AvailableComponent *AC = ComponentMap.lookup(Name);
|
||||
if (!AC) {
|
||||
errs() << "Can't find component: '" << Name << "' in the map. Available components are: ";
|
||||
for (const auto &Component : ComponentMap) {
|
||||
errs() << "'" << Component.first() << "' ";
|
||||
}
|
||||
errs() << "\n";
|
||||
report_fatal_error("abort");
|
||||
}
|
||||
assert(AC && "Invalid component name!");
|
||||
|
||||
// Add to the visited table.
|
||||
|
|
Loading…
Reference in New Issue