mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Rough out a new c'tor for the AttrBuilder class.
This c'tor takes the AttributeSet class as the parameter. It will eventually grab the attributes from the specified index and create a new attribute builder with those attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -241,6 +241,26 @@ std::string Attribute::getAsString() const {
|
||||
// AttrBuilder Method Implementations
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
AttrBuilder::AttrBuilder(AttributeSet AS, unsigned Idx)
|
||||
: Alignment(0), StackAlignment(0) {
|
||||
AttributeSetImpl *pImpl = AS.AttrList;
|
||||
if (!pImpl) return;
|
||||
|
||||
ArrayRef<AttributeWithIndex> AttrList = pImpl->getAttributes();
|
||||
const AttributeWithIndex *AWI = 0;
|
||||
for (unsigned I = 0, E = AttrList.size(); I != E; ++I)
|
||||
if (AttrList[I].Index == Idx) {
|
||||
AWI = &AttrList[I];
|
||||
break;
|
||||
}
|
||||
|
||||
assert(AWI && "Cannot find index in attribute set!");
|
||||
|
||||
/// FIXME: This will be modified in the future. Basically, the
|
||||
/// AttributeWithIndex class will contain the
|
||||
|
||||
}
|
||||
|
||||
void AttrBuilder::clear() {
|
||||
Attrs.clear();
|
||||
Alignment = StackAlignment = 0;
|
||||
|
Reference in New Issue
Block a user