From e703fcb9757820fe27d9ef98ce3775d9c6d6e898 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 24 Apr 2014 06:44:33 +0000 Subject: [C++] Use 'nullptr'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207083 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 65b544dcaf..cc2f29d9df 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -106,7 +106,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectImage *InputObject) { std::unique_ptr Obj(InputObject); if (!Obj) - return NULL; + return nullptr; // Save information about our target Arch = (Triple::ArchType)Obj->getArch(); @@ -426,7 +426,7 @@ unsigned RuntimeDyldImpl::emitSection(ObjectImage &Obj, uintptr_t Allocate; unsigned SectionID = Sections.size(); uint8_t *Addr; - const char *pData = 0; + const char *pData = nullptr; // Some sections, such as debug info, don't need to be loaded for execution. // Leave those where they are. @@ -467,7 +467,7 @@ unsigned RuntimeDyldImpl::emitSection(ObjectImage &Obj, // to handle later processing (and by 'handle' I mean don't do anything // with these sections). Allocate = 0; - Addr = 0; + Addr = nullptr; DEBUG(dbgs() << "emitSection SectionID: " << SectionID << " Name: " << Name << " obj addr: " << format("%p", data.data()) << " new addr: 0" << " DataSize: " << DataSize << " StubBufSize: " << StubBufSize @@ -612,7 +612,7 @@ void RuntimeDyldImpl::resolveRelocationList(const RelocationList &Relocs, for (unsigned i = 0, e = Relocs.size(); i != e; ++i) { const RelocationEntry &RE = Relocs[i]; // Ignore relocations for sections that were not loaded - if (Sections[RE.SectionID].Address == 0) + if (Sections[RE.SectionID].Address == nullptr) continue; resolveRelocation(RE, Value); } @@ -677,7 +677,7 @@ RuntimeDyld::RuntimeDyld(RTDyldMemoryManager *mm) { // though the public class spawns a new 'impl' instance for each load, // they share a single memory manager. This can become a problem when page // permissions are applied. - Dyld = 0; + Dyld = nullptr; MM = mm; ProcessAllSections = false; } @@ -766,7 +766,7 @@ ObjectImage *RuntimeDyld::loadObject(ObjectBuffer *InputBuffer) { void *RuntimeDyld::getSymbolAddress(StringRef Name) { if (!Dyld) - return NULL; + return nullptr; return Dyld->getSymbolAddress(Name); } -- cgit v1.2.3