summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Coroutines
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-04-28 21:48:28 +0000
committerReid Kleckner <rnk@google.com>2017-04-28 21:48:28 +0000
commit608c8b63b3945f4a17eadb6dd0a973b1b049bfe2 (patch)
tree3e946806c348fd1196aa35871e7abfaf5e8712b9 /llvm/lib/Transforms/Coroutines
parente8dea1bc562fc949f1d9318c4b38f3a7e79ba27f (diff)
downloadbcm5719-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/Transforms/Coroutines')
-rw-r--r--llvm/lib/Transforms/Coroutines/CoroSplit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
index ab648f884c5..f5bb5cc274d 100644
--- a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
@@ -245,9 +245,7 @@ static Function *createClone(Function &F, Twine Suffix, coro::Shape &Shape,
// Remove old return attributes.
NewF->removeAttributes(
AttributeList::ReturnIndex,
- AttributeList::get(
- NewF->getContext(), AttributeList::ReturnIndex,
- AttributeFuncs::typeIncompatible(NewF->getReturnType())));
+ AttributeFuncs::typeIncompatible(NewF->getReturnType()));
// Make AllocaSpillBlock the new entry block.
auto *SwitchBB = cast<BasicBlock>(VMap[ResumeEntry]);
OpenPOWER on IntegriCloud