Adjust sizeof(m_Buf) now that we have a new member. Re-order to avoid padding.

(cherry picked from commit d5508a3c3b963928270933f307dab97a2d1630bf)
This commit is contained in:
Axel Naumann 2013-12-04 11:26:49 +01:00 committed by sftnight
parent 2cefd7e994
commit c1c49658e2
2 changed files with 5 additions and 5 deletions

View File

@ -38,6 +38,9 @@ namespace cling {
/// of our type
long long getAllocSizeInBytes() const;
/// \brief Interpreter reference used to destruct the object.
Interpreter& m_Interp;
/// \brief Memory allocated for value, owned by this value
///
/// Points to memory allocated for storing the value, if it
@ -48,10 +51,7 @@ namespace cling {
///
/// Can be pointed-to by m_Mem to avoid extra memory allocation for
/// small values.
char m_Buf[80]; // increases sizeof(*this) from 48->128
/// \brief Interpreter reference used to destruct the object.
Interpreter& m_Interp;
char m_Buf[72]; // increases sizeof(*this) from 48->128
};
llvm::IntrusiveRefCntPtr<StoredValue> m_Value;

View File

@ -20,7 +20,7 @@ using namespace llvm;
StoredValueRef::StoredValue::StoredValue(Interpreter& interp,
QualType clangTy,
const llvm::Type* llvm_Ty)
: Value(GenericValue(), clangTy, llvm_Ty), m_Mem(0), m_Interp(interp) {
: Value(GenericValue(), clangTy, llvm_Ty), m_Interp(interp), m_Mem(0){
if (clangTy->isIntegralOrEnumerationType() ||
clangTy->isRealFloatingType() ||
clangTy->hasPointerRepresentation()) {