diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-02-11 05:37:07 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-02-11 05:37:07 +0000 |
commit | f64c889cc94417322b0ff8ad1c61939183bf3c38 (patch) | |
tree | e867d640e7e3199dec62a8ed0e06f17967bf88e4 /lib/IR | |
parent | 00f63b1b84d059a1ffa572e76708e03750a9e523 (diff) | |
download | external_llvm-f64c889cc94417322b0ff8ad1c61939183bf3c38.zip external_llvm-f64c889cc94417322b0ff8ad1c61939183bf3c38.tar.gz external_llvm-f64c889cc94417322b0ff8ad1c61939183bf3c38.tar.bz2 |
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
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/LLVMContext.cpp | 30 | ||||
-rw-r--r-- | lib/IR/LLVMContextImpl.cpp | 4 | ||||
-rw-r--r-- | lib/IR/LLVMContextImpl.h | 4 |
3 files changed, 20 insertions, 18 deletions
diff --git a/lib/IR/LLVMContext.cpp b/lib/IR/LLVMContext.cpp index 774c591..8e2bbb7 100644 --- a/lib/IR/LLVMContext.cpp +++ b/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); } //===----------------------------------------------------------------------===// diff --git a/lib/IR/LLVMContextImpl.cpp b/lib/IR/LLVMContextImpl.cpp index 89e163f..6a6a4d6 100644 --- a/lib/IR/LLVMContextImpl.cpp +++ b/lib/IR/LLVMContextImpl.cpp @@ -35,8 +35,8 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C) Int16Ty(C, 16), Int32Ty(C, 32), Int64Ty(C, 64) { - DiagHandler = 0; - DiagContext = 0; + InlineAsmDiagHandler = 0; + InlineAsmDiagContext = 0; NamedStructTypesUniqueID = 0; } diff --git a/lib/IR/LLVMContextImpl.h b/lib/IR/LLVMContextImpl.h index cc7ca5e..7353dc0 100644 --- a/lib/IR/LLVMContextImpl.h +++ b/lib/IR/LLVMContextImpl.h @@ -236,8 +236,8 @@ public: /// will be automatically deleted if this context is deleted. SmallPtrSet<Module*, 4> OwnedModules; - LLVMContext::DiagHandlerTy DiagHandler; - void *DiagContext; + LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler; + void *InlineAsmDiagContext; typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, DenseMapAPIntKeyInfo> IntMapTy; |