summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2013-02-11 05:37:07 +0000
committerBob Wilson <bob.wilson@apple.com>2013-02-11 05:37:07 +0000
commita594fab454c789c4fa91005893075339c1eff35d (patch)
treee99aa4603b04149b36540e5eb56a5a30d1c6df2d /llvm/lib/IR/LLVMContext.cpp
parentcb268f7995b445af2177f55d2adf809200001e23 (diff)
downloadbcm5719-llvm-a594fab454c789c4fa91005893075339c1eff35d.tar.gz
bcm5719-llvm-a594fab454c789c4fa91005893075339c1eff35d.zip
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. llvm-svn: 174860
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 774c591a3c0..8e2bbb79eeb 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -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);
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud