[PATCH] D47578: Do not enforce absolute path argv0 in windows
Rui Ueyama via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 7 12:54:20 PDT 2018
ruiu added inline comments.
================
Comment at: llvm/lib/Support/Windows/Process.inc:240
+ Filename.assign(Base.begin(), Base.end());
+ return ec;
}
----------------
The intention of the code is to return a success, so it is less confusing if you directly return a success (i.e. std::error_code())
================
Comment at: llvm/lib/Support/Windows/Process.inc:262
- LocalFree(UnicodeCommandLine);
+ SmallVector<char, MAX_PATH> Arg0(Args[0], Args[0] + strlen(Args[0])), Filename;
+ sys::path::remove_filename(Arg0);
----------------
Looks like defining a variable on at a time is more common than defining two variables in one line.
https://reviews.llvm.org/D47578
More information about the cfe-commits
mailing list