[PATCH] Defining a new API for debug options that doesn't rely on static global cl::opts.

Chris Bieneman beanz at apple.com
Fri Oct 10 10:14:09 PDT 2014


One comment below. I will update the patches to reflect the other feedback.

================
Comment at: include/llvm/Support/Options.h:45-46
@@ +44,4 @@
+public:
+  ~OptionRegistry();
+  OptionRegistry() {}
+
----------------
chandlerc wrote:
> Shouldn't these be private? Only a single global instance of this registry can exist in order to make the ownership semantics of the cl::Option objects reasonable?
These can't be private unless I declare ManagedStatic as a friend, because they are invoked from ManagedStatic, which I think somewhat defeats the point.

http://reviews.llvm.org/D5389






More information about the llvm-commits mailing list