[PATCH] Fix C++ code compilation on ARM with LLVM10 (#36674)
authorYichao Yu <yyc1992@gmail.com>
Fri, 17 Jul 2020 04:26:39 +0000 (00:26 -0400)
committerNorbert Preining <norbert@preining.info>
Thu, 12 Nov 2020 09:50:14 +0000 (09:50 +0000)
Gbp-Pq: Name upstream-971e7694-fix-arm-llvm.patch

src/debuginfo.cpp

index 0c53092d3e3a2cee9b5844a24e3182b3b47529af..3e01f108e3a3334de020bf295b060fad7ad8d324 100644 (file)
@@ -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();