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 | d00406486421143c5e4eb79f9ce97e30442b1ab2 (patch) | |
tree | eb2ff8461358578c978f17ddfa7f597b9f6a1022 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 4fadc5b20a3afbad542e0841692dc851d0507136 (diff) | |
download | llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.zip llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.gz llvm-d00406486421143c5e4eb79f9ce97e30442b1ab2.tar.bz2 |
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.
llvm-svn: 119730
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 6614531..9660e68 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/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; } |