From 9de6eef6d033a187ec887cff42e742add92eca6e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 9 Jun 2014 23:32:20 +0000 Subject: Reorder Value and User fields to save 8 bytes of padding on 64-bit Reviewered by: rafael Differential Revision: http://reviews.llvm.org/D4073 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210501 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Value.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/IR') diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp index cc599745d5..f392512c3e 100644 --- a/lib/IR/Value.cpp +++ b/lib/IR/Value.cpp @@ -38,13 +38,12 @@ using namespace llvm; static inline Type *checkType(Type *Ty) { assert(Ty && "Value defined with a null type: Error!"); - return const_cast(Ty); + return Ty; } Value::Value(Type *ty, unsigned scid) - : SubclassID(scid), HasValueHandle(0), - SubclassOptionalData(0), SubclassData(0), VTy((Type*)checkType(ty)), - UseList(nullptr), Name(nullptr) { + : VTy(checkType(ty)), UseList(nullptr), Name(nullptr), SubclassID(scid), + HasValueHandle(0), SubclassOptionalData(0), SubclassData(0) { // FIXME: Why isn't this in the subclass gunk?? // Note, we cannot call isa before the CallInst has been // constructed. -- cgit v1.2.3