summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-config-2/llvm-config.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/llvm-config-2/llvm-config.cpp b/tools/llvm-config-2/llvm-config.cpp
index 6b27a6ed72..ec0daad035 100644
--- a/tools/llvm-config-2/llvm-config.cpp
+++ b/tools/llvm-config-2/llvm-config.cpp
@@ -97,14 +97,17 @@ void ComputeLibsForComponents(const std::vector<StringRef> &Components,
// Visit the components.
for (unsigned i = 0, e = Components.size(); i != e; ++i) {
+ // Users are allowed to provide mixed case component names.
+ std::string ComponentLower = Components[i].lower();
+
// Validate that the user supplied a valid component name.
- if (!ComponentMap.count(Components[i])) {
+ if (!ComponentMap.count(ComponentLower)) {
llvm::errs() << "llvm-config: unknown component name: " << Components[i]
<< "\n";
exit(1);
}
- VisitComponent(Components[i], ComponentMap, VisitedComponents,
+ VisitComponent(ComponentLower, ComponentMap, VisitedComponents,
RequiredLibs);
}