[PATCH] D21628: [ELF] Allow --reproduce to be specified as an env variable
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 19:23:16 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:257-261
@@ -255,2 +256,7 @@
- if (auto *Arg = Args.getLastArg(OPT_reproduce)) {
+ const char *ReproducePath = nullptr;
+ if (Args.hasArg(OPT_reproduce))
+ ReproducePath = Args.getLastArg(OPT_reproduce)->getValue();
+ else
+ ReproducePath = ::getenv("LLD_REPRODUCE");
+ if (ReproducePath) {
----------------
Please separate this code as `getReproduceOption` function and then use it as
if (const char *Path = getReproduceOption()) {
...
}
Do you need `::` for `getenv`?
http://reviews.llvm.org/D21628
More information about the llvm-commits
mailing list