From 971e769479a2947a55cc253dc9750fd2a361367a Mon Sep 17 00:00:00 2001
From: Yichao Yu <yyc1992@gmail.com>
Date: Fri, 17 Jul 2020 00:26:39 -0400
Subject: [PATCH] Fix C++ code compilation on ARM with LLVM10 (#36674)

---
 src/debuginfo.cpp |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/src/debuginfo.cpp
+++ b/src/debuginfo.cpp
@@ -275,14 +275,17 @@ public:
                 auto sName = section.getName();
                 if (!sName)
                     continue;
+                if (sName.get() != ".ARM.exidx") {
+                    continue;
+                }
 #else
                 StringRef sName;
                 if (section.getName(sName))
                     continue;
-#endif
                 if (sName != ".ARM.exidx") {
                     continue;
                 }
+#endif
             }
             uint64_t loadaddr = L.getSectionLoadAddress(section);
             size_t seclen = section.getSize();
