[PATCH] D48693: [WebAssembly] LTO: Fix signatures of bitcode symbols

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 28 08:47:27 PDT 2018


dexonsmith added inline comments.


================
Comment at: wasm/Driver.cpp:260-261
     // added via "--undefined"), but weak undefined ones do have a signature.
-    assert(FuncSym->getFunctionType());
-    const WasmSignature &Sig = *FuncSym->getFunctionType();
+    assert(FuncSym->FunctionType);
+    const WasmSignature &Sig = *FuncSym->FunctionType;
 
----------------
ruiu wrote:
> Do you need this assert? I think if it is a nullptr, it will crash immediately on the next line, so that assert() doesn't seem that useful.
I don't think it will crash here without some sort of sanitizer.  Saving a reference in `Sig` doesn't load from the pointer.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48693





More information about the llvm-commits mailing list