mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Revert "Rename LLVMContext diagnostic handler types and functions."
This reverts my commit 171047. Now that I've removed my misguided attempt to support backend warnings, these diagnostics are only about inline assembly. It would take quite a bit more work to generalize them properly, so I'm just reverting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+16
-14
@@ -73,22 +73,24 @@ void LLVMContext::removeModule(Module *M) {
|
||||
// Recoverable Backend Errors
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void LLVMContext::setDiagnosticHandler(DiagHandlerTy DiagHandler,
|
||||
void *DiagContext) {
|
||||
pImpl->DiagHandler = DiagHandler;
|
||||
pImpl->DiagContext = DiagContext;
|
||||
void LLVMContext::
|
||||
setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler,
|
||||
void *DiagContext) {
|
||||
pImpl->InlineAsmDiagHandler = DiagHandler;
|
||||
pImpl->InlineAsmDiagContext = DiagContext;
|
||||
}
|
||||
|
||||
/// getDiagnosticHandler - Return the diagnostic handler set by
|
||||
/// setDiagnosticHandler.
|
||||
LLVMContext::DiagHandlerTy LLVMContext::getDiagnosticHandler() const {
|
||||
return pImpl->DiagHandler;
|
||||
/// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by
|
||||
/// setInlineAsmDiagnosticHandler.
|
||||
LLVMContext::InlineAsmDiagHandlerTy
|
||||
LLVMContext::getInlineAsmDiagnosticHandler() const {
|
||||
return pImpl->InlineAsmDiagHandler;
|
||||
}
|
||||
|
||||
/// getDiagnosticContext - Return the diagnostic context set by
|
||||
/// setDiagnosticHandler.
|
||||
void *LLVMContext::getDiagnosticContext() const {
|
||||
return pImpl->DiagContext;
|
||||
/// getInlineAsmDiagnosticContext - Return the diagnostic context set by
|
||||
/// setInlineAsmDiagnosticHandler.
|
||||
void *LLVMContext::getInlineAsmDiagnosticContext() const {
|
||||
return pImpl->InlineAsmDiagContext;
|
||||
}
|
||||
|
||||
void LLVMContext::emitError(const Twine &ErrorStr) {
|
||||
@@ -107,7 +109,7 @@ void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) {
|
||||
|
||||
void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) {
|
||||
// If there is no error handler installed, just print the error and exit.
|
||||
if (pImpl->DiagHandler == 0) {
|
||||
if (pImpl->InlineAsmDiagHandler == 0) {
|
||||
errs() << "error: " << ErrorStr << "\n";
|
||||
exit(1);
|
||||
}
|
||||
@@ -115,7 +117,7 @@ void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) {
|
||||
// If we do have an error handler, we can report the error and keep going.
|
||||
SMDiagnostic Diag("", SourceMgr::DK_Error, ErrorStr.str());
|
||||
|
||||
pImpl->DiagHandler(Diag, pImpl->DiagContext, LocCookie);
|
||||
pImpl->InlineAsmDiagHandler(Diag, pImpl->InlineAsmDiagContext, LocCookie);
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user