mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 05:31:37 +00:00
AMDGPU: Split DiagnosticInfoUnsupported into its own file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c651fbc41
commit
07437a8e79
26
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp
Normal file
26
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
//===-- AMDGPUDiagnosticInfoUnsupported.cpp -------------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "AMDGPUDiagnosticInfoUnsupported.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
DiagnosticInfoUnsupported::DiagnosticInfoUnsupported(
|
||||
const Function &Fn,
|
||||
const Twine &Desc,
|
||||
DiagnosticSeverity Severity)
|
||||
: DiagnosticInfo(getKindID(), Severity),
|
||||
Description(Desc),
|
||||
Fn(Fn) { }
|
||||
|
||||
int DiagnosticInfoUnsupported::KindID = 0;
|
||||
|
||||
void DiagnosticInfoUnsupported::print(DiagnosticPrinter &DP) const {
|
||||
DP << "unsupported " << getDescription() << " in " << Fn.getName();
|
||||
}
|
48
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h
Normal file
48
lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h
Normal file
@ -0,0 +1,48 @@
|
||||
//===-- AMDGPUDiagnosticInfoUnsupported.h - Error reporting -----*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H
|
||||
#define LLVM_LIB_TARGET_AMDGPU_AMDGPUDIAGNOSTICINFOUNSUPPORTED_H
|
||||
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
/// Diagnostic information for unimplemented or unsupported feature reporting.
|
||||
class DiagnosticInfoUnsupported : public DiagnosticInfo {
|
||||
private:
|
||||
const Twine &Description;
|
||||
const Function &Fn;
|
||||
|
||||
static int KindID;
|
||||
|
||||
static int getKindID() {
|
||||
if (KindID == 0)
|
||||
KindID = llvm::getNextAvailablePluginDiagnosticKind();
|
||||
return KindID;
|
||||
}
|
||||
|
||||
public:
|
||||
DiagnosticInfoUnsupported(const Function &Fn, const Twine &Desc,
|
||||
DiagnosticSeverity Severity = DS_Error);
|
||||
|
||||
const Function &getFunction() const { return Fn; }
|
||||
const Twine &getDescription() const { return Description; }
|
||||
|
||||
void print(DiagnosticPrinter &DP) const override;
|
||||
|
||||
static bool classof(const DiagnosticInfo *DI) {
|
||||
return DI->getKind() == getKindID();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "AMDGPUISelLowering.h"
|
||||
#include "AMDGPU.h"
|
||||
#include "AMDGPUDiagnosticInfoUnsupported.h"
|
||||
#include "AMDGPUFrameLowering.h"
|
||||
#include "AMDGPUIntrinsicInfo.h"
|
||||
#include "AMDGPURegisterInfo.h"
|
||||
@ -27,50 +28,9 @@
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DiagnosticInfo.h"
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
|
||||
/// Diagnostic information for unimplemented or unsupported feature reporting.
|
||||
class DiagnosticInfoUnsupported : public DiagnosticInfo {
|
||||
private:
|
||||
const Twine &Description;
|
||||
const Function &Fn;
|
||||
|
||||
static int KindID;
|
||||
|
||||
static int getKindID() {
|
||||
if (KindID == 0)
|
||||
KindID = llvm::getNextAvailablePluginDiagnosticKind();
|
||||
return KindID;
|
||||
}
|
||||
|
||||
public:
|
||||
DiagnosticInfoUnsupported(const Function &Fn, const Twine &Desc,
|
||||
DiagnosticSeverity Severity = DS_Error)
|
||||
: DiagnosticInfo(getKindID(), Severity),
|
||||
Description(Desc),
|
||||
Fn(Fn) { }
|
||||
|
||||
const Function &getFunction() const { return Fn; }
|
||||
const Twine &getDescription() const { return Description; }
|
||||
|
||||
void print(DiagnosticPrinter &DP) const override {
|
||||
DP << "unsupported " << getDescription() << " in " << Fn.getName();
|
||||
}
|
||||
|
||||
static bool classof(const DiagnosticInfo *DI) {
|
||||
return DI->getKind() == getKindID();
|
||||
}
|
||||
};
|
||||
|
||||
int DiagnosticInfoUnsupported::KindID = 0;
|
||||
}
|
||||
|
||||
|
||||
static bool allocateStack(unsigned ValNo, MVT ValVT, MVT LocVT,
|
||||
CCValAssign::LocInfo LocInfo,
|
||||
ISD::ArgFlagsTy ArgFlags, CCState &State) {
|
||||
|
@ -16,6 +16,7 @@ add_llvm_target(AMDGPUCodeGen
|
||||
AMDILCFGStructurizer.cpp
|
||||
AMDGPUAlwaysInlinePass.cpp
|
||||
AMDGPUAsmPrinter.cpp
|
||||
AMDGPUDiagnosticInfoUnsupported.cpp
|
||||
AMDGPUFrameLowering.cpp
|
||||
AMDGPUHSATargetObjectFile.cpp
|
||||
AMDGPUIntrinsicInfo.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user