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

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 01:19:46 PST 2023


================
@@ -1288,7 +1288,7 @@ Expected<bool> XCOFFSymbolRef::isFunction() const {
   if (CsectAuxRef.getSymbolType() == XCOFF::XTY_LD)
     return true;
 
-  return false;
+  return createError("csect symbol has no valid symbol type.");
----------------
jh7370 wrote:

My request had three parts to it:
1) Following the coding standards.
2) Improve grammar.
3) Add more context.

1) and 2) are independent of 3) which is the one you've commented on.

Regarding 3) and the symbol type, what happens if the binary data contains a value that isn't present in the enum for the type field (for example)? Additional context could include, for example, that raw value (whatever it is).

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


More information about the llvm-commits mailing list