diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-06-09 23:32:20 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-06-09 23:32:20 +0000 |
commit | 9de6eef6d033a187ec887cff42e742add92eca6e (patch) | |
tree | a4f966d57c2be35672b99197189449a535b84366 /lib | |
parent | f31ecd39273231fccc53785f518023d70f85a02a (diff) | |
download | llvm-9de6eef6d033a187ec887cff42e742add92eca6e.tar.gz llvm-9de6eef6d033a187ec887cff42e742add92eca6e.tar.bz2 llvm-9de6eef6d033a187ec887cff42e742add92eca6e.tar.xz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IR/Value.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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<Type*>(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<CallInst> before the CallInst has been // constructed. |