diff options
author | Johannes Doerfert <johannes@jdoerfert.de> | 2023-11-29 08:44:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 08:44:07 -0800 |
commit | bdecfebce4b0af94b3afa3e20add0b9d232f21ad (patch) | |
tree | b4554eff8a2bae6253a8c69f15930136a96763eb | |
parent | fd2d0bf90e37756308a5fa91a0bcd80d0923989e (diff) | |
download | llvm-bdecfebce4b0af94b3afa3e20add0b9d232f21ad.zip llvm-bdecfebce4b0af94b3afa3e20add0b9d232f21ad.tar.gz llvm-bdecfebce4b0af94b3afa3e20add0b9d232f21ad.tar.bz2 |
[OpenMP][NFC] Rename OmptCallback.cpp into OpenMP/OMPT/Callback.cpp (#73813)
Also revert the ifdef OMPT_SUPPORT order to have the short fallback
first and not after 400 lines.
-rw-r--r-- | openmp/libomptarget/src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | openmp/libomptarget/src/OpenMP/OMPT/Callback.cpp (renamed from openmp/libomptarget/src/OmptCallback.cpp) | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/openmp/libomptarget/src/CMakeLists.txt b/openmp/libomptarget/src/CMakeLists.txt index a83965f..8d85662 100644 --- a/openmp/libomptarget/src/CMakeLists.txt +++ b/openmp/libomptarget/src/CMakeLists.txt @@ -19,10 +19,10 @@ add_llvm_library(omptarget device.cpp interface.cpp omptarget.cpp - OmptCallback.cpp rtl.cpp LegacyAPI.cpp OpenMP/InteropAPI.cpp + OpenMP/OMPT/Callback.cpp ADDITIONAL_HEADER_DIRS ${LIBOMPTARGET_INCLUDE_DIR} diff --git a/openmp/libomptarget/src/OmptCallback.cpp b/openmp/libomptarget/src/OpenMP/OMPT/Callback.cpp index a45d1a0f..f1a8ad0 100644 --- a/openmp/libomptarget/src/OmptCallback.cpp +++ b/openmp/libomptarget/src/OpenMP/OMPT/Callback.cpp @@ -1,4 +1,4 @@ -//===-- OmptCallback.cpp - Target independent OpenMP target RTL --- C++ -*-===// +//===-- OpenMP/OMPT/Callback.cpp - OpenMP Tooling Callback implementation -===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -10,9 +10,14 @@ // //===----------------------------------------------------------------------===// -#ifdef OMPT_SUPPORT +#ifndef OMPT_SUPPORT -#include "llvm/Support/DynamicLibrary.h" +extern "C" { +/// Dummy definition when OMPT is disabled +void ompt_libomptarget_connect() {} +} + +#else // OMPT_SUPPORT is set #include <cstdlib> #include <cstring> @@ -24,6 +29,8 @@ #include "OpenMP/OMPT/Connector.h" #include "OpenMP/OMPT/Interface.h" +#include "llvm/Support/DynamicLibrary.h" + #undef DEBUG_PREFIX #define DEBUG_PREFIX "OMPT" @@ -491,9 +498,4 @@ void ompt_libomptarget_connect(ompt_start_tool_result_t *result) { DP("Leave ompt_libomptarget_connect\n"); } } -#else -extern "C" { -/// Dummy definition when OMPT is disabled -void ompt_libomptarget_connect() {} -} #endif // OMPT_SUPPORT |