[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 28 05:58:48 PST 2016


hfinkel added a comment.

In https://reviews.llvm.org/D23934#631656, @ed wrote:

> I'd be interested in seeing a feature like this appearing.


I agree.



================
Comment at: lib/Driver/Tools.cpp:4687
+    CmdArgs.push_back(Args.MakeArgString("-ffixed-date-time=" + DateTime));
+  }
+
----------------
This seems like a fairly random place for this code. It is far removed from any other handling of preprocessor-related options.


================
Comment at: lib/Driver/Tools.cpp:5996
   }
 
   Args.AddLastArg(CmdArgs, options::OPT_dM);
----------------
Somewhere around here would make more sense.


https://reviews.llvm.org/D23934





More information about the cfe-commits mailing list