[clang] [llvm] [LTO][AllocToken] Support AllocToken instrumentation in backend (PR #169358)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 07:28:03 PST 2025


================
@@ -67,24 +67,24 @@ cl::opt<std::string> ClFuncPrefix("alloc-token-prefix",
                                   cl::desc("The allocation function prefix"),
                                   cl::Hidden, cl::init("__alloc_token_"));
 
-cl::opt<uint64_t>
+cl::opt<std::optional<uint64_t>, false, cl::parser<uint64_t>>
----------------
teresajohnson wrote:

You don't need to use optional and a special parser if this is to check whether the option has been explicitly specified. You can just call getNumOccurrences() on the option.

https://github.com/llvm/llvm-project/pull/169358


More information about the llvm-commits mailing list