Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / libomptarget / plugins-nextgen / common / elf_common / elf_common.h
blob933665e59a45569df5b4d26a34904ade02dea12b
1 //===-- elf_common.h - Common ELF functionality -----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Common ELF functionality for target plugins.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H
14 #define LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H
16 #include "omptargetplugin.h"
17 #include <cstdint>
19 /// Return non-zero, if the given \p image is an ELF object, which
20 /// e_machine matches \p target_id; return zero otherwise.
21 EXTERN int32_t elf_check_machine(__tgt_device_image *Image, uint16_t TargetId);
23 /// Return non-zero, if the given \p image is an ET_DYN ELF object;
24 /// return zero otherwise.
25 EXTERN int32_t elf_is_dynamic(__tgt_device_image *Image);
27 #endif // LLVM_OPENMP_LIBOMPTARGET_PLUGINS_COMMON_ELF_COMMON_ELF_COMMON_H