Files
dpalermo 57e2393bcd Revert "[OpenMP] Use ext linkage for kernels handles and globals handles keep…" (#203327)
Reverts llvm/llvm-project#202827

This change is breaking omp target template support:

https://github.com/ROCm/aomp/tree/aomp-dev/test/smoke/unique-kernel-name

```
[~/git/aomp/test/smoke/unique-kernel-name]$ AOMP=/COD/LATEST/trunk make run
/COD/LATEST/trunk/bin/clang++  -O2    -fopenmp --offload-arch=gfx90a   -D__OFFLOAD_ARCH_gfx90a__ b.cpp a.cpp -o unique-kernel-name
ld.lld: error: duplicate symbol: .offloading.entry.__omp_offloading_811_5962ffa__ZN3fooIfEC1Ev_l7
>>> defined at b.cpp
>>>            /tmp/b-1462b7.o:(.offloading.entry.__omp_offloading_811_5962ffa__ZN3fooIfEC1Ev_l7)
>>> defined at a.cpp
>>>            /tmp/a-40aac4.o:(llvm_offload_entries+0x0)
/mnt/COD/2026-06-11/trunk_23.0-0/bin/clang-linker-wrapper: error: 'ld.lld' failed
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [../Makefile.rules:62: unique-kernel-name] Error 1
```

The following template is included in both a.cpp & b.cpp:

```
[~/git/aomp23.0/aomp/test/smoke/unique-kernel-name]$ cat t.h
template<typename T>
class foo
{
public:
  foo()
  {
    #pragma omp target
    {
      T a;
    }
  }
};
```
2026-06-11 11:25:46 -05:00
..