diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-01 20:37:42 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-01 20:37:42 +0000 |
commit | 795adf50615978b0f2ff2316b0264ec1b320f432 (patch) | |
tree | 8587b3bfa3ca86c2d50ef38ace9a3a9e1a4b925e /llvm/lib/Support/Unix/PathV2.inc | |
parent | f2cc8287ed6a37a6141a60c83f7e30fe288e9606 (diff) | |
download | bcm5719-llvm-795adf50615978b0f2ff2316b0264ec1b320f432.tar.gz bcm5719-llvm-795adf50615978b0f2ff2316b0264ec1b320f432.zip |
Support/FileSystem: Fix copy_file implementation to use toNullTerminatedStringRef
instead of toStringRef. The file system APIs need c strings.
llvm-svn: 120601
Diffstat (limited to 'llvm/lib/Support/Unix/PathV2.inc')
-rw-r--r-- | llvm/lib/Support/Unix/PathV2.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/PathV2.inc b/llvm/lib/Support/Unix/PathV2.inc index d12cd1647ed..0fa4b87cff2 100644 --- a/llvm/lib/Support/Unix/PathV2.inc +++ b/llvm/lib/Support/Unix/PathV2.inc @@ -71,8 +71,8 @@ error_code copy_file(const Twine &from, const Twine &to, copy_option copt) { // 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); const size_t buf_sz = 32768; char buffer[buf_sz]; |