forked from OSchip/llvm-project
[Reapply r128773. This is not the source of the issues Devang was seeing
with debug info.] Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No change in functionality intended. llvm-svn: 129048
This commit is contained in:
parent
c0e86fb965
commit
3a09bc5ab0
|
@ -2438,7 +2438,7 @@ int64_t CodeGenVTables::getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
|
|||
VirtualBaseClassOffsetOffsetsMapTy::iterator I =
|
||||
VirtualBaseClassOffsetOffsets.find(ClassPair);
|
||||
if (I != VirtualBaseClassOffsetOffsets.end())
|
||||
return I->second;
|
||||
return I->second.getQuantity();
|
||||
|
||||
VCallAndVBaseOffsetBuilder Builder(RD, RD, /*FinalOverriders=*/0,
|
||||
BaseSubobject(RD, CharUnits::Zero()),
|
||||
|
@ -2452,13 +2452,13 @@ int64_t CodeGenVTables::getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
|
|||
ClassPairTy ClassPair(RD, I->first);
|
||||
|
||||
VirtualBaseClassOffsetOffsets.insert(
|
||||
std::make_pair(ClassPair, I->second.getQuantity()));
|
||||
std::make_pair(ClassPair, I->second));
|
||||
}
|
||||
|
||||
I = VirtualBaseClassOffsetOffsets.find(ClassPair);
|
||||
assert(I != VirtualBaseClassOffsetOffsets.end() && "Did not find index!");
|
||||
|
||||
return I->second;
|
||||
return I->second.getQuantity();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
@ -2910,7 +2910,7 @@ void CodeGenVTables::ComputeVTableRelatedInformation(const CXXRecordDecl *RD,
|
|||
ClassPairTy ClassPair(RD, I->first);
|
||||
|
||||
VirtualBaseClassOffsetOffsets.insert(
|
||||
std::make_pair(ClassPair, I->second.getQuantity()));
|
||||
std::make_pair(ClassPair, I->second));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -103,9 +103,9 @@ class CodeGenVTables {
|
|||
const CXXRecordDecl *> ClassPairTy;
|
||||
|
||||
/// VirtualBaseClassOffsetOffsets - Contains the vtable offset (relative to
|
||||
/// the address point) in bytes where the offsets for virtual bases of a class
|
||||
/// the address point) in chars where the offsets for virtual bases of a class
|
||||
/// are stored.
|
||||
typedef llvm::DenseMap<ClassPairTy, int64_t>
|
||||
typedef llvm::DenseMap<ClassPairTy, CharUnits>
|
||||
VirtualBaseClassOffsetOffsetsMapTy;
|
||||
VirtualBaseClassOffsetOffsetsMapTy VirtualBaseClassOffsetOffsets;
|
||||
|
||||
|
|
Loading…
Reference in New Issue