Flesh out a page size accessor in the new API.
[oota-llvm.git] / lib / Support / Process.cpp
index 5f8655efc6e8d7c4cd10e0d06877ba78e363c6f9..9d87b7744b8cebd92eb54cf41c3326c67e262ae2 100644 (file)
@@ -15,7 +15,7 @@
 #include "llvm/Support/Process.h"
 #include "llvm/Support/ErrorHandling.h"
 
-namespace llvm {
+using namespace llvm;
 using namespace sys;
 
 //===----------------------------------------------------------------------===//
@@ -47,7 +47,6 @@ self_process *process::get_self() {
 // instance should live until the process terminates to avoid the potential for
 // racy accesses during shutdown.
 self_process::~self_process() {
-    assert(TempDirectory->exists() && "Who has removed TempDirectory?");
   llvm_unreachable("This destructor must never be executed!");
 }
 
@@ -55,8 +54,15 @@ self_process::~self_process() {
 #pragma warning(pop)
 #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"