Summary: A previous patch removed creating these entries in clang in favor of the backend emitting a callable kernel and having the runtime call that if present. The support for the old style was kept around in LLVM 18.0 but now that we have forked to 19.0 we should remove the support. The effect of this would be that an application linking against a newer libomptarget that still had the old constructors will no longer be called. In that case, they can either recompile or use the `libomptarget.so.18` that comes with the previous release.
25 lines
368 B
C++
25 lines
368 B
C++
// RUN: %libomptarget-compilexx-run-and-check-generic
|
|
// RUN: %libomptarget-compileoptxx-run-and-check-generic
|
|
|
|
#include <cstdio>
|
|
struct S {
|
|
S() : i(7) {}
|
|
~S() { foo(); }
|
|
int foo() { return i; }
|
|
|
|
private:
|
|
int i;
|
|
};
|
|
|
|
S s;
|
|
#pragma omp declare target(s)
|
|
|
|
int main() {
|
|
int r;
|
|
#pragma omp target map(from : r)
|
|
r = s.foo();
|
|
|
|
// CHECK: 7
|
|
printf("%i\n", r);
|
|
}
|