summaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-12-25 00:07:12 +0000
committerBob Wilson <bob.wilson@apple.com>2012-12-25 00:07:12 +0000
commit04de315694d441de4dbdf52b3ff41b2fe6803646 (patch)
treedd38e3652ee0e9afa585516de5c28a3e79e0fc8f /lib/VMCore
parent3d662d5586d08a4adb01b8dd61301f24d9c21301 (diff)
downloadexternal_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.zip
external_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.tar.gz
external_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.tar.bz2
Rename LLVMContext diagnostic handler types and functions.
These are now generally used for all diagnostics from the backend, not just for inline assembly, so this drops the "InlineAsm" from the names. No functional change. (I've left aliases for the old names but only for long enough to let me switch over clang to use the new ones.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/LLVMContext.cpp34
-rw-r--r--lib/VMCore/LLVMContextImpl.cpp4
-rw-r--r--lib/VMCore/LLVMContextImpl.h4
3 files changed, 20 insertions, 22 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp
index bdb1b4b..c09c2e5 100644
--- a/lib/VMCore/LLVMContext.cpp
+++ b/lib/VMCore/LLVMContext.cpp
@@ -73,24 +73,22 @@ void LLVMContext::removeModule(Module *M) {
// Recoverable Backend Errors
//===----------------------------------------------------------------------===//
-void LLVMContext::
-setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler,
- void *DiagContext) {
- pImpl->InlineAsmDiagHandler = DiagHandler;
- pImpl->InlineAsmDiagContext = DiagContext;
+void LLVMContext::setDiagnosticHandler(DiagHandlerTy DiagHandler,
+ void *DiagContext) {
+ pImpl->DiagHandler = DiagHandler;
+ pImpl->DiagContext = DiagContext;
}
-/// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by
-/// setInlineAsmDiagnosticHandler.
-LLVMContext::InlineAsmDiagHandlerTy
-LLVMContext::getInlineAsmDiagnosticHandler() const {
- return pImpl->InlineAsmDiagHandler;
+/// getDiagnosticHandler - Return the diagnostic handler set by
+/// setDiagnosticHandler.
+LLVMContext::DiagHandlerTy LLVMContext::getDiagnosticHandler() const {
+ return pImpl->DiagHandler;
}
-/// getInlineAsmDiagnosticContext - Return the diagnostic context set by
-/// setInlineAsmDiagnosticHandler.
-void *LLVMContext::getInlineAsmDiagnosticContext() const {
- return pImpl->InlineAsmDiagContext;
+/// getDiagnosticContext - Return the diagnostic context set by
+/// setDiagnosticHandler.
+void *LLVMContext::getDiagnosticContext() const {
+ return pImpl->DiagContext;
}
void LLVMContext::emitError(const Twine &ErrorStr) {
@@ -123,7 +121,7 @@ void LLVMContext::emitWarning(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->InlineAsmDiagHandler == 0) {
+ if (pImpl->DiagHandler == 0) {
errs() << "error: " << ErrorStr << "\n";
exit(1);
}
@@ -131,12 +129,12 @@ 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->InlineAsmDiagHandler(Diag, pImpl->InlineAsmDiagContext, LocCookie);
+ pImpl->DiagHandler(Diag, pImpl->DiagContext, LocCookie);
}
void LLVMContext::emitWarning(unsigned LocCookie, const Twine &ErrorStr) {
// If there is no handler installed, just print the warning.
- if (pImpl->InlineAsmDiagHandler == 0) {
+ if (pImpl->DiagHandler == 0) {
errs() << "warning: " << ErrorStr << "\n";
return;
}
@@ -144,7 +142,7 @@ void LLVMContext::emitWarning(unsigned LocCookie, const Twine &ErrorStr) {
// If we do have a handler, we can report the warning.
SMDiagnostic Diag("", SourceMgr::DK_Warning, ErrorStr.str());
- pImpl->InlineAsmDiagHandler(Diag, pImpl->InlineAsmDiagContext, LocCookie);
+ pImpl->DiagHandler(Diag, pImpl->DiagContext, LocCookie);
}
//===----------------------------------------------------------------------===//
diff --git a/lib/VMCore/LLVMContextImpl.cpp b/lib/VMCore/LLVMContextImpl.cpp
index 585ec2c..61fb7f3 100644
--- a/lib/VMCore/LLVMContextImpl.cpp
+++ b/lib/VMCore/LLVMContextImpl.cpp
@@ -35,8 +35,8 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
Int16Ty(C, 16),
Int32Ty(C, 32),
Int64Ty(C, 64) {
- InlineAsmDiagHandler = 0;
- InlineAsmDiagContext = 0;
+ DiagHandler = 0;
+ DiagContext = 0;
NamedStructTypesUniqueID = 0;
}
diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h
index 7ff0120..c3adf39 100644
--- a/lib/VMCore/LLVMContextImpl.h
+++ b/lib/VMCore/LLVMContextImpl.h
@@ -236,8 +236,8 @@ public:
/// will be automatically deleted if this context is deleted.
SmallPtrSet<Module*, 4> OwnedModules;
- LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler;
- void *InlineAsmDiagContext;
+ LLVMContext::DiagHandlerTy DiagHandler;
+ void *DiagContext;
typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*,
DenseMapAPIntKeyInfo> IntMapTy;