[lld] 105fc90 - [LLD][MachO] Silence warning when building with MSVC
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 21 08:06:06 PDT 2025
Author: Alexandre Ganea
Date: 2025-09-21T11:05:50-04:00
New Revision: 105fc90b6b96e0edb7529062fcba513a3a347820
URL: https://github.com/llvm/llvm-project/commit/105fc90b6b96e0edb7529062fcba513a3a347820
DIFF: https://github.com/llvm/llvm-project/commit/105fc90b6b96e0edb7529062fcba513a3a347820.diff
LOG: [LLD][MachO] Silence warning when building with MSVC
Silence the following warning with latest MSVC:
```
C:\git\llvm-project\lld\MachO\Driver.cpp(358): warning C4189: 't': local variable is initialized but not referenced
```
Added:
Modified:
lld/MachO/Driver.cpp
Removed:
################################################################################
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 3db638e1ead96..5a9b5b66d01b5 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -354,8 +354,10 @@ void multiThreadedPageInBackground(DeferredFiles &deferred) {
// Reference all file's mmap'd pages to load them into memory.
for (const char *page = buff.data(), *end = page + buff.size(); page < end;
- page += pageSize)
+ page += pageSize) {
LLVM_ATTRIBUTE_UNUSED volatile char t = *page;
+ (void)t;
+ }
};
#if LLVM_ENABLE_THREADS
{ // Create scope for waiting for the taskGroup
More information about the llvm-commits
mailing list