Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.

llvm-svn: 79799
This commit is contained in:
Anders Carlsson 2009-08-23 01:01:04 +00:00
parent fd90b168ba
commit beac2bef4d
2 changed files with 3 additions and 16 deletions

View File

@ -330,5 +330,5 @@ CGRecordLayoutBuilder::ComputeLayout(CodeGenTypes &Types,
Types.addBitFieldInfo(Info.FD, Info.FieldNo, Info.Start, Info.Size); Types.addBitFieldInfo(Info.FD, Info.FieldNo, Info.Start, Info.Size);
} }
return new CGRecordLayout(Ty, llvm::SmallSet<unsigned, 8>()); return new CGRecordLayout(Ty);
} }

View File

@ -54,29 +54,16 @@ namespace CodeGen {
class CGRecordLayout { class CGRecordLayout {
CGRecordLayout(); // DO NOT IMPLEMENT CGRecordLayout(); // DO NOT IMPLEMENT
public: public:
CGRecordLayout(const llvm::Type *T, CGRecordLayout(const llvm::Type *T)
const llvm::SmallSet<unsigned, 8> &PF) : STy(T) { }
: STy(T), PaddingFields(PF) {
// FIXME : Collect info about fields that requires adjustments
// (i.e. fields that do not directly map to llvm struct fields.)
}
/// getLLVMType - Return llvm type associated with this record. /// getLLVMType - Return llvm type associated with this record.
const llvm::Type *getLLVMType() const { const llvm::Type *getLLVMType() const {
return STy; return STy;
} }
bool isPaddingField(unsigned No) const {
return PaddingFields.count(No) != 0;
}
unsigned getNumPaddingFields() {
return PaddingFields.size();
}
private: private:
const llvm::Type *STy; const llvm::Type *STy;
llvm::SmallSet<unsigned, 8> PaddingFields;
}; };
/// CodeGenTypes - This class organizes the cross-module state that is used /// CodeGenTypes - This class organizes the cross-module state that is used