Provide fallback locations for backend remarks
authorAlp Toker <alp@nuanti.com>
Thu, 5 Jun 2014 22:11:12 +0000 (22:11 +0000)
committerAlp Toker <alp@nuanti.com>
Thu, 5 Jun 2014 22:11:12 +0000 (22:11 +0000)
commit27506271b46e082a4e4ebad8f17684dd875b8740
tree4234c6206ef476c6e8bf358736f79c6fa5872142
parentfb8d02b179732b17897f1d4024583949a56b0bb5
Provide fallback locations for backend remarks

Instead of disembodied diagnostics when debug info is disabled it's now
possible to identify the associated function's location in order to provide
some amount of of context.

We use the definition's body right brace location to differentiate the fallback
from diagnostics that genuinely relate to the function declaration itself (a
convention also used by gcc).

llvm-svn: 210294
clang/lib/CodeGen/CodeGenAction.cpp
clang/test/Frontend/optimization-remark-line-directive.c
clang/test/Frontend/optimization-remark.c