diff options
author | Quentin Colombet <qcolombet@apple.com> | 2013-12-17 01:19:59 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2013-12-17 01:19:59 +0000 |
commit | 382b135d92872758c094590327beb5a327455ec4 (patch) | |
tree | 918252c5d54805153282c36d25c9ea44bd5ced92 /llvm/lib/IR | |
parent | 3fb18bbd3443e47aa5a2038d2b0c948a23ca3216 (diff) | |
download | bcm5719-llvm-382b135d92872758c094590327beb5a327455ec4.tar.gz bcm5719-llvm-382b135d92872758c094590327beb5a327455ec4.zip |
Revert r197438 and r197447 until we figure out how to avoid circular dependency at link time
llvm-svn: 197451
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 41 | ||||
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 9 |
3 files changed, 3 insertions, 49 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 26541d81684..883bb9878fa 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -17,8 +17,6 @@ #include "llvm/IR/Constants.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/Metadata.h" -#include "llvm/Support/DiagnosticInfo.h" -#include "llvm/Support/DiagnosticPrinter.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/SourceMgr.h" #include <cctype> @@ -100,20 +98,6 @@ void *LLVMContext::getInlineAsmDiagnosticContext() const { return pImpl->InlineAsmDiagContext; } -void LLVMContext::setDiagnosticHandler(DiagnosticHandlerTy DiagnosticHandler, - void *DiagnosticContext) { - pImpl->DiagnosticHandler = DiagnosticHandler; - pImpl->DiagnosticContext = DiagnosticContext; -} - -LLVMContext::DiagnosticHandlerTy LLVMContext::getDiagnosticHandler() const { - return pImpl->DiagnosticHandler; -} - -void *LLVMContext::getDiagnosticContext() const { - return pImpl->DiagnosticContext; -} - void LLVMContext::emitError(const Twine &ErrorStr) { emitError(0U, ErrorStr); } @@ -128,31 +112,6 @@ void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) { return emitError(LocCookie, ErrorStr); } -void LLVMContext::diagnose(const DiagnosticInfo &DI) { - // If there is a report handler, use it. - if (pImpl->DiagnosticHandler != 0) { - pImpl->DiagnosticHandler(DI, pImpl->DiagnosticContext); - return; - } - // Otherwise, print the message with a prefix based on the severity. - std::string MsgStorage; - raw_string_ostream Stream(MsgStorage); - DiagnosticPrinterRawOStream DP(Stream); - DI.print(DP); - Stream.flush(); - switch (DI.getSeverity()) { - case DS_Error: - errs() << "error: " << MsgStorage << "\n"; - exit(1); - case DS_Warning: - errs() << "warning: " << MsgStorage << "\n"; - break; - case DS_Note: - errs() << "note: " << MsgStorage << "\n"; - break; - } -} - void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) { // If there is no error handler installed, just print the error and exit. if (pImpl->InlineAsmDiagHandler == 0) { diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp index ebff9d3a51f..6a6a4d6801f 100644 --- a/llvm/lib/IR/LLVMContextImpl.cpp +++ b/llvm/lib/IR/LLVMContextImpl.cpp @@ -37,8 +37,6 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C) Int64Ty(C, 64) { InlineAsmDiagHandler = 0; InlineAsmDiagContext = 0; - DiagnosticHandler = 0; - DiagnosticContext = 0; NamedStructTypesUniqueID = 0; } diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index 39e5d778ed6..407b9856892 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -238,12 +238,9 @@ public: LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler; void *InlineAsmDiagContext; - - LLVMContext::DiagnosticHandlerTy DiagnosticHandler; - void *DiagnosticContext; - - typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt *, - DenseMapAPIntKeyInfo> IntMapTy; + + typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, + DenseMapAPIntKeyInfo> IntMapTy; IntMapTy IntConstants; typedef DenseMap<DenseMapAPFloatKeyInfo::KeyTy, ConstantFP*, |