From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260700
91177308-0d34-0410-b5e6-
96231b3b80d8
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.