diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld')
7 files changed, 50 insertions, 50 deletions
diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp index 136f7a5d74..741aa58350 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp @@ -31,8 +31,8 @@ namespace llvm { RTDyldMemoryManager::~RTDyldMemoryManager() {} -#if defined(HAVE_REGISTER_FRAME) && defined(HAVE_DEREGISTER_FRAME) && \ - !defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) +#if defined(HAVE_REGISTER_FRAME) && defined(HAVE_DEREGISTER_FRAME) && \ + !defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) extern "C" void __register_frame(void *); extern "C" void __deregister_frame(void *); #else diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index b5c64db21f..e49e6e541f 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -1206,19 +1206,19 @@ Error RuntimeDyldImpl::resolveExternalSymbols() { void RuntimeDyldImpl::finalizeAsync( std::unique_ptr<RuntimeDyldImpl> This, - unique_function<void(object::OwningBinary<object::ObjectFile>, - std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, Error)> + unique_function<void(object::OwningBinary<object::ObjectFile>, + std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, Error)> OnEmitted, - object::OwningBinary<object::ObjectFile> O, - std::unique_ptr<RuntimeDyld::LoadedObjectInfo> Info) { + object::OwningBinary<object::ObjectFile> O, + std::unique_ptr<RuntimeDyld::LoadedObjectInfo> Info) { auto SharedThis = std::shared_ptr<RuntimeDyldImpl>(std::move(This)); auto PostResolveContinuation = - [SharedThis, OnEmitted = std::move(OnEmitted), O = std::move(O), - Info = std::move(Info)]( + [SharedThis, OnEmitted = std::move(OnEmitted), O = std::move(O), + Info = std::move(Info)]( Expected<JITSymbolResolver::LookupResult> Result) mutable { if (!Result) { - OnEmitted(std::move(O), std::move(Info), Result.takeError()); + OnEmitted(std::move(O), std::move(Info), Result.takeError()); return; } @@ -1232,11 +1232,11 @@ void RuntimeDyldImpl::finalizeAsync( SharedThis->registerEHFrames(); std::string ErrMsg; if (SharedThis->MemMgr.finalizeMemory(&ErrMsg)) - OnEmitted(std::move(O), std::move(Info), + OnEmitted(std::move(O), std::move(Info), make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode())); else - OnEmitted(std::move(O), std::move(Info), Error::success()); + OnEmitted(std::move(O), std::move(Info), Error::success()); }; JITSymbolResolver::LookupSet Symbols; @@ -1428,12 +1428,12 @@ void jitLinkForORC( object::OwningBinary<object::ObjectFile> O, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver, bool ProcessAllSections, - unique_function<Error(const object::ObjectFile &Obj, - RuntimeDyld::LoadedObjectInfo &LoadedObj, - std::map<StringRef, JITEvaluatedSymbol>)> + unique_function<Error(const object::ObjectFile &Obj, + RuntimeDyld::LoadedObjectInfo &LoadedObj, + std::map<StringRef, JITEvaluatedSymbol>)> OnLoaded, - unique_function<void(object::OwningBinary<object::ObjectFile>, - std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, Error)> + unique_function<void(object::OwningBinary<object::ObjectFile>, + std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, Error)> OnEmitted) { RuntimeDyld RTDyld(MemMgr, Resolver); @@ -1442,17 +1442,17 @@ void jitLinkForORC( auto Info = RTDyld.loadObject(*O.getBinary()); if (RTDyld.hasError()) { - OnEmitted(std::move(O), std::move(Info), - make_error<StringError>(RTDyld.getErrorString(), - inconvertibleErrorCode())); + OnEmitted(std::move(O), std::move(Info), + make_error<StringError>(RTDyld.getErrorString(), + inconvertibleErrorCode())); return; } - if (auto Err = OnLoaded(*O.getBinary(), *Info, RTDyld.getSymbolTable())) - OnEmitted(std::move(O), std::move(Info), std::move(Err)); + if (auto Err = OnLoaded(*O.getBinary(), *Info, RTDyld.getSymbolTable())) + OnEmitted(std::move(O), std::move(Info), std::move(Err)); RuntimeDyldImpl::finalizeAsync(std::move(RTDyld.Dyld), std::move(OnEmitted), - std::move(O), std::move(Info)); + std::move(O), std::move(Info)); } } // end namespace llvm diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index 31d8109bf7..2fbe707ce8 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -352,7 +352,7 @@ private: RemainingExpr = RemainingExpr.substr(1).ltrim(); uint64_t StubAddr; - std::string ErrorMsg; + std::string ErrorMsg; std::tie(StubAddr, ErrorMsg) = Checker.getStubOrGOTAddrFor( StubContainerName, Symbol, PCtx.IsInsideLoad, IsStubAddr); @@ -389,7 +389,7 @@ private: RemainingExpr = RemainingExpr.substr(1).ltrim(); uint64_t StubAddr; - std::string ErrorMsg; + std::string ErrorMsg; std::tie(StubAddr, ErrorMsg) = Checker.getSectionAddr( FileName, SectionName, PCtx.IsInsideLoad); diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 03e62bf025..28e1faab5a 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -954,8 +954,8 @@ void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section, resolveARMRelocation(Section, Offset, (uint32_t)(Value & 0xffffffffL), Type, (uint32_t)(Addend & 0xffffffffL)); break; - case Triple::ppc: // Fall through. - case Triple::ppcle: + case Triple::ppc: // Fall through. + case Triple::ppcle: resolvePPC32Relocation(Section, Offset, Value, Type, Addend); break; case Triple::ppc64: // Fall through. @@ -1670,33 +1670,33 @@ RuntimeDyldELF::processRelocationRef( if (Value.SymbolName) { // This is a call to an external function. // Look for an existing stub. - SectionEntry *Section = &Sections[SectionID]; + SectionEntry *Section = &Sections[SectionID]; StubMap::const_iterator i = Stubs.find(Value); uintptr_t StubAddress; if (i != Stubs.end()) { - StubAddress = uintptr_t(Section->getAddress()) + i->second; + StubAddress = uintptr_t(Section->getAddress()) + i->second; LLVM_DEBUG(dbgs() << " Stub function found\n"); } else { // Create a new stub function (equivalent to a PLT entry). LLVM_DEBUG(dbgs() << " Create a new stub function\n"); - uintptr_t BaseAddress = uintptr_t(Section->getAddress()); + uintptr_t BaseAddress = uintptr_t(Section->getAddress()); uintptr_t StubAlignment = getStubAlignment(); StubAddress = - (BaseAddress + Section->getStubOffset() + StubAlignment - 1) & + (BaseAddress + Section->getStubOffset() + StubAlignment - 1) & -StubAlignment; unsigned StubOffset = StubAddress - BaseAddress; Stubs[Value] = StubOffset; createStubFunction((uint8_t *)StubAddress); // Bump our stub offset counter - Section->advanceStubOffset(getMaxStubSize()); + Section->advanceStubOffset(getMaxStubSize()); // Allocate a GOT Entry uint64_t GOTOffset = allocateGOTEntries(1); - // This potentially creates a new Section which potentially - // invalidates the Section pointer, so reload it. - Section = &Sections[SectionID]; + // This potentially creates a new Section which potentially + // invalidates the Section pointer, so reload it. + Section = &Sections[SectionID]; // The load of the GOT address has an addend of -4 resolveGOTOffsetRelocation(SectionID, StubOffset + 2, GOTOffset - 4, @@ -1709,7 +1709,7 @@ RuntimeDyldELF::processRelocationRef( } // Make the target call a call into the stub table. - resolveRelocation(*Section, Offset, StubAddress, ELF::R_X86_64_PC32, + resolveRelocation(*Section, Offset, StubAddress, ELF::R_X86_64_PC32, Addend); } else { RelocationEntry RE(SectionID, Offset, ELF::R_X86_64_PC32, Value.Addend, diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index 49e3dbc7fe..d34fae9aaf 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -535,12 +535,12 @@ public: static void finalizeAsync( std::unique_ptr<RuntimeDyldImpl> This, - unique_function<void(object::OwningBinary<object::ObjectFile>, - std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, - Error)> + unique_function<void(object::OwningBinary<object::ObjectFile>, + std::unique_ptr<RuntimeDyld::LoadedObjectInfo>, + Error)> OnEmitted, - object::OwningBinary<object::ObjectFile> O, - std::unique_ptr<RuntimeDyld::LoadedObjectInfo> Info); + object::OwningBinary<object::ObjectFile> O, + std::unique_ptr<RuntimeDyld::LoadedObjectInfo> Info); void reassignSectionAddress(unsigned SectionID, uint64_t Addr); diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h index f600432e0b..9df3e2e3c3 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h @@ -113,10 +113,10 @@ public: // The MemoryManager can make sure this is always true by forcing the // memory layout to be: CodeSection < ReadOnlySection < ReadWriteSection. const uint64_t ImageBase = getImageBase(); - if (Value < ImageBase || ((Value - ImageBase) > UINT32_MAX)) - report_fatal_error("IMAGE_REL_AMD64_ADDR32NB relocation requires an " - "ordered section layout"); - else { + if (Value < ImageBase || ((Value - ImageBase) > UINT32_MAX)) + report_fatal_error("IMAGE_REL_AMD64_ADDR32NB relocation requires an " + "ordered section layout"); + else { write32BitOffset(Target, RE.Addend, Value - ImageBase); } break; diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/ya.make b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/ya.make index 68dac33fc3..44d7dea118 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/ya.make +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/ya.make @@ -12,12 +12,12 @@ LICENSE(Apache-2.0 WITH LLVM-exception) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) PEERDIR( - contrib/libs/llvm12 - contrib/libs/llvm12/include - contrib/libs/llvm12/lib/IR - contrib/libs/llvm12/lib/MC - contrib/libs/llvm12/lib/Object - contrib/libs/llvm12/lib/Support + contrib/libs/llvm12 + contrib/libs/llvm12/include + contrib/libs/llvm12/lib/IR + contrib/libs/llvm12/lib/MC + contrib/libs/llvm12/lib/Object + contrib/libs/llvm12/lib/Support ) ADDINCL( |