diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-18 20:06:41 +0000 |
commit | 33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 (patch) | |
tree | 7f65080a9221d10495e43911e7bbaeb2724084f7 /lib/CodeGen/Mangle.cpp | |
parent | 9313aac61d425f14fa0b82c3dfe1eb2c3626d38c (diff) |
Refactoring of Diagnostic class.
-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 602c5f065f..b240103639 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -525,7 +525,7 @@ void CXXNameMangler::mangleUnscopedTemplateName(TemplateName Template) { Diagnostic &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(Diagnostic::Error, "cannot mangle dependent operator name"); - Diags.Report(FullSourceLoc(), DiagID); + Diags.Report(DiagID); return; } @@ -1672,9 +1672,7 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity) { Diagnostic &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(Diagnostic::Error, "cannot yet mangle expression type %0"); - Diags.Report(FullSourceLoc(E->getExprLoc(), - getASTContext().getSourceManager()), - DiagID) + Diags.Report(E->getExprLoc(), DiagID) << E->getStmtClassName() << E->getSourceRange(); break; } |