aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/LLVMContext.h
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 /include/llvm/LLVMContext.h
parent3d662d5586d08a4adb01b8dd61301f24d9c21301 (diff)
downloadexternal_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.tar.gz
external_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.tar.bz2
external_llvm-04de315694d441de4dbdf52b3ff41b2fe6803646.zip
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 'include/llvm/LLVMContext.h')
-rw-r--r--include/llvm/LLVMContext.h40
1 files changed, 26 insertions, 14 deletions
diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h
index a5a26946b7..58fb39f056 100644
--- a/include/llvm/LLVMContext.h
+++ b/include/llvm/LLVMContext.h
@@ -58,27 +58,39 @@ public:
void getMDKindNames(SmallVectorImpl<StringRef> &Result) const;
- typedef void (*InlineAsmDiagHandlerTy)(const SMDiagnostic&, void *Context,
- unsigned LocCookie);
+ typedef void (*DiagHandlerTy)(const SMDiagnostic&, void *Context,
+ unsigned LocCookie);
- /// setInlineAsmDiagnosticHandler - This method sets a handler that is invoked
- /// when problems with inline asm are detected by the backend. The first
- /// argument is a function pointer and the second is a context pointer that
- /// gets passed into the DiagHandler.
+ /// setDiagnosticHandler - This method sets a handler that is invoked
+ /// when problems are detected by the backend. The first argument is a
+ /// function pointer and the second is a context pointer that gets passed
+ /// into the DiagHandler.
///
/// LLVMContext doesn't take ownership or interpret either of these
/// pointers.
- void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler,
- void *DiagContext = 0);
+ void setDiagnosticHandler(DiagHandlerTy DiagHandler, void *DiagContext = 0);
- /// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by
- /// setInlineAsmDiagnosticHandler.
- InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const;
+ /// getDiagnosticHandler - Return the diagnostic handler set by
+ /// setDiagnosticHandler.
+ DiagHandlerTy getDiagnosticHandler() const;
- /// getInlineAsmDiagnosticContext - Return the diagnostic context set by
- /// setInlineAsmDiagnosticHandler.
- void *getInlineAsmDiagnosticContext() const;
+ /// getDiagnosticContext - Return the diagnostic context set by
+ /// setDiagnosticHandler.
+ void *getDiagnosticContext() const;
+ /// FIXME: Temporary copies of the old names; to be removed as soon as
+ /// clang switches to the new ones.
+ typedef DiagHandlerTy InlineAsmDiagHandlerTy;
+ void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler,
+ void *DiagContext = 0) {
+ setDiagnosticHandler(DiagHandler, DiagContext);
+ }
+ InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const {
+ return getDiagnosticHandler();
+ }
+ void *getInlineAsmDiagnosticContext() const {
+ return getDiagnosticContext();
+ }
/// emitError - Emit an error message to the currently installed error handler
/// with optional location information. This function returns, so code should