From 22d4688ea436e9bae2f476cff84eaebea4c09a60 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 31 Mar 2023 19:27:01 -0700 Subject: [PATCH] [ORC] Prefer SectionRange::getRange convenience method. --- llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp index 7b99616..8e71375 100644 --- a/llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp @@ -584,7 +584,7 @@ Error ELFNixPlatform::registerInitInfo( for (auto *Sec : InitSections) { // FIXME: Avoid copy here. jitlink::SectionRange R(*Sec); - InitSeq->InitSections[Sec->getName()].push_back({R.getStart(), R.getEnd()}); + InitSeq->InitSections[Sec->getName()].push_back(R.getRange()); } return Error::success(); @@ -714,7 +714,7 @@ void ELFNixPlatform::ELFNixPlatformPlugin::addEHAndTLVSupportPasses( if (auto *EHFrameSection = G.findSectionByName(ELFEHFrameSectionName)) { jitlink::SectionRange R(*EHFrameSection); if (!R.empty()) - POSR.EHFrameSection = {R.getStart(), R.getEnd()}; + POSR.EHFrameSection = R.getRange(); } // Get a pointer to the thread data section if there is one. It will be used @@ -738,7 +738,7 @@ void ELFNixPlatform::ELFNixPlatformPlugin::addEHAndTLVSupportPasses( if (ThreadDataSection) { jitlink::SectionRange R(*ThreadDataSection); if (!R.empty()) - POSR.ThreadDataSection = {R.getStart(), R.getEnd()}; + POSR.ThreadDataSection = R.getRange(); } if (POSR.EHFrameSection.Start || POSR.ThreadDataSection.Start) { -- 2.7.4