[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 11:41:50 PDT 2022


benlangmuir added inline comments.


================
Comment at: llvm/lib/MC/MCContext.cpp:77
       AutoReset(DoAutoReset), TargetOptions(TargetOpts) {
-  SecureLogFile = AsSecureLogFileName;
+  SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : "";
 
----------------
benlangmuir wrote:
> 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.
@MaskRay was this just a question, or did you want me to change something here? Wanted to check before I merge this.


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

https://reviews.llvm.org/D136888



More information about the cfe-commits mailing list