mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
IR: Cleanup AttributeSet::get for AttrBuilder
We don't modify the AttrBuilder in AttributeSet::get, make the reference argument const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -596,7 +596,8 @@ AttributeSet AttributeSet::get(LLVMContext &C,
|
||||
return getImpl(C, Attrs);
|
||||
}
|
||||
|
||||
AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index, AttrBuilder &B) {
|
||||
AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index,
|
||||
const AttrBuilder &B) {
|
||||
if (!B.hasAttributes())
|
||||
return AttributeSet();
|
||||
|
||||
@@ -618,9 +619,9 @@ AttributeSet AttributeSet::get(LLVMContext &C, unsigned Index, AttrBuilder &B) {
|
||||
}
|
||||
|
||||
// Add target-dependent (string) attributes.
|
||||
for (AttrBuilder::td_iterator I = B.td_begin(), E = B.td_end();
|
||||
I != E; ++I)
|
||||
Attrs.push_back(std::make_pair(Index, Attribute::get(C, I->first,I->second)));
|
||||
for (const AttrBuilder::td_type &TDA : B.td_attrs())
|
||||
Attrs.push_back(
|
||||
std::make_pair(Index, Attribute::get(C, TDA.first, TDA.second)));
|
||||
|
||||
return get(C, Attrs);
|
||||
}
|
||||
|
Reference in New Issue
Block a user