diff --git a/gen/toir.cpp b/gen/toir.cpp index b4184c47b4..9d8f3af079 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -1194,10 +1194,11 @@ public: // This is a bit more convoluted than it would need to be, because it // has to take templated interface methods into account, for which // isFinalFunc is not necessarily true. - // Also, private methods are always not virtual. + // Also, private/package methods are always non-virtual. const bool nonFinal = !fdecl->isFinalFunc() && (fdecl->isAbstract() || fdecl->isVirtual()) && - fdecl->prot().kind != PROTprivate; + fdecl->prot().kind != PROTprivate && + fdecl->prot().kind != PROTpackage; // Get the actual function value to call. LLValue *funcval = nullptr; diff --git a/tests/d2/dmd-testsuite b/tests/d2/dmd-testsuite index 25c2a1be48..331edbc588 160000 --- a/tests/d2/dmd-testsuite +++ b/tests/d2/dmd-testsuite @@ -1 +1 @@ -Subproject commit 25c2a1be486b6cb60584f5a74fa978450559dbbd +Subproject commit 331edbc588b60f6adee8eddb78bed97415bc95da diff --git a/utils/gen_gccbuiltins.cpp b/utils/gen_gccbuiltins.cpp index fdc8c5d356..29a0baeb47 100644 --- a/utils/gen_gccbuiltins.cpp +++ b/utils/gen_gccbuiltins.cpp @@ -111,7 +111,11 @@ void processRecord(raw_ostream& os, Record& rec, string arch) replace(name.begin(), name.end(), '_', '.'); name = string("llvm.") + name; +#if LDC_LLVM_VER >= 309 + ListInit* propsList = rec.getValueAsListInit("IntrProperties"); +#else ListInit* propsList = rec.getValueAsListInit("Properties"); +#endif string prop = #if LDC_LLVM_VER >= 307 propsList->size() @@ -166,7 +170,7 @@ void processRecord(raw_ostream& os, Record& rec, string arch) for(size_t i = 1; i < params.size(); i++) os << ", " << params[i]; - os << ")" + attributes(rec.getValueAsListInit("Properties")) + ";\n\n"; + os << ")" + attributes(propsList) + ";\n\n"; } std::string arch;