diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-01-26 18:48:36 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-01-26 18:48:36 +0000 |
commit | 6ac3f739ca4cd90b41388cc50070a6bca85b6842 (patch) | |
tree | c6439c11ed75e6552c6b7f4a0c7ff84cfa29ce8e /llvm/lib/Support/Unix/Memory.inc | |
parent | 3d0c46d489400c7a4fd1c06e3150a0c8fc0cca37 (diff) | |
download | bcm5719-llvm-6ac3f739ca4cd90b41388cc50070a6bca85b6842.tar.gz bcm5719-llvm-6ac3f739ca4cd90b41388cc50070a6bca85b6842.zip |
Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; other minor fixes.
Differential revision: reviews.llvm.org/D16568
llvm-svn: 258831
Diffstat (limited to 'llvm/lib/Support/Unix/Memory.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Memory.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc index d70319168b8..f3463e58173 100644 --- a/llvm/lib/Support/Unix/Memory.inc +++ b/llvm/lib/Support/Unix/Memory.inc @@ -73,7 +73,7 @@ int getPosixProtectionFlags(unsigned Flags) { return PROT_NONE; } -} // namespace +} // anonymous namespace namespace llvm { namespace sys { @@ -265,7 +265,7 @@ bool Memory::setWritable (MemoryBlock &M, std::string *ErrMsg) { } bool Memory::setExecutable (MemoryBlock &M, std::string *ErrMsg) { - if (M.Address == 0 || M.Size == 0) return false; + if (M.Address == nullptr || M.Size == 0) return false; Memory::InvalidateInstructionCache(M.Address, M.Size); #if defined(__APPLE__) && (defined(__arm__) || defined(__arm64__)) kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)M.Address, |