[llvm-commits] [llvm] r127724 - /llvm/trunk/lib/Support/Windows/PathV2.inc
NAKAMURA Takumi
geek4civic at gmail.com
Tue Mar 15 19:53:32 PDT 2011
Author: chapuni
Date: Tue Mar 15 21:53:32 2011
New Revision: 127724
URL: http://llvm.org/viewvc/llvm-project?rev=127724&view=rev
Log:
Windows/PathV2.inc: [PR8520] Recognize "NUL" as special (character) file.
FIXME: It is a temporal hack. We should detect as many "special file name" as possible.
Modified:
llvm/trunk/lib/Support/Windows/PathV2.inc
Modified: llvm/trunk/lib/Support/Windows/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/PathV2.inc?rev=127724&r1=127723&r2=127724&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Windows/PathV2.inc Tue Mar 15 21:53:32 2011
@@ -449,7 +449,14 @@
SmallString<128> path_storage;
SmallVector<wchar_t, 128> path_utf16;
- if (error_code ec = UTF8ToUTF16(path.toStringRef(path_storage),
+ StringRef path8 = path.toStringRef(path_storage);
+ // FIXME: We should detect as many "special file name" as possible.
+ if (path8.compare_lower("nul") == 0) {
+ result = file_status(file_type::character_file);
+ return success;
+ }
+
+ if (error_code ec = UTF8ToUTF16(path8,
path_utf16))
return ec;
More information about the llvm-commits
mailing list