1 //===-- AMDGPUDiagnosticInfoUnsupported.h - Error reporting -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H
11 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H
13 #include "llvm/IR/DiagnosticInfo.h"
14 #include "llvm/IR/DiagnosticPrinter.h"
18 /// Diagnostic information for unimplemented or unsupported feature reporting.
19 class DiagnosticInfoUnsupported : public DiagnosticInfo {
21 const Twine &Description;
26 static int getKindID() {
28 KindID = llvm::getNextAvailablePluginDiagnosticKind();
33 DiagnosticInfoUnsupported(const Function &Fn, const Twine &Desc,
34 DiagnosticSeverity Severity = DS_Error);
36 const Function &getFunction() const { return Fn; }
37 const Twine &getDescription() const { return Description; }
39 void print(DiagnosticPrinter &DP) const override;
41 static bool classof(const DiagnosticInfo *DI) {
42 return DI->getKind() == getKindID();