[llvm-commits] [llvm] r128199 - /llvm/trunk/lib/Support/Unix/PathV2.inc
Andrew Trick
atrick at apple.com
Wed Mar 23 23:56:21 PDT 2011
Hi Michael,
It looks like this unit test may not have liked your checkin on clang-x86_64-darwin10-gcc42-RA. Can you either checkin a quick fix, revert, or XFAIL+bug?
-Andy
******************** TEST 'Clang :: Frontend/dependency-gen.c' FAILED ********************Script:
--
clang: warning: argument unused during compilation: '-S'
In file included from <built-in>:138:
<command line>:1:10: fatal error: 'a/b/x.h' file not found
#include "a/b/x.h"
^
1 error generated.
On Mar 23, 2011, at 10:23 PM, Michael J. Spencer wrote:
> Author: mspencer
> Date: Thu Mar 24 00:23:40 2011
> New Revision: 128199
>
> URL: http://llvm.org/viewvc/llvm-project?rev=128199&view=rev
> Log:
> Remove all uses of PATH_MAX and MAXPATHLEN from PathV2.
>
> Modified:
> llvm/trunk/lib/Support/Unix/PathV2.inc
>
> Modified: llvm/trunk/lib/Support/Unix/PathV2.inc
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/PathV2.inc?rev=128199&r1=128198&r2=128199&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Support/Unix/PathV2.inc (original)
> +++ llvm/trunk/lib/Support/Unix/PathV2.inc Thu Mar 24 00:23:40 2011
> @@ -93,7 +93,8 @@
> namespace fs {
>
> error_code current_path(SmallVectorImpl<char> &result) {
> - result.reserve(MAXPATHLEN);
> + // Reserve an arbitrary amount of space.
> + result.reserve(128);
>
> while (true) {
> if (::getcwd(result.data(), result.capacity()) == 0) {
> @@ -417,18 +418,13 @@
> }
>
> // Make the path absolute.
> - char real_path_buff[PATH_MAX + 1];
> - if (realpath(RandomPath.c_str(), real_path_buff) == NULL) {
> - int error = errno;
> + if (error_code ec = make_absolute(RandomPath)) {
> ::close(RandomFD);
> ::unlink(RandomPath.c_str());
> - return error_code(error, system_category());
> + return ec;
> }
>
> - result_path.clear();
> - StringRef d(real_path_buff);
> - result_path.append(d.begin(), d.end());
> -
> + result_path = RandomPath;
> result_fd = RandomFD;
> return success;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110323/6d939843/attachment.html>
More information about the llvm-commits
mailing list