Elements.push_back(llvm::ConstantInt::get(LongTy, info));
if (isMeta) {
llvm::TargetData td(&TheModule);
- Elements.push_back(llvm::ConstantInt::get(LongTy,
- td.getTypeSizeInBits(ClassTy)/8));
+ Elements.push_back(
+ llvm::ConstantInt::get(LongTy,
+ td.getTypeSizeInBits(ClassTy) /
+ CGM.getContext().getCharWidth()));
} else
Elements.push_back(InstanceSize);
Elements.push_back(IVars);
Elements.push_back(llvm::ConstantInt::get(LongTy, RuntimeVersion));
// sizeof(ModuleTy)
llvm::TargetData td(&TheModule);
- Elements.push_back(llvm::ConstantInt::get(LongTy,
- td.getTypeSizeInBits(ModuleTy)/8));
+ Elements.push_back(
+ llvm::ConstantInt::get(LongTy,
+ td.getTypeSizeInBits(ModuleTy) /
+ CGM.getContext().getCharWidth()));
// The path to the source file where this module was declared
SourceManager &SM = CGM.getContext().getSourceManager();