[libomptarget] Fix CUDA plugin build regression
After 3ecd38c8e, the Handler.getELFObjectFile routine is no
longer available. Call ELF64LEObjectFile::create directly,
which should always be suitable for CUDA images.
GitOrigin-RevId: b64482e23eefaef7738fde35d0b7c4174aaa6597
diff --git a/libomptarget/plugins-nextgen/cuda/src/rtl.cpp b/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
index f85a00c..e9742c9 100644
--- a/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
+++ b/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
@@ -1160,7 +1160,7 @@
// automatically so we must create it ourselves. The backend will emit
// several globals that contain function pointers we can call. These are
// prefixed with a known name due to Nvidia's lack of section support.
- auto ELFObjOrErr = Handler.getELFObjectFile(Image);
+ auto ELFObjOrErr = ELF64LEObjectFile::create(Image.getMemoryBuffer());
if (!ELFObjOrErr)
return ELFObjOrErr.takeError();