diff options
Diffstat (limited to 'lld/wasm/InputFiles.h')
-rw-r--r-- | lld/wasm/InputFiles.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lld/wasm/InputFiles.h b/lld/wasm/InputFiles.h index 7c8601e29f2..64ac208daa6 100644 --- a/lld/wasm/InputFiles.h +++ b/lld/wasm/InputFiles.h @@ -69,6 +69,13 @@ protected: // List of all symbols referenced or defined by this file. std::vector<Symbol *> Symbols; + // Bool for each symbol, true if called directly. This allows us to implement + // a weaker form of signature checking where undefined functions that are not + // called directly (i.e. only address taken) don't have to match the defined + // function's signature. We cannot do this for directly called functions + // because those signatures are checked at validation times. + // See https://bugs.llvm.org/show_bug.cgi?id=40412 + std::vector<bool> SymbolIsCalledDirectly; private: const Kind FileKind; @@ -138,7 +145,7 @@ public: private: Symbol *createDefined(const WasmSymbol &Sym); - Symbol *createUndefined(const WasmSymbol &Sym); + Symbol *createUndefined(const WasmSymbol &Sym, bool IsCalledDirectly); bool isExcludedByComdat(InputChunk *Chunk) const; |