[llvm] r352725 - Add namespace to some types.
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 20:33:11 PST 2019
Author: rtrieu
Date: Wed Jan 30 20:33:11 2019
New Revision: 352725
URL: http://llvm.org/viewvc/llvm-project?rev=352725&view=rev
Log:
Add namespace to some types.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h?rev=352725&r1=352724&r2=352725&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h Wed Jan 30 20:33:11 2019
@@ -33,10 +33,10 @@ public:
unsigned getStubAlignment() override { return 1; }
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
- const ObjectFile &Obj,
+ object::relocation_iterator RelI,
+ const object::ObjectFile &Obj,
ObjSectionToIDMap &ObjSectionToID,
StubMap &Stubs) override {
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h?rev=352725&r1=352724&r2=352725&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h Wed Jan 30 20:33:11 2019
@@ -21,9 +21,10 @@
namespace llvm {
-static bool isThumbFunc(symbol_iterator Symbol, const ObjectFile &Obj,
- section_iterator Section) {
- Expected<SymbolRef::Type> SymTypeOrErr = Symbol->getType();
+static bool isThumbFunc(object::symbol_iterator Symbol,
+ const object::ObjectFile &Obj,
+ object::section_iterator Section) {
+ Expected<object::SymbolRef::Type> SymTypeOrErr = Symbol->getType();
if (!SymTypeOrErr) {
std::string Buf;
raw_string_ostream OS(Buf);
@@ -32,12 +33,14 @@ static bool isThumbFunc(symbol_iterator
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<COFFObjectFile>(Obj).getCOFFSection(*Section)->Characteristics &
+ return cast<object::COFFObjectFile>(Obj)
+ .getCOFFSection(*Section)
+ ->Characteristics &
COFF::IMAGE_SCN_MEM_16BIT;
}
@@ -53,10 +56,10 @@ public:
unsigned getStubAlignment() override { return 1; }
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
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();
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h?rev=352725&r1=352724&r2=352725&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h Wed Jan 30 20:33:11 2019
@@ -186,21 +186,21 @@ public:
return std::make_tuple(Offset, RelType, Addend);
}
- Expected<relocation_iterator>
+ Expected<object::relocation_iterator>
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);
More information about the llvm-commits
mailing list