[OpenMP] Add thread ID function into new RTL

The new device runtime library currently lacks the
`kmpc_get_hardware_thread_id_in_block` function which is currently used
when doing the SPMDzation optimization. This call would be introduced
through the optimization and then cause a linking error because it was
not present. This patch adds support for this runtime call.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D110195
diff --git a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
index 3bd0553..ee2aeee 100644
--- a/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/Mapping.cpp
@@ -226,4 +226,9 @@
 bool mapping::isGenericMode() { return !isSPMDMode(); }
 ///}
 
+extern "C" {
+uint32_t __kmpc_get_hardware_thread_id_in_block() {
+  return mapping::getThreadIdInBlock();
+}
+}
 #pragma omp end declare target