[llvm] r253933 - [RuntimeDyld] Avoid unused-private-field warning; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 14:59:36 PST 2015
Author: sanjoy
Date: Mon Nov 23 16:59:36 2015
New Revision: 253933
URL: http://llvm.org/viewvc/llvm-project?rev=253933&view=rev
Log:
[RuntimeDyld] Avoid unused-private-field warning; NFC
Fixes the no asserts -Werror,-Wunused-private-field build.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h?rev=253933&r1=253932&r2=253933&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h Mon Nov 23 16:59:36 2015
@@ -82,7 +82,11 @@ public:
size_t allocationSize, uintptr_t objAddress)
: Name(name), Address(address), Size(size),
LoadAddress(reinterpret_cast<uintptr_t>(address)), StubOffset(size),
- AllocationSize(allocationSize), ObjAddress(objAddress) {}
+ AllocationSize(allocationSize), ObjAddress(objAddress) {
+ // AllocationSize is used only in asserts, prevent an "unused private field"
+ // warning:
+ (void)AllocationSize;
+ }
StringRef getName() const { return Name; }
More information about the llvm-commits
mailing list