projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2b5dc6
)
Don't assume ResultPath is null terminated.
author
Rafael Espindola
<rafael.espindola@gmail.com>
Tue, 25 Jun 2013 04:23:46 +0000
(
04:23
+0000)
committer
Rafael Espindola
<rafael.espindola@gmail.com>
Tue, 25 Jun 2013 04:23:46 +0000
(
04:23
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184824
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/PathV2.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/PathV2.cpp
b/lib/Support/PathV2.cpp
index cc654eea58b21a4bcc986b3364d9f19cdf161705..c0be6f4ea160519e577b909bed2eed04385eb75c 100644
(file)
--- a/
lib/Support/PathV2.cpp
+++ b/
lib/Support/PathV2.cpp
@@
-638,7
+638,8
@@
error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath,
if (close(FD))
return error_code(errno, system_category());
- return fs::remove(ResultPath.begin());
+ StringRef P(ResultPath.begin(), ResultPath.size());
+ return fs::remove(P);
}
error_code make_absolute(SmallVectorImpl<char> &path) {