[clang-tools-extra] r227372 - Updated tools to match r227345 which changed the getRegisteredOptions method

Pete Cooper peter_cooper at apple.com
Wed Jan 28 13:34:05 PST 2015


Author: pete
Date: Wed Jan 28 15:34:05 2015
New Revision: 227372

URL: http://llvm.org/viewvc/llvm-project?rev=227372&view=rev
Log:
Updated tools to match r227345 which changed the getRegisteredOptions method

Modified:
    clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
    clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp

Modified: clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp?rev=227372&r1=227371&r2=227372&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp (original)
+++ clang-tools-extra/trunk/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp Wed Jan 28 15:34:05 2015
@@ -197,8 +197,7 @@ bool applyFormatting(const std::vector<t
 
 int main(int argc, char **argv) {
   // Only include our options in -help output.
-  StringMap<cl::Option*> OptMap;
-  cl::getRegisteredOptions(OptMap);
+  StringMap<cl::Option*> &OptMap = cl::getRegisteredOptions();
   const char **EndOpts = std::end(OptionsToShow);
   for (const auto &Opt : OptMap) {
     if (std::find(OptionsToShow, EndOpts, Opt.getKey()) == EndOpts)

Modified: clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp?rev=227372&r1=227371&r2=227372&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/tool/ClangModernize.cpp Wed Jan 28 15:34:05 2015
@@ -307,8 +307,7 @@ int main(int argc, const char **argv) {
 
   // Hide all options we don't define ourselves. Move pre-defined 'help',
   // 'help-list', and 'version' to our general category.
-  llvm::StringMap<cl::Option*> Options;
-  cl::getRegisteredOptions(Options);
+  llvm::StringMap<cl::Option*> &Options = cl::getRegisteredOptions();
   const cl::OptionCategory **CategoryEnd =
       VisibleCategories + llvm::array_lengthof(VisibleCategories);
   for (llvm::StringMap<cl::Option *>::iterator I = Options.begin(),





More information about the cfe-commits mailing list