Fix buildbots after c074f5234d.

Removed unused function getSectionByName() from dsymutil/DwarfStreamer.cpp.
This commit is contained in:
Alexey Lapshin 2020-02-28 15:06:53 +03:00
parent 39c4246e1e
commit f5e3c0399d
1 changed files with 0 additions and 22 deletions

View File

@ -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;