[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

Ben Langmuir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 15:36:37 PDT 2022


benlangmuir added inline comments.


================
Comment at: llvm/lib/MC/MCContext.cpp:62
 
-static cl::opt<char*>
+static cl::opt<std::string>
 AsSecureLogFileName("as-secure-log-file-name",
----------------
steven_wu wrote:
> benlangmuir wrote:
> > Interestingly, `opt<char*>` doesn't have a parser; this code only worked with the default value before.
> ha, maybe we should just deprecate the directive since this hasn't been working for more than 6 years!
It works if you use the environment variable because that feeds directly into the default value for the cl::opt. It's only if you actually tried to pass `-mllvm -as-secure-log-file-name ...` it would fail to parse the option.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136888/new/

https://reviews.llvm.org/D136888



More information about the llvm-commits mailing list