From 15dcad9e36029d715163d1c374a042d1e50f281f Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 31 Dec 2012 23:23:35 +0000 Subject: 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 --- llvm/lib/Support/Process.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'llvm/lib/Support/Process.cpp') 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" -- cgit v1.2.3