[PATCH] D103446: [lld/mac] Don't write mtimes to N_OSO entries if ZERO_AR_DATE is set.

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 1 11:22:25 PDT 2021


int3 accepted this revision.
int3 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/MachO/DriverUtils.cpp:266-267
                                                bool objCOnly) {
+  if (!config->writeModTimeToDebugInfo)
+    modTime = 0;
+
----------------
nit: how about `zeroModTime`? It's true that modTime is only being used by the debug info, but we're changing how it's (not) being read as well, so it's a bit of a misnomer. Plus the name is pretty long :p  


================
Comment at: lld/test/MachO/stabs.s:67
 # CHECK:      (N_SO         ) 00                         0000   0000000000000000   '/tmp/test.cpp'
-# CHECK-NEXT: (N_OSO        ) 03                         0001   0000000000000010   '[[DIR]]/test.o'
+# CHECK-NEXT: (N_OSO        ) 03                         0001   [[TEST_TIME]]      '[[DIR]]/test.o'
 # CHECK-NEXT: (N_STSYM      ) [[#%.2d,MORE_DATA_ID + 1]] 0000   [[#%.16x,STATIC:]] '_static_var'
----------------
if you changed this to a numeric substitution (like the line immediately below) you could specify a shorter `-D#TEST_TIME=0` on the command line


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

https://reviews.llvm.org/D103446



More information about the llvm-commits mailing list