mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-22 05:51:42 +00:00
llvm-config: replace assertions with a helpful error message
From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d832030ace
commit
1b8de27709
@ -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…
x
Reference in New Issue
Block a user