Support/FileSystem: Fix copy_file implementation to use toNullTerminatedStringRef
instead of toStringRef. The file system APIs need c strings.

llvm-svn: 120601
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc
index cb80731..b1f8ae0 100644
--- a/llvm/lib/Support/Windows/PathV2.inc
+++ b/llvm/lib/Support/Windows/PathV2.inc
@@ -104,8 +104,8 @@
   // Get arguments.
   SmallString<128> from_storage;
   SmallString<128> to_storage;
-  StringRef f = from.toStringRef(from_storage);
-  StringRef t = to.toStringRef(to_storage);
+  StringRef f = from.toNullTerminatedStringRef(from_storage);
+  StringRef t = to.toNullTerminatedStringRef(to_storage);
 
   // Convert to utf-16.
   SmallVector<wchar_t, 128> wide_from;