[llvm] [llvm-ifs] Treat unknown symbol types as error. (PR #75872)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 19 11:13:43 PST 2023


================
@@ -68,7 +68,7 @@ TEST(ElfYamlTextAPI, YAMLReadsTBESymbols) {
       "  - { Name: baz, Type: TLS, Size: 3 }\n"
       "  - { Name: foo, Type: Func, Warning: \"Deprecated!\" }\n"
       "  - { Name: nor, Type: NoType, Undefined: true }\n"
-      "  - { Name: not, Type: File, Undefined: true, Size: 111, "
+      "  - { Name: not, Type: NoType, Undefined: true, Size: 111, "
----------------
zeroomega wrote:

Yes, it tested the unknown symbol type should resulted in an unknown result. Though in practice, we think it is wrong to silently treat an unknown symbol to NoType (when generating ELF from the IFS stub). Some times, hand written IFS file may contain typos and it could be unnoticed.  

This test also test the Warning attribute so I decide to change the type to NoType and keep it.

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


More information about the llvm-commits mailing list