From: Richard Trieu Date: Thu, 31 Jan 2019 04:33:11 +0000 (+0000) Subject: Add namespace to some types. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18fe2c5936a77484261539c570fecd6be33c476c;p=llvm Add namespace to some types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352725 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h index ddf9f168af2..d43aec68861 100644 --- a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h +++ b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h @@ -33,10 +33,10 @@ public: unsigned getStubAlignment() override { return 1; } - Expected + Expected processRelocationRef(unsigned SectionID, - relocation_iterator RelI, - const ObjectFile &Obj, + object::relocation_iterator RelI, + const object::ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs) override { diff --git a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h index b012da1cd5b..24b77d50569 100644 --- a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h +++ b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h @@ -21,9 +21,10 @@ namespace llvm { -static bool isThumbFunc(symbol_iterator Symbol, const ObjectFile &Obj, - section_iterator Section) { - Expected SymTypeOrErr = Symbol->getType(); +static bool isThumbFunc(object::symbol_iterator Symbol, + const object::ObjectFile &Obj, + object::section_iterator Section) { + Expected SymTypeOrErr = Symbol->getType(); if (!SymTypeOrErr) { std::string Buf; raw_string_ostream OS(Buf); @@ -32,12 +33,14 @@ static bool isThumbFunc(symbol_iterator Symbol, const ObjectFile &Obj, report_fatal_error(Buf); } - if (*SymTypeOrErr != SymbolRef::ST_Function) + if (*SymTypeOrErr != object::SymbolRef::ST_Function) return false; // We check the IMAGE_SCN_MEM_16BIT flag in the section of the symbol to tell // if it's thumb or not - return cast(Obj).getCOFFSection(*Section)->Characteristics & + return cast(Obj) + .getCOFFSection(*Section) + ->Characteristics & COFF::IMAGE_SCN_MEM_16BIT; } @@ -53,10 +56,10 @@ public: unsigned getStubAlignment() override { return 1; } - Expected + Expected processRelocationRef(unsigned SectionID, - relocation_iterator RelI, - const ObjectFile &Obj, + object::relocation_iterator RelI, + const object::ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs) override { auto Symbol = RelI->getSymbol(); diff --git a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h index a84f8dac8b8..07a3e7bd981 100644 --- a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h +++ b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h @@ -186,21 +186,21 @@ public: return std::make_tuple(Offset, RelType, Addend); } - Expected + Expected processRelocationRef(unsigned SectionID, - relocation_iterator RelI, - const ObjectFile &Obj, + object::relocation_iterator RelI, + const object::ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs) override { // If possible, find the symbol referred to in the relocation, // and the section that contains it. - symbol_iterator Symbol = RelI->getSymbol(); + object::symbol_iterator Symbol = RelI->getSymbol(); if (Symbol == Obj.symbol_end()) report_fatal_error("Unknown symbol in relocation"); auto SectionOrError = Symbol->getSection(); if (!SectionOrError) return SectionOrError.takeError(); - section_iterator SecI = *SectionOrError; + object::section_iterator SecI = *SectionOrError; // If there is no section, this must be an external reference. const bool IsExtern = SecI == Obj.section_end(); @@ -279,11 +279,11 @@ public: UnregisteredEHFrameSections.clear(); } - Error finalizeLoad(const ObjectFile &Obj, + Error finalizeLoad(const object::ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override { // Look for and record the EH frame section IDs. for (const auto &SectionPair : SectionMap) { - const SectionRef &Section = SectionPair.first; + const object::SectionRef &Section = SectionPair.first; StringRef Name; if (auto EC = Section.getName(Name)) return errorCodeToError(EC);