[lld] [clang] [llvm] [clang-tools-extra] [Object][Wasm] Allow parsing of GC types in type and table sections (PR #79235)

Derek Schuff via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 16:55:25 PST 2024


================
@@ -259,10 +259,13 @@ class InputFunction : public InputChunk {
         file->codeSection->Content.slice(inputSectionOffset, function->Size);
     debugName = function->DebugName;
     comdat = function->Comdat;
+    assert(s.Kind != WasmSignature::Placeholder);
----------------
dschuff wrote:

My guess with the assert was that we should never get here, because we would never expect to see a file with a symbol table that also had GC. But yeah, also enforcing it on entry to the linker makes sense. I wonder if a more specific or meaningful error message would make sense (I guess in this case if you tried to link something that just happened to have some unrelated GC types, the link error would be the same as if there were no linking section).

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


More information about the cfe-commits mailing list