[LLVMdev] [RFC] Removing static initializers for command line options

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Aug 20 22:54:54 PDT 2014


I don't have any objections to this approach. Just some comments:

+  LLVMOptionKey* Key; // The name of the option used by the OptionRegistry

The comment looks out of date.

+  std::map<LLVMOptionKey*,Option*> Options;

Why std::map? DenseMap maybe?

+  void AddOption(LLVMOptionKey* key, Option *O);
+  void RemoveOption(Option *O);

addOption, removeOption. Same for other methods.

+LLVMOptionKey Scalarizer::ScalarizeLoadStoreKey = 0;

the value is not used, so I would probably omit the "= 0;".



More information about the llvm-dev mailing list