[lld] [lld][WebAssembly] Don't set importUndefined when -shared is used. NFC (PR #75241)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 12:11:41 PST 2023


https://github.com/sbc100 created https://github.com/llvm/llvm-project/pull/75241

`importUndefined` is only used a couple of places and both of those already handle `isPic` separately.

>From 37ad037f074dacf941cf30be2ffc07b68d5a4b01 Mon Sep 17 00:00:00 2001
From: Sam Clegg <sbc at chromium.org>
Date: Tue, 12 Dec 2023 12:09:16 -0800
Subject: [PATCH] [lld][WebAssembly] Don't set importUndefined when -shared is
 used. NFC

`importUndefined` is only used a couple of places and both of those
already handle `isPic` separately.
---
 lld/wasm/Driver.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index f8b0fc357bd90c..c68fe33a14e29d 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -606,7 +606,6 @@ static void setConfigs() {
       config->memoryImport =
           std::pair<llvm::StringRef, llvm::StringRef>(defaultModule, memoryName);
     }
-    config->importUndefined = true;
   }
 
   // If neither export-memory nor import-memory is specified, default to



More information about the llvm-commits mailing list