summaryrefslogtreecommitdiff
path: root/include/llvm/Support/SourceMgr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-17 08:13:01 +0000
committerChris Lattner <sabre@nondot.org>2010-11-17 08:13:01 +0000
commit4afa12890f679034e9741a687a6ce33f2846f129 (patch)
tree57398005e91e5946ee1878c8322d3c1f25aaeba6 /include/llvm/Support/SourceMgr.h
parent3f409f7fefea4d4191a914b528afe16fd7d0b4d9 (diff)
downloadllvm-4afa12890f679034e9741a687a6ce33f2846f129.tar.gz
llvm-4afa12890f679034e9741a687a6ce33f2846f129.tar.bz2
llvm-4afa12890f679034e9741a687a6ce33f2846f129.tar.xz
now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate the
cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r--include/llvm/Support/SourceMgr.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h
index 816f894372..a41a633ba6 100644
--- a/include/llvm/Support/SourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -36,8 +36,7 @@ public:
/// DiagHandlerTy - Clients that want to handle their own diagnostics in a
/// custom way can register a function pointer+context as a diagnostic
/// handler. It gets called each time PrintMessage is invoked.
- typedef void (*DiagHandlerTy)(const SMDiagnostic&, void *Context,
- unsigned LocCookie);
+ typedef void (*DiagHandlerTy)(const SMDiagnostic&, void *Context);
private:
struct SrcBuffer {
/// Buffer - The memory buffer for the file.
@@ -61,7 +60,6 @@ private:
DiagHandlerTy DiagHandler;
void *DiagContext;
- unsigned DiagLocCookie;
SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT
void operator=(const SourceMgr&); // DO NOT IMPLEMENT
@@ -74,12 +72,10 @@ public:
}
/// setDiagHandler - Specify a diagnostic handler to be invoked every time
- /// PrintMessage is called. Ctx and Cookie are passed into the handler when
- /// it is invoked.
- void setDiagHandler(DiagHandlerTy DH, void *Ctx = 0, unsigned Cookie = 0) {
+ /// PrintMessage is called. Ctx is passed into the handler when it is invoked.
+ void setDiagHandler(DiagHandlerTy DH, void *Ctx = 0) {
DiagHandler = DH;
DiagContext = Ctx;
- DiagLocCookie = Cookie;
}
const SrcBuffer &getBufferInfo(unsigned i) const {