[sancov] blacklist support.
[oota-llvm.git] / tools / lli / RemoteTarget.cpp
index 561055f43bd0db4b3b8ab4a872df89aeb16881f3..95e1511eaaf533c790b01ec7a561143fe9fab027 100644 (file)
@@ -1,4 +1,4 @@
-//===- RemoteTarget.cpp - LLVM Remote process JIT execution --------------===//
+//===- RemoteTarget.cpp - LLVM Remote process JIT execution -----*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -13,7 +13,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "RemoteTarget.h"
-#include "RemoteTargetExternal.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Memory.h"
@@ -31,9 +30,9 @@ using namespace llvm;
 
 bool RemoteTarget::allocateSpace(size_t Size, unsigned Alignment,
                                  uint64_t &Address) {
-  sys::MemoryBlock *Prev = Allocations.size() ? &Allocations.back() : NULL;
+  sys::MemoryBlock *Prev = Allocations.size() ? &Allocations.back() : nullptr;
   sys::MemoryBlock Mem = sys::Memory::AllocateRWX(Size, Prev, &ErrorMsg);
-  if (Mem.base() == NULL)
+  if (Mem.base() == nullptr)
     return false;
   if ((uintptr_t)Mem.base() % Alignment) {
     ErrorMsg = "unable to allocate sufficiently aligned memory";
@@ -57,7 +56,7 @@ bool RemoteTarget::loadCode(uint64_t Address, const void *Data, size_t Size) {
 }
 
 bool RemoteTarget::executeCode(uint64_t Address, int &RetVal) {
-  int (*fn)(void) = (int(*)(void))Address;
+  int (*fn)() = (int(*)())Address;
   RetVal = fn();
   return true;
 }