Igor Kudrin 2e11e8885c [unittest][DebugInfo/DWARF] Do not create dwarfgen::Generator if MCAsmBackend is missing
dwarfgen::Generator cannot be created if there is no asm backend for a
target. For example, if the default target triple is nvptx-nvidia-cuda,
some tests fail even after D98400, which added checks for most cases.
This patch extends the approach to the remaining cases.

Differential Revision: https://reviews.llvm.org/D116107
2021-12-22 18:52:43 +07:00

30 lines
843 B
C++

//===--- unittests/DebugInfo/DWARF/DwarfUtils.h -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFUTILS_H
#define LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFUTILS_H
#include <cstdint>
namespace llvm {
class Triple;
namespace dwarf {
namespace utils {
Triple getDefaultTargetTripleForAddrSize(uint8_t AddrSize);
Triple getNormalizedDefaultTargetTriple();
bool isConfigurationSupported(Triple &T);
} // end namespace utils
} // end namespace dwarf
} // end namespace llvm
#endif // LLVM_UNITTESTS_DEBUG_INFO_DWARF_DWARFUTILS_H