Recommit: Handle diagnostic warnings in Frontend diagnostic handler.
authorTyler Nowicki <tnowicki@apple.com>
Fri, 18 Jul 2014 19:40:19 +0000 (19:40 +0000)
committerTyler Nowicki <tnowicki@apple.com>
Fri, 18 Jul 2014 19:40:19 +0000 (19:40 +0000)
commitf8a767df67f30054ad2427feb61d5cd8f5090511
treeea0a61b0f9f6f555e6f8876394d6e97f7794f64a
parent55454c6c5a2113b83e828cbf34512d927307fcbf
Recommit: Handle diagnostic warnings in Frontend diagnostic handler.

Clang uses a diagnostic handler to grab diagnostic messages so it can print them
with the line of source code they refer to. This patch extends this to handle
optimization failures that were added to llvm to produce a warning when
loop vectorization is explicitly specified (using a pragma clang loop directive)
but fails.

Update renames warning flag name to avoid indicating the flag's severity and
adds a test.

Reviewed by Alp Toker

llvm-svn: 213400
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/lib/CodeGen/CodeGenAction.cpp
clang/test/Misc/backend-optimization-failure.cpp [new file with mode: 0644]