summaryrefslogtreecommitdiff
path: root/lld/Common
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@legionlabs.com>2022-01-16 09:17:29 -0500
committerAlexandre Ganea <alexandre.ganea@legionlabs.com>2022-01-16 09:17:39 -0500
commit30a4020a7db866990199f523a60ad474d7ec3efa (patch)
tree6f1f56c247fdb059cd9ef4dc8f7a734fa6ae1c2a /lld/Common
parent4608b1d726daa808abf08f0f0860636a7b20771f (diff)
downloadllvm-30a4020a7db866990199f523a60ad474d7ec3efa.tar.gz
[LLD] Supplement with more comments. Clarify the intention in f860fe362282ed69b9d4503a20e5d20b9a041189.
Diffstat (limited to 'lld/Common')
-rw-r--r--lld/Common/CommonLinkerContext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/Common/CommonLinkerContext.cpp b/lld/Common/CommonLinkerContext.cpp
index 75a58e84e03a..e4f6e367f78f 100644
--- a/lld/Common/CommonLinkerContext.cpp
+++ b/lld/Common/CommonLinkerContext.cpp
@@ -13,7 +13,10 @@
using namespace llvm;
using namespace lld;
-// Reference to the current LLD instance.
+// Reference to the current LLD instance. This is a temporary situation, until
+// we pass this context everywhere by reference, or we make it a thread_local,
+// as in https://reviews.llvm.org/D108850?id=370678 where each thread can be
+// associated with a LLD instance. Only then will LLD be free of global state.
static CommonLinkerContext *lctx;
CommonLinkerContext::CommonLinkerContext() { lctx = this; }