aboutsummaryrefslogtreecommitdiff
path: root/unittests/ExecutionEngine
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-03 20:26:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-03 20:26:11 +0000
commit148779df305667b6942fee7e758fdf81a6498f38 (patch)
tree976d85fb9cb4bc8ed54348b045f742be90e10c57 /unittests/ExecutionEngine
parenta303c417bbdb53703c2c17398b08486bde78f1f6 (diff)
downloadsrc-148779df305667b6942fee7e758fdf81a6498f38.tar.gz
src-148779df305667b6942fee7e758fdf81a6498f38.zip
Vendor import of llvm trunk r302069:vendor/llvm/llvm-trunk-r302069
Notes
Notes: svn path=/vendor/llvm/dist/; revision=317760 svn path=/vendor/llvm/llvm-trunk-r302069/; revision=317761; tag=vendor/llvm/llvm-trunk-r302069
Diffstat (limited to 'unittests/ExecutionEngine')
-rw-r--r--unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp b/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp
index 4af3aa707a90..ab43c4af13f1 100644
--- a/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp
+++ b/unittests/ExecutionEngine/Orc/IndirectionUtilsTest.cpp
@@ -20,17 +20,15 @@ TEST(IndirectionUtilsTest, MakeStub) {
LLVMContext Context;
ModuleBuilder MB(Context, "x86_64-apple-macosx10.10", "");
Function *F = MB.createFunctionDecl<void(DummyStruct, DummyStruct)>("");
- SmallVector<AttributeList, 4> Attrs;
- Attrs.push_back(
- AttributeList::get(MB.getModule()->getContext(), 1U,
- AttrBuilder().addAttribute(Attribute::StructRet)));
- Attrs.push_back(
- AttributeList::get(MB.getModule()->getContext(), 2U,
- AttrBuilder().addAttribute(Attribute::ByVal)));
- Attrs.push_back(
- AttributeList::get(MB.getModule()->getContext(), ~0U,
- AttrBuilder().addAttribute(Attribute::NoUnwind)));
- F->setAttributes(AttributeList::get(MB.getModule()->getContext(), Attrs));
+ AttributeSet FnAttrs = AttributeSet::get(
+ Context, AttrBuilder().addAttribute(Attribute::NoUnwind));
+ AttributeSet RetAttrs; // None
+ AttributeSet ArgAttrs[2] = {
+ AttributeSet::get(Context,
+ AttrBuilder().addAttribute(Attribute::StructRet)),
+ AttributeSet::get(Context, AttrBuilder().addAttribute(Attribute::ByVal)),
+ };
+ F->setAttributes(AttributeList::get(Context, FnAttrs, RetAttrs, ArgAttrs));
auto ImplPtr = orc::createImplPointer(*F->getType(), *MB.getModule(), "", nullptr);
orc::makeStub(*F, *ImplPtr);