OSDN Git Service

Const-correctness.
authorMikhail Glushenkov <foldr@codedgers.com>
Tue, 8 Sep 2009 19:51:39 +0000 (19:51 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Tue, 8 Sep 2009 19:51:39 +0000 (19:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81249 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Program.h
lib/System/Unix/Program.inc
lib/System/Win32/Program.inc

index f6fe794..316585d 100644 (file)
@@ -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
index ce75710..f5290b4 100644 (file)
@@ -38,7 +38,7 @@ Program::Program() : Data_(0) {}
 
 Program::~Program() {}
 
-unsigned Program::GetPid() {
+unsigned Program::GetPid() const {
   return reinterpret_cast<unsigned>(Data_);
 }
 
index b23fdce..87f9e64 100644 (file)
@@ -35,7 +35,7 @@ Program::~Program() {
   }
 }
 
-unsigned Program::GetPid() {
+unsigned Program::GetPid() const {
   HANDLE hProcess = reinterpret_cast<HANDLE>(Data_);
   return GetProcessId(hProcess);
 }