diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-06 18:04:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-06 18:04:49 +0000 |
commit | 51dc528e305125622fab3063c5670a188df1e43a (patch) | |
tree | 93653e1f4fd5ae36a144d7afcab7b82da2c0c9a0 /tools | |
parent | 589fbb1770df5f7bee1c5e24e9e8f4ca5091d528 (diff) |
llvm-config: Users are allowed to provide component names in mixed case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-config-2/llvm-config.cpp | 7 |
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); } |