[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 19:00:37 PDT 2022


MaskRay added inline comments.


================
Comment at: clang/test/Driver/AS_SECURE_LOG_FILE.s:1
+// RUN: env AS_SECURE_LOG_FILE=%t %clang -target x86_64-apple-darwin -c %s -o %t.o -### 2>&1 | FileCheck %s -DLOG_FILE=%t
+// CHECK: "-cc1as"
----------------
`--target=` for new tests

remove unused `-o %t.o`


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


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

https://reviews.llvm.org/D136888



More information about the cfe-commits mailing list