summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Process.inc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-04-21 16:12:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-04-21 16:12:57 +0000
commit2d45e25125911ddd5fafcb0cf84305d3e9649ac9 (patch)
tree7342ba1678328e9bfce5cc996e57aaf59ca5a5a9 /llvm/lib/System/Unix/Process.inc
parent5e92ead30d391fb863ac90fc406a863fb944a84b (diff)
downloadbcm5719-llvm-2d45e25125911ddd5fafcb0cf84305d3e9649ac9.tar.gz
bcm5719-llvm-2d45e25125911ddd5fafcb0cf84305d3e9649ac9.zip
Provide an implementation of the GetCurrentUserId and GetCurrentGroupId
methods that were recently added to the interface. llvm-svn: 21401
Diffstat (limited to 'llvm/lib/System/Unix/Process.inc')
-rw-r--r--llvm/lib/System/Unix/Process.inc10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/System/Unix/Process.inc b/llvm/lib/System/Unix/Process.inc
index 1c1373ebb5c..2f17e712fe7 100644
--- a/llvm/lib/System/Unix/Process.inc
+++ b/llvm/lib/System/Unix/Process.inc
@@ -109,6 +109,16 @@ Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time,
#endif
}
+int Process::GetCurrentUserId()
+{
+ return getuid();
+}
+
+int Process::GetCurrentGroupId()
+{
+ return getgid();
+}
+
// Some LLVM programs such as bugpoint produce core files as a normal part of
// their operation. To prevent the disk from filling up, this function
// does what's necessary to prevent their generation.
OpenPOWER on IntegriCloud