[PATCH] D91852: [compiler-rt] [windows] Add UNUSED attributes on variables/functions only used for 64 bit targets
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 01:44:03 PST 2020
mstorsjo created this revision.
mstorsjo added reviewers: mcgov, amccarth.
Herald added subscribers: Sanitizers, dberris.
Herald added a project: Sanitizers.
mstorsjo requested review of this revision.
This fixes warnings when building for 32 bit targets.
Alternatively we could stick a few `(void)var;` in some 32-bit-only codepath.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91852
Files:
compiler-rt/lib/interception/interception_win.cpp
Index: compiler-rt/lib/interception/interception_win.cpp
===================================================================
--- compiler-rt/lib/interception/interception_win.cpp
+++ compiler-rt/lib/interception/interception_win.cpp
@@ -136,7 +136,7 @@
static const int kAddressLength = FIRST_32_SECOND_64(4, 8);
static const int kJumpInstructionLength = 5;
static const int kShortJumpInstructionLength = 2;
-static const int kIndirectJumpInstructionLength = 6;
+UNUSED static const int kIndirectJumpInstructionLength = 6;
static const int kBranchLength =
FIRST_32_SECOND_64(kJumpInstructionLength, kIndirectJumpInstructionLength);
static const int kDirectBranchLength = kBranchLength + kAddressLength;
@@ -165,7 +165,7 @@
return si.dwAllocationGranularity;
}
-static uptr RoundUpTo(uptr size, uptr boundary) {
+UNUSED static uptr RoundUpTo(uptr size, uptr boundary) {
return (size + boundary - 1) & ~(boundary - 1);
}
@@ -309,7 +309,7 @@
uptr max_size;
};
-static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
+UNUSED static const uptr kTrampolineScanLimitRange = 1 << 31; // 2 gig
static const int kMaxTrampolineRegion = 1024;
static TrampolineMemoryRegion TrampolineRegions[kMaxTrampolineRegion];
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91852.306623.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201120/0bc53983/attachment.bin>
More information about the llvm-commits
mailing list