This is an archive of the discontinued LLVM Phabricator instance.

Adjust cl::opt uses for opt_storage refactored
AbandonedPublic

Authored by yrouban on Oct 19 2018, 3:12 AM.

Details

Summary

This patch fixes compilation errors that result from refactoring of LLVM cl::opt structures introduced by D53426.
Basically for class-based cl::opt<MyClass> to access to the instance of MyClass one of the overloadable operators should be used.

For example if we have an option defined as cl::opt<std::string> MyStringOption;
Then the changes should look like the following:

Old: MyStringOption.c_str()
New: MyStringOption->c_str()

Old: cout << MyStringOption;
New: cout << *MyStringOption;

Diff Detail