From: Mikhail Glushenkov Date: Tue, 8 Sep 2009 19:51:39 +0000 (+0000) Subject: Const-correctness. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c22675b5428d579d4eca15ee8a0ff701942738c4;p=oota-llvm.git Const-correctness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81249 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/System/Program.h b/include/llvm/System/Program.h index f6fe7946220..316585da999 100644 --- a/include/llvm/System/Program.h +++ b/include/llvm/System/Program.h @@ -40,7 +40,7 @@ namespace sys { ~Program(); /// Return process ID of this program. - unsigned GetPid(); + unsigned GetPid() const; /// This function executes the program using the \p arguments provided. The /// invoked program will inherit the stdin, stdout, and stderr file diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index ce757105f88..f5290b4075c 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -38,7 +38,7 @@ Program::Program() : Data_(0) {} Program::~Program() {} -unsigned Program::GetPid() { +unsigned Program::GetPid() const { return reinterpret_cast(Data_); } diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc index b23fdce7825..87f9e64e4c5 100644 --- a/lib/System/Win32/Program.inc +++ b/lib/System/Win32/Program.inc @@ -35,7 +35,7 @@ Program::~Program() { } } -unsigned Program::GetPid() { +unsigned Program::GetPid() const { HANDLE hProcess = reinterpret_cast(Data_); return GetProcessId(hProcess); }