From c03520210c91fc756eb0f722cb9b444a86d2fa37 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 22 Jul 2001 00:18:33 +0000 Subject: [PATCH] Remove stringutils.h file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263 91177308-0d34-0410-b5e6-96231b3b80d8 --- support/lib/Support/ProgramOptions.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/support/lib/Support/ProgramOptions.cpp b/support/lib/Support/ProgramOptions.cpp index 40fa5ac10af..c9df10a59ed 100644 --- a/support/lib/Support/ProgramOptions.cpp +++ b/support/lib/Support/ProgramOptions.cpp @@ -109,20 +109,20 @@ ProgramOptions::GetOriginalArgs() const return argv; } -vector +vector ProgramOptions::GetDescription() const { - vector optDesc; + vector optDesc; if (optDesc.size() < (unsigned) argc) { - for (StringMap::const_iterator iter=optionRegistry.begin(); + for (hash_map::const_iterator iter=optionRegistry.begin(); ! (iter == optionRegistry.end()); ++iter) { - const ProgramOption* handler = (*iter).second; - optDesc.push_back(strdup(handler->ArgString())); // 1st - optDesc.push_back(strdup(handler->HelpMesg())); // 2nd + const ProgramOption* handler = iter->second; + optDesc.push_back(handler->ArgString()); // 1st + optDesc.push_back(handler->HelpMesg()); // 2nd optDesc.push_back(handler->GetTextValue()); // 3rd } } @@ -215,10 +215,8 @@ ProgramOptions::PrintOptions(ostream& stream) const stream << "\tUse argument 0 to turn OFF a flag option: " << "- 0" << endl << endl; - for (StringMap::const_iterator iter=optionRegistry.begin(); - ! (iter == optionRegistry.end()); - ++iter) - { + for (hash_map::const_iterator iter = optionRegistry.begin(); + iter != optionRegistry.end(); ++iter) { const ProgramOption* handler = (*iter).second; stream << "\t-" << handler->ArgString(); -- 2.34.1