[llvm] f5e3c03 - Fix buildbots after c074f5234d29439116f0e0be6033ea9331e85394.

Alexey Lapshin via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 05:22:59 PST 2020


Author: Alexey Lapshin
Date: 2020-02-28T16:20:29+03:00
New Revision: f5e3c0399ddd9462d2d1365dd6f59ad4f36cefad

URL: https://github.com/llvm/llvm-project/commit/f5e3c0399ddd9462d2d1365dd6f59ad4f36cefad
DIFF: https://github.com/llvm/llvm-project/commit/f5e3c0399ddd9462d2d1365dd6f59ad4f36cefad.diff

LOG: Fix buildbots after c074f5234d29439116f0e0be6033ea9331e85394.

Removed unused function getSectionByName() from dsymutil/DwarfStreamer.cpp.

Added: 
    

Modified: 
    llvm/tools/dsymutil/DwarfStreamer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/dsymutil/DwarfStreamer.cpp b/llvm/tools/dsymutil/DwarfStreamer.cpp
index d000c454fd4f..8719054f40db 100644
--- a/llvm/tools/dsymutil/DwarfStreamer.cpp
+++ b/llvm/tools/dsymutil/DwarfStreamer.cpp
@@ -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;


        


More information about the llvm-commits mailing list