diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-12-31 23:23:35 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-12-31 23:23:35 +0000 |
commit | 15dcad9e36029d715163d1c374a042d1e50f281f (patch) | |
tree | b18f66c66e626306aa8c232a319ec849343f946f /llvm/lib/Support/Process.cpp | |
parent | aadd30ec52c0e3a5fd478c9b89b4a33108d4affc (diff) | |
download | bcm5719-llvm-15dcad9e36029d715163d1c374a042d1e50f281f.tar.gz bcm5719-llvm-15dcad9e36029d715163d1c374a042d1e50f281f.zip |
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.
llvm-svn: 171330
Diffstat (limited to 'llvm/lib/Support/Process.cpp')
-rw-r--r-- | llvm/lib/Support/Process.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/Process.cpp b/llvm/lib/Support/Process.cpp index 1e21d64e601..9d87b7744b8 100644 --- a/llvm/lib/Support/Process.cpp +++ b/llvm/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" |