summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-12 22:16:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-12 22:16:55 +0000
commit01d3cb816771a8de2f8ba5878106f8709c1cc36f (patch)
treea2cb407930bbc4b7f8c31e77f097f80157e0d0ad /utils
parentf8f75df34604f3d4390bcc3463d79afa8656c94f (diff)
downloadllvm-01d3cb816771a8de2f8ba5878106f8709c1cc36f.tar.gz
llvm-01d3cb816771a8de2f8ba5878106f8709c1cc36f.tar.bz2
llvm-01d3cb816771a8de2f8ba5878106f8709c1cc36f.tar.xz
Fix the build of KillTheDoctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/KillTheDoctor/KillTheDoctor.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/utils/KillTheDoctor/KillTheDoctor.cpp b/utils/KillTheDoctor/KillTheDoctor.cpp
index 619fd3ff1b..84f9b19f95 100644
--- a/utils/KillTheDoctor/KillTheDoctor.cpp
+++ b/utils/KillTheDoctor/KillTheDoctor.cpp
@@ -170,10 +170,10 @@ namespace {
typedef ScopedHandle<FileHandle> FileScopedHandle;
}
-static error_code windows_error(DWORD E) { return mapWindowsError(E); }
+static std::error_code windows_error(DWORD E) { return mapWindowsError(E); }
-static error_code GetFileNameFromHandle(HANDLE FileHandle,
- std::string& Name) {
+static std::error_code GetFileNameFromHandle(HANDLE FileHandle,
+ std::string &Name) {
char Filename[MAX_PATH+1];
bool Success = false;
Name.clear();
@@ -213,7 +213,7 @@ static error_code GetFileNameFromHandle(HANDLE FileHandle,
return windows_error(::GetLastError());
else {
Name = Filename;
- return error_code();
+ return std::error_code();
}
}
@@ -223,7 +223,8 @@ static error_code GetFileNameFromHandle(HANDLE FileHandle,
/// extension is present, try all extensions in PATHEXT.
/// @return If ec == errc::success, The absolute path to the program. Otherwise
/// the return value is undefined.
-static std::string FindProgram(const std::string &Program, error_code &ec) {
+static std::string FindProgram(const std::string &Program,
+ std::error_code &ec) {
char PathName[MAX_PATH + 1];
typedef SmallVector<StringRef, 12> pathext_t;
pathext_t pathext;
@@ -252,7 +253,7 @@ static std::string FindProgram(const std::string &Program, error_code &ec) {
break;
} else {
// We found the path! Return it.
- ec = error_code();
+ ec = std::error_code();
break;
}
}
@@ -315,7 +316,7 @@ int main(int argc, char **argv) {
std::string CommandLine(ProgramToRun);
- error_code ec;
+ std::error_code ec;
ProgramToRun = FindProgram(ProgramToRun, ec);
if (ec) {
errs() << ToolName << ": Failed to find program: '" << CommandLine
@@ -359,8 +360,8 @@ int main(int argc, char **argv) {
&StartupInfo,
&ProcessInfo);
if (!success) {
- errs() << ToolName << ": Failed to run program: '" << ProgramToRun
- << "': " << error_code(windows_error(::GetLastError())).message()
+ errs() << ToolName << ": Failed to run program: '" << ProgramToRun << "': "
+ << std::error_code(windows_error(::GetLastError())).message()
<< '\n';
return -1;
}