efriedma added a comment.

There are two different approaches we use for getting source locations for 
diagnostics coming out of the backend; either embedding clang SourceLocations 
into IR, or trying to translate DWARF locations.  The advantage of using clang 
SourceLocations is that we never lose any fidelity, even in complex cases 
involving the preprocessor, and the compiler doesn't have to spend time 
generating complete DWARF info.  The advantage of DWARF, of course, is that 
it's existing, mature infrastructure.

We use clang SourceLocations for inline asm and for the warning/error 
attributes, we use DWARF for optimization remarks.

There's probably some argument for using DWARF here.

----

Am I reading the correctly, that currently the inlining notes don't have source 
locations?  That's not very friendly (particularly for display in IDEs).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141451/new/

https://reviews.llvm.org/D141451

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to