Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/dxc/DxilValidation/DxilValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class PrintDiagnosticContext {
bool HasWarnings() const;
void Handle(const llvm::DiagnosticInfo &DI);

static void PrintDiagnosticHandler(const llvm::DiagnosticInfo &DI,
static void PrintDiagnosticHandler(const llvm::DiagnosticInfo *DI,
void *Context);
};

Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/LLVMContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class LLVMContext {
/// Defines the type of a diagnostic handler.
/// \see LLVMContext::setDiagnosticHandler.
/// \see LLVMContext::diagnose.
typedef void (*DiagnosticHandlerTy)(const DiagnosticInfo &DI, void *Context);
typedef void (*DiagnosticHandlerTy)(const DiagnosticInfo *DI, void *Context);

/// Defines the type of a yield callback.
/// \see LLVMContext::setYieldCallback.
Expand Down
4 changes: 2 additions & 2 deletions lib/DxilValidation/DxilValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ void PrintDiagnosticContext::Handle(const DiagnosticInfo &DI) {
m_Printer << "\n";
}

void PrintDiagnosticContext::PrintDiagnosticHandler(const DiagnosticInfo &DI,
void PrintDiagnosticContext::PrintDiagnosticHandler(const DiagnosticInfo *DI,
void *Context) {
reinterpret_cast<hlsl::PrintDiagnosticContext *>(Context)->Handle(DI);
reinterpret_cast<hlsl::PrintDiagnosticContext *>(Context)->Handle(*DI);
}

struct PSExecutionInfo {
Expand Down
2 changes: 1 addition & 1 deletion lib/IR/LLVMContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) {
// If there is a report handler, use it.
if (pImpl->DiagnosticHandler) {
if (!pImpl->RespectDiagnosticFilters || isDiagnosticEnabled(DI))
pImpl->DiagnosticHandler(DI, pImpl->DiagnosticContext);
pImpl->DiagnosticHandler(&DI, pImpl->DiagnosticContext);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions tools/clang/lib/CodeGen/CodeGenAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ namespace clang {

void linkerDiagnosticHandler(const llvm::DiagnosticInfo &DI);

static void DiagnosticHandler(const llvm::DiagnosticInfo &DI,
static void DiagnosticHandler(const llvm::DiagnosticInfo *DI,
void *Context) {
((BackendConsumer *)Context)->DiagnosticHandlerImpl(DI);
((BackendConsumer *)Context)->DiagnosticHandlerImpl(*DI);
}

void InlineAsmDiagHandler2(const llvm::SMDiagnostic &,
Expand Down
8 changes: 4 additions & 4 deletions tools/llvm-dis/llvm-dis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,21 @@ class CommentWriter : public AssemblyAnnotationWriter {

} // end anon namespace

static void diagnosticHandler(const DiagnosticInfo &DI, void *Context) {
static void diagnosticHandler(const DiagnosticInfo *DI, void *Context) {
raw_ostream &OS = errs();
OS << (char *)Context << ": ";
switch (DI.getSeverity()) {
switch (DI->getSeverity()) {
case DS_Error: OS << "error: "; break;
case DS_Warning: OS << "warning: "; break;
case DS_Remark: OS << "remark: "; break;
case DS_Note: OS << "note: "; break;
}

DiagnosticPrinterRawOStream DP(OS);
DI.print(DP);
DI->print(DP);
OS << '\n';

if (DI.getSeverity() == DS_Error)
if (DI->getSeverity() == DS_Error)
exit(1);
}

Expand Down
Loading