Fix this for std::vectors which don't have .data().
authorDan Gohman <gohman@apple.com>
Mon, 19 Apr 2010 16:33:28 +0000 (16:33 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 19 Apr 2010 16:33:28 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101785 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Path.inc

index a0bfe295223d64ed446475ee11b25a2f5408b468..9be28169fa1b28d014655e341833af84157a8e61 100644 (file)
@@ -863,7 +863,7 @@ Path::makeUnique(bool reuse_current, std::string* ErrMsg) {
   // libSupport. And performance isn't critical here.
   std::vector<char> Buf;
   Buf.resize(path.size()+8);
-  char *FNBuffer = Buf.data();
+  char *FNBuffer = &Buf[0];
     path.copy(FNBuffer,path.size());
   if (isDirectory())
     strcpy(FNBuffer+path.size(), "/XXXXXX");