diff options
author | Bruno Ricci <riccibrun@gmail.com> | 2020-01-09 17:38:50 +0000 |
---|---|---|
committer | Bruno Ricci <riccibrun@gmail.com> | 2020-01-09 17:46:21 +0000 |
commit | 2fe45e029ddfa65880cfe5c3501db12a81cdcbd2 (patch) | |
tree | d34121cb354c0aafc6b7a188e12f83e17722c880 /llvm/lib/Support/Windows/Memory.inc | |
parent | 356b33516c2e0ef241066dded16d7ecc1f7aa8cc (diff) | |
download | bcm5719-llvm-2fe45e029ddfa65880cfe5c3501db12a81cdcbd2.tar.gz bcm5719-llvm-2fe45e029ddfa65880cfe5c3501db12a81cdcbd2.zip |
[Support][NFC] Make some helper functions "static" in Memory.inc
Diffstat (limited to 'llvm/lib/Support/Windows/Memory.inc')
-rw-r--r-- | llvm/lib/Support/Windows/Memory.inc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Support/Windows/Memory.inc b/llvm/lib/Support/Windows/Memory.inc index a67f9c7d0f3..c5566f9910a 100644 --- a/llvm/lib/Support/Windows/Memory.inc +++ b/llvm/lib/Support/Windows/Memory.inc @@ -19,9 +19,7 @@ // The Windows.h header must be the last one included. #include "WindowsSupport.h" -namespace { - -DWORD getWindowsProtectionFlags(unsigned Flags) { +static DWORD getWindowsProtectionFlags(unsigned Flags) { switch (Flags & llvm::sys::Memory::MF_RWE_MASK) { // Contrary to what you might expect, the Windows page protection flags // are not a bitwise combination of RWX values @@ -50,7 +48,7 @@ DWORD getWindowsProtectionFlags(unsigned Flags) { // While we'd be happy to allocate single pages, the Windows allocation // granularity may be larger than a single page (in practice, it is 64K) // so mapping less than that will create an unreachable fragment of memory. -size_t getAllocationGranularity() { +static size_t getAllocationGranularity() { SYSTEM_INFO Info; ::GetSystemInfo(&Info); if (Info.dwPageSize > Info.dwAllocationGranularity) @@ -91,8 +89,6 @@ static size_t enableProcessLargePages() { return 0; } -} // namespace - namespace llvm { namespace sys { |