summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-08 19:59:07 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-08 19:59:07 +0000
commitf20eacbc78c204acb547d17352f4d7d49d59ce63 (patch)
treefa31e86c9bd748e132eb7a28fde53b9fe9f4f0d9 /llvm
parentaa8ad10c2f9aa58b6a1219ab51e2d15d05cc61dc (diff)
downloadbcm5719-llvm-f20eacbc78c204acb547d17352f4d7d49d59ce63.tar.gz
bcm5719-llvm-f20eacbc78c204acb547d17352f4d7d49d59ce63.zip
Don't rely on destructed local storage. Thanks, Chris.
llvm-svn: 35769
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index fc40f788620..7f6afc6bee2 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -281,8 +281,8 @@ recurseDirectories(const sys::Path& path,
for (std::set<sys::Path>::iterator I = content.begin(), E = content.end();
I != E; ++I) {
// Make sure it exists and is a directory
- const sys::FileStatus *Status =
- sys::PathWithStatus(*I).getFileStatus(false, ErrMsg);
+ sys::PathWithStatus PwS(*I);
+ const sys::FileStatus *Status = PwS.getFileStatus(false, ErrMsg);
if (!Status)
return true;
if (Status->isDir) {
@@ -310,8 +310,8 @@ bool buildPaths(bool checkExistence, std::string* ErrMsg) {
if (!aPath.exists())
throw std::string("File does not exist: ") + Members[i];
std::string Err;
- const sys::FileStatus *si =
- sys::PathWithStatus(aPath).getFileStatus(false, &Err);
+ sys::PathWithStatus PwS(aPath);
+ const sys::FileStatus *si = PwS.getFileStatus(false, &Err);
if (!si)
throw Err;
if (si->isDir) {
@@ -647,8 +647,8 @@ doReplaceOrInsert(std::string* ErrMsg) {
if (found != remaining.end()) {
std::string Err;
- const sys::FileStatus *si =
- sys::PathWithStatus(*found).getFileStatus(false, &Err);
+ sys::PathWithStatus PwS(*found);
+ const sys::FileStatus *si = PwS.getFileStatus(false, &Err);
if (!si)
return true;
if (si->isDir) {
OpenPOWER on IntegriCloud