[llvm] [XCOFF] make related SD symbols as isFunction (PR #69553)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 27 13:59:43 PDT 2023


================
@@ -1242,10 +1242,8 @@ bool XCOFFSymbolRef::isFunction() const {
 
   const XCOFFCsectAuxRef CsectAuxRef = ExpCsectAuxEnt.get();
 
-  // A function definition should be a label definition.
-  // FIXME: This is not necessarily the case when -ffunction-sections is
-  // enabled.
-  if (!CsectAuxRef.isLabel())
+  // A function definition should not be a common type symbol.
+  if (CsectAuxRef.getSymbolType() == XCOFF::XTY_CM)
     return false;
----------------
stephenpeckham wrote:

Need to check for a label at the same address.

https://github.com/llvm/llvm-project/pull/69553


More information about the llvm-commits mailing list