summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Coroutines
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-04-28 23:01:32 +0000
committerHans Wennborg <hans@hanshq.net>2017-04-28 23:01:32 +0000
commit0f88d863b477afef36f02fd11a96abd9eb5563a5 (patch)
tree564f3c06fa76fd25d150342cb55ba3f8785e5421 /llvm/lib/Transforms/Coroutines
parente0f9e984fd7e6c02016b16eb355e788a645091ee (diff)
downloadbcm5719-llvm-0f88d863b477afef36f02fd11a96abd9eb5563a5.tar.gz
bcm5719-llvm-0f88d863b477afef36f02fd11a96abd9eb5563a5.zip
Revert r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList"
This broke the Clang build. (Clang-side patch missing?) Original commit message: > [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: 301712
Diffstat (limited to 'llvm/lib/Transforms/Coroutines')
-rw-r--r--llvm/lib/Transforms/Coroutines/CoroSplit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
index f5bb5cc274d..ab648f884c5 100644
--- a/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroSplit.cpp
@@ -245,7 +245,9 @@ static Function *createClone(Function &F, Twine Suffix, coro::Shape &Shape,
// Remove old return attributes.
NewF->removeAttributes(
AttributeList::ReturnIndex,
- AttributeFuncs::typeIncompatible(NewF->getReturnType()));
+ AttributeList::get(
+ NewF->getContext(), AttributeList::ReturnIndex,
+ AttributeFuncs::typeIncompatible(NewF->getReturnType())));
// Make AllocaSpillBlock the new entry block.
auto *SwitchBB = cast<BasicBlock>(VMap[ResumeEntry]);
OpenPOWER on IntegriCloud