diff --git a/llvm/lib/ObjCopy/MachO/MachOObject.h b/llvm/lib/ObjCopy/MachO/MachOObject.h --- a/llvm/lib/ObjCopy/MachO/MachOObject.h +++ b/llvm/lib/ObjCopy/MachO/MachOObject.h @@ -57,14 +57,9 @@ StringRef Content; std::vector Relocations; - Section(StringRef SegName, StringRef SectName) - : Segname(std::string(SegName)), Sectname(std::string(SectName)), - CanonicalName((Twine(SegName) + Twine(',') + SectName).str()) {} - - Section(StringRef SegName, StringRef SectName, StringRef Content) - : Segname(std::string(SegName)), Sectname(std::string(SectName)), - CanonicalName((Twine(SegName) + Twine(',') + SectName).str()), - Content(Content) {} + Section(StringRef SegName, StringRef SectName); + + Section(StringRef SegName, StringRef SectName, StringRef Content); MachO::SectionType getType() const { return static_cast(Flags & MachO::SECTION_TYPE); diff --git a/llvm/lib/ObjCopy/MachO/MachOObject.cpp b/llvm/lib/ObjCopy/MachO/MachOObject.cpp --- a/llvm/lib/ObjCopy/MachO/MachOObject.cpp +++ b/llvm/lib/ObjCopy/MachO/MachOObject.cpp @@ -13,6 +13,15 @@ using namespace llvm; using namespace llvm::objcopy::macho; +Section::Section(StringRef SegName, StringRef SectName) + : Segname(std::string(SegName)), Sectname(std::string(SectName)), + CanonicalName((Twine(SegName) + Twine(',') + SectName).str()) {} + +Section::Section(StringRef SegName, StringRef SectName, StringRef Content) + : Segname(std::string(SegName)), Sectname(std::string(SectName)), + CanonicalName((Twine(SegName) + Twine(',') + SectName).str()), + Content(Content) {} + const SymbolEntry *SymbolTable::getSymbolByIndex(uint32_t Index) const { assert(Index < Symbols.size() && "invalid symbol index"); return Symbols[Index].get(); diff --git a/llvm/tools/llvm-ifs/ErrorCollector.h b/llvm/tools/llvm-ifs/ErrorCollector.h --- a/llvm/tools/llvm-ifs/ErrorCollector.h +++ b/llvm/tools/llvm-ifs/ErrorCollector.h @@ -21,13 +21,12 @@ #ifndef LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H #define LLVM_TOOLS_LLVM_IFS_ERRORCOLLECTOR_H +#include "llvm/Support/Error.h" #include "llvm/Support/raw_ostream.h" #include namespace llvm { -class Error; - namespace ifs { class ErrorCollector {