diff lld/wasm/SymbolTable.h @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children 2e18cbf3894f
line wrap: on
line diff
--- a/lld/wasm/SymbolTable.h	Mon May 25 11:50:15 2020 +0900
+++ b/lld/wasm/SymbolTable.h	Mon May 25 11:55:54 2020 +0900
@@ -15,6 +15,7 @@
 #include "lld/Common/LLVM.h"
 #include "llvm/ADT/CachedHashString.h"
 #include "llvm/ADT/DenseSet.h"
+#include "llvm/ADT/Optional.h"
 
 namespace lld {
 namespace wasm {
@@ -59,14 +60,18 @@
   Symbol *addDefinedEvent(StringRef name, uint32_t flags, InputFile *file,
                           InputEvent *e);
 
-  Symbol *addUndefinedFunction(StringRef name, StringRef importName,
-                               StringRef importModule, uint32_t flags,
-                               InputFile *file, const WasmSignature *signature,
+  Symbol *addUndefinedFunction(StringRef name,
+                               llvm::Optional<StringRef> importName,
+                               llvm::Optional<StringRef> importModule,
+                               uint32_t flags, InputFile *file,
+                               const WasmSignature *signature,
                                bool isCalledDirectly);
   Symbol *addUndefinedData(StringRef name, uint32_t flags, InputFile *file);
-  Symbol *addUndefinedGlobal(StringRef name, StringRef importName,
-                             StringRef importModule,  uint32_t flags,
-                             InputFile *file, const WasmGlobalType *type);
+  Symbol *addUndefinedGlobal(StringRef name,
+                             llvm::Optional<StringRef> importName,
+                             llvm::Optional<StringRef> importModule,
+                             uint32_t flags, InputFile *file,
+                             const WasmGlobalType *type);
 
   void addLazy(ArchiveFile *f, const llvm::object::Archive::Symbol *sym);
 
@@ -103,7 +108,7 @@
   llvm::DenseMap<llvm::CachedHashStringRef, int> symMap;
   std::vector<Symbol *> symVector;
 
-  // For certain symbols types, e.g. function symbols, we allow for muliple
+  // For certain symbols types, e.g. function symbols, we allow for multiple
   // variants of the same symbol with different signatures.
   llvm::DenseMap<llvm::CachedHashStringRef, std::vector<Symbol *>> symVariants;