diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt index f6e894d39968..25c879710645 100644 --- a/offload/CMakeLists.txt +++ b/offload/CMakeLists.txt @@ -377,7 +377,7 @@ add_subdirectory(DeviceRTL) add_subdirectory(tools) # Build target agnostic offloading library. -add_subdirectory(src) +add_subdirectory(libomptarget) add_subdirectory(tools/offload-tblgen) add_subdirectory(liboffload) diff --git a/offload/src/CMakeLists.txt b/offload/libomptarget/CMakeLists.txt similarity index 100% rename from offload/src/CMakeLists.txt rename to offload/libomptarget/CMakeLists.txt diff --git a/offload/src/DeviceImage.cpp b/offload/libomptarget/DeviceImage.cpp similarity index 100% rename from offload/src/DeviceImage.cpp rename to offload/libomptarget/DeviceImage.cpp diff --git a/offload/src/KernelLanguage/API.cpp b/offload/libomptarget/KernelLanguage/API.cpp similarity index 100% rename from offload/src/KernelLanguage/API.cpp rename to offload/libomptarget/KernelLanguage/API.cpp diff --git a/offload/src/LegacyAPI.cpp b/offload/libomptarget/LegacyAPI.cpp similarity index 100% rename from offload/src/LegacyAPI.cpp rename to offload/libomptarget/LegacyAPI.cpp diff --git a/offload/src/OffloadRTL.cpp b/offload/libomptarget/OffloadRTL.cpp similarity index 100% rename from offload/src/OffloadRTL.cpp rename to offload/libomptarget/OffloadRTL.cpp diff --git a/offload/src/OpenMP/API.cpp b/offload/libomptarget/OpenMP/API.cpp similarity index 99% rename from offload/src/OpenMP/API.cpp rename to offload/libomptarget/OpenMP/API.cpp index 62e27060b710..4576f9bd0612 100644 --- a/offload/src/OpenMP/API.cpp +++ b/offload/libomptarget/OpenMP/API.cpp @@ -655,8 +655,8 @@ EXTERN void *omp_get_mapped_ptr(const void *Ptr, int DeviceNum) { int NumDevices = omp_get_initial_device(); if (DeviceNum == NumDevices) { - DP("Device %d is initial device, returning Ptr " DPxMOD ".\n", - DeviceNum, DPxPTR(Ptr)); + DP("Device %d is initial device, returning Ptr " DPxMOD ".\n", DeviceNum, + DPxPTR(Ptr)); return const_cast(Ptr); } diff --git a/offload/src/OpenMP/InteropAPI.cpp b/offload/libomptarget/OpenMP/InteropAPI.cpp similarity index 100% rename from offload/src/OpenMP/InteropAPI.cpp rename to offload/libomptarget/OpenMP/InteropAPI.cpp diff --git a/offload/src/OpenMP/Mapping.cpp b/offload/libomptarget/OpenMP/Mapping.cpp similarity index 100% rename from offload/src/OpenMP/Mapping.cpp rename to offload/libomptarget/OpenMP/Mapping.cpp diff --git a/offload/src/OpenMP/OMPT/Callback.cpp b/offload/libomptarget/OpenMP/OMPT/Callback.cpp similarity index 100% rename from offload/src/OpenMP/OMPT/Callback.cpp rename to offload/libomptarget/OpenMP/OMPT/Callback.cpp diff --git a/offload/src/PluginManager.cpp b/offload/libomptarget/PluginManager.cpp similarity index 100% rename from offload/src/PluginManager.cpp rename to offload/libomptarget/PluginManager.cpp diff --git a/offload/src/device.cpp b/offload/libomptarget/device.cpp similarity index 100% rename from offload/src/device.cpp rename to offload/libomptarget/device.cpp diff --git a/offload/src/exports b/offload/libomptarget/exports similarity index 100% rename from offload/src/exports rename to offload/libomptarget/exports diff --git a/offload/src/interface.cpp b/offload/libomptarget/interface.cpp similarity index 99% rename from offload/src/interface.cpp rename to offload/libomptarget/interface.cpp index 624320428403..ea354400f2e9 100644 --- a/offload/src/interface.cpp +++ b/offload/libomptarget/interface.cpp @@ -294,7 +294,7 @@ static KernelArgsTy *upgradeKernelArgs(KernelArgsTy *KernelArgs, // FIXME: This is a WA to "calibrate" the bad work done in the front end. // Delete this ugly code after the front end emits proper values. - auto CorrectMultiDim = [](uint32_t(&Val)[3]) { + auto CorrectMultiDim = [](uint32_t (&Val)[3]) { if (Val[1] == 0) Val[1] = 1; if (Val[2] == 0) diff --git a/offload/src/omptarget.cpp b/offload/libomptarget/omptarget.cpp similarity index 100% rename from offload/src/omptarget.cpp rename to offload/libomptarget/omptarget.cpp diff --git a/offload/src/private.h b/offload/libomptarget/private.h similarity index 100% rename from offload/src/private.h rename to offload/libomptarget/private.h