AMDGPU/SI: Fix a bug in SIFoldOperands
[oota-llvm.git] / lib / Target / AMDGPU / AMDGPUDiagnosticInfoUnsupported.cpp
1 //===-- AMDGPUDiagnosticInfoUnsupported.cpp -------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "AMDGPUDiagnosticInfoUnsupported.h"
11
12 using namespace llvm;
13
14 DiagnosticInfoUnsupported::DiagnosticInfoUnsupported(
15   const Function &Fn,
16   const Twine &Desc,
17   DiagnosticSeverity Severity)
18   : DiagnosticInfo(getKindID(), Severity),
19     Description(Desc),
20     Fn(Fn) { }
21
22 int DiagnosticInfoUnsupported::KindID = 0;
23
24 void DiagnosticInfoUnsupported::print(DiagnosticPrinter &DP) const {
25   DP << "unsupported " << getDescription() << " in " << Fn.getName();
26 }