summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Mips16HardFloat.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-05-02 22:07:37 +0000
committerReid Kleckner <rnk@google.com>2017-05-02 22:07:37 +0000
commitee4930b6886d713778fff4de3948946c7658d9d9 (patch)
tree24f60ae0cadbe03c5b098d2c86bba5ebfd88636f /llvm/lib/Target/Mips/Mips16HardFloat.cpp
parent65134057357725c245fcfeb4b588518ef6d6db20 (diff)
downloadbcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.tar.gz
bcm5719-llvm-ee4930b6886d713778fff4de3948946c7658d9d9.zip
Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"
This time, I fixed, built, and tested clang. This reverts r301712. llvm-svn: 301981
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16HardFloat.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16HardFloat.cpp9
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);
}
OpenPOWER on IntegriCloud