We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e257a37 commit 3217f06Copy full SHA for 3217f06
llvm/include/llvm/IR/DiagnosticInfo.h
@@ -139,7 +139,7 @@ class DiagnosticInfo {
139
using DiagnosticHandlerFunction = std::function<void(const DiagnosticInfo &)>;
140
141
class DiagnosticInfoGeneric : public DiagnosticInfo {
142
- const Twine &MsgStr;
+ const Twine MsgStr;
143
const Instruction *Inst = nullptr;
144
145
public:
llvm/lib/Target/DirectX/DXILOpLowering.cpp
@@ -759,8 +759,7 @@ class OpLowerer {
759
std::string Msg =
760
formatv("Unsupported intrinsic {0} for DXIL lowering", F.getName())
761
.str();
762
- DiagnosticInfoGeneric Diag(Msg);
763
- M.getContext().diagnose(Diag);
+ M.getContext().emitError(Msg);
764
HasErrors |= true;
765
break;
766
}
0 commit comments