aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Process.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-31 23:23:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-31 23:23:35 +0000
commit814afe91ccad0e5e1f767303d780fa0318fa5212 (patch)
tree9905492e5626775b81a12370475b4325f59b8e3e /lib/Support/Process.cpp
parent02d75477cd9bed5acf46979869f041e7f9726200 (diff)
downloadexternal_llvm-814afe91ccad0e5e1f767303d780fa0318fa5212.zip
external_llvm-814afe91ccad0e5e1f767303d780fa0318fa5212.tar.gz
external_llvm-814afe91ccad0e5e1f767303d780fa0318fa5212.tar.bz2
Flesh out a page size accessor in the new API.
Implement the old API in terms of the new one. This simplifies the implementation on Windows which can now re-use the self_process's once initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Process.cpp')
-rw-r--r--lib/Support/Process.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Support/Process.cpp b/lib/Support/Process.cpp
index 1e21d64..9d87b77 100644
--- a/lib/Support/Process.cpp
+++ b/lib/Support/Process.cpp
@@ -55,6 +55,14 @@ self_process::~self_process() {
#endif
+//===----------------------------------------------------------------------===//
+// Implementations of legacy functions in terms of the new self_process object.
+
+unsigned Process::GetPageSize() {
+ return process::get_self()->page_size();
+}
+
+
// Include the platform-specific parts of this class.
#ifdef LLVM_ON_UNIX
#include "Unix/Process.inc"