diff options
| author | Reid Kleckner <rnk@google.com> | 2017-04-28 21:48:28 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2017-04-28 21:48:28 +0000 |
| commit | 608c8b63b3945f4a17eadb6dd0a973b1b049bfe2 (patch) | |
| tree | 3e946806c348fd1196aa35871e7abfaf5e8712b9 /llvm/lib/Target | |
| parent | e8dea1bc562fc949f1d9318c4b38f3a7e79ba27f (diff) | |
| download | bcm5719-llvm-608c8b63b3945f4a17eadb6dd0a973b1b049bfe2.tar.gz bcm5719-llvm-608c8b63b3945f4a17eadb6dd0a973b1b049bfe2.zip | |
[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList
This change cleans up call sites and avoids creating temporary
AttributeList objects.
NFC
llvm-svn: 301697
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/Mips/Mips16HardFloat.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/Mips16HardFloat.cpp b/llvm/lib/Target/Mips/Mips16HardFloat.cpp index a71b161b24c..5a394fe02f1 100644 --- a/llvm/lib/Target/Mips/Mips16HardFloat.cpp +++ b/llvm/lib/Target/Mips/Mips16HardFloat.cpp @@ -490,15 +490,14 @@ static void createFPFnStub(Function *F, Module *M, FPParamVariant PV, // remove the use-soft-float attribute // static void removeUseSoftFloat(Function &F) { - AttributeList A; + AttrBuilder B; DEBUG(errs() << "removing -use-soft-float\n"); - A = A.addAttribute(F.getContext(), AttributeList::FunctionIndex, - "use-soft-float", "false"); - F.removeAttributes(AttributeList::FunctionIndex, A); + B.addAttribute("use-soft-float", "false"); + F.removeAttributes(AttributeList::FunctionIndex, B); if (F.hasFnAttribute("use-soft-float")) { DEBUG(errs() << "still has -use-soft-float\n"); } - F.addAttributes(AttributeList::FunctionIndex, A); + F.addAttributes(AttributeList::FunctionIndex, B); } |

