forked from OSchip/llvm-project
Fix buildbots after c074f5234d
.
Removed unused function getSectionByName() from dsymutil/DwarfStreamer.cpp.
This commit is contained in:
parent
39c4246e1e
commit
f5e3c0399d
|
@ -22,28 +22,6 @@
|
|||
namespace llvm {
|
||||
namespace dsymutil {
|
||||
|
||||
/// Retrieve the section named \a SecName in \a Obj.
|
||||
///
|
||||
/// To accommodate for platform discrepancies, the name passed should be
|
||||
/// (for example) 'debug_info' to match either '__debug_info' or '.debug_info'.
|
||||
/// This function will strip the initial platform-specific characters.
|
||||
static Optional<object::SectionRef>
|
||||
getSectionByName(const object::ObjectFile &Obj, StringRef SecName) {
|
||||
for (const object::SectionRef &Section : Obj.sections()) {
|
||||
StringRef SectionName;
|
||||
if (Expected<StringRef> NameOrErr = Section.getName())
|
||||
SectionName = *NameOrErr;
|
||||
else
|
||||
consumeError(NameOrErr.takeError());
|
||||
|
||||
SectionName = SectionName.substr(SectionName.find_first_not_of("._"));
|
||||
if (SectionName != SecName)
|
||||
continue;
|
||||
return Section;
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
bool DwarfStreamer::init(Triple TheTriple) {
|
||||
std::string ErrorStr;
|
||||
std::string TripleName;
|
||||
|
|
Loading…
Reference in New Issue