From 33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 18 Nov 2010 20:06:41 +0000 Subject: 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 --- lib/CodeGen/CodeGenAction.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenAction.cpp') diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index 6614531779..9660e68c70 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -209,8 +209,7 @@ void BackendConsumer::InlineAsmDiagHandler2(const llvm::SMDiagnostic &D, // issue as being an error in the source with a note showing the instantiated // code. if (LocCookie.isValid()) { - Diags.Report(FullSourceLoc(LocCookie, Context->getSourceManager()), - diag::err_fe_inline_asm).AddString(Message); + Diags.Report(LocCookie, diag::err_fe_inline_asm).AddString(Message); if (D.getLoc().isValid()) Diags.Report(Loc, diag::note_fe_inline_asm_here); @@ -318,7 +317,7 @@ void CodeGenAction::ExecuteAction() { unsigned DiagID = CI.getDiagnostics().getCustomDiagID(Diagnostic::Error, Msg); - CI.getDiagnostics().Report(FullSourceLoc(Loc, SM), DiagID); + CI.getDiagnostics().Report(Loc, DiagID); return; } -- cgit v1.2.3-70-g09d2