[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 10:38:10 PDT 2022


benlangmuir added inline comments.


================
Comment at: llvm/lib/MC/MCContext.cpp:77
       AutoReset(DoAutoReset), TargetOptions(TargetOpts) {
-  SecureLogFile = AsSecureLogFileName;
+  SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : "";
 
----------------
MaskRay wrote:
> When is TargetOptions null? When it is TargetOptions, Does a value of `""` matter?
> When is TargetOptions null? 

null is the default value for the parameter, and happens in various places that construct MCOptions. None of them require a secure log file as far as I can tell.

> Does a value of "" matter?

Like the other file path in MCTargetOptions  (SplitDwarfFile) empty indicates no file specified.


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

https://reviews.llvm.org/D136888



More information about the cfe-commits mailing list