mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
Use a ::get method to create the attribute from Attributes::AttrVals instead of a constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,18 +28,18 @@ using namespace llvm;
|
||||
// Attributes Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Attributes::Attributes(LLVMContext &C, ArrayRef<AttrVal> Vals) {
|
||||
Attributes::Attributes(AttributesImpl *A) : Attrs(A) {}
|
||||
|
||||
Attributes::Attributes(const Attributes &A) : Attrs(A.Attrs) {}
|
||||
|
||||
Attributes Attributes::get(LLVMContext &Context, ArrayRef<AttrVal> Vals) {
|
||||
Attributes::Builder B;
|
||||
for (ArrayRef<AttrVal>::iterator I = Vals.begin(), E = Vals.end();
|
||||
I != E; ++I)
|
||||
B.addAttribute(*I);
|
||||
Attrs = Attributes::get(C, B).Attrs;
|
||||
return Attributes::get(Context, B);
|
||||
}
|
||||
|
||||
Attributes::Attributes(AttributesImpl *A) : Attrs(A) {}
|
||||
|
||||
Attributes::Attributes(const Attributes &A) : Attrs(A.Attrs) {}
|
||||
|
||||
Attributes Attributes::get(LLVMContext &Context, Attributes::Builder &B) {
|
||||
// If there are no attributes, return an empty Attributes class.
|
||||
if (B.Bits == 0)
|
||||
@@ -186,8 +186,7 @@ std::string Attributes::getAsString() const {
|
||||
// Attributes::Builder Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Attributes::Builder &Attributes::Builder::
|
||||
addAttribute(Attributes::AttrVal Val) {
|
||||
Attributes::Builder &Attributes::Builder::addAttribute(Attributes::AttrVal Val){
|
||||
Bits |= AttributesImpl::getAttrMask(Val);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user