Support for DW_AT_noreturn DWARF flag. Add it to debug info in case function is C++11 [[ noreturn ]] or C11 _Noreturn.
PS Corresponding clang patch is following
Paths
| Differential D23167
emit_DW_AT_noreturn flag ClosedPublic Authored by vleschuk on Aug 4 2016, 9:10 AM.
Details
Summary Support for DW_AT_noreturn DWARF flag. Add it to debug info in case function is C++11 [[ noreturn ]] or C11 _Noreturn. PS Corresponding clang patch is following
Diff Detail Event Timelinevleschuk updated this object. Comment Actions Thanks for working in this! Could you please also add a test for llvm-dwarfdump?
vleschuk edited edge metadata. Comment ActionsAdded C++11, C11 and ObjC textual llvm-dwarfdump tests. Comment Actions Thanks, now all that's missing is an LLVM IR round-trip test. Adding the new flag to test/Assembler/disubprogram would work.
vleschuk marked 6 inline comments as done. Comment ActionsStripped unnecessary attributes, added more context to CHECK aprantl edited edge metadata. Comment ActionsLGTM on the condition that the missing IR roundtrip test (e.g., by extending test/Assembler/disubprogram.ll) is added before committing. This revision is now accepted and ready to land.Aug 9 2016, 1:10 PM Comment Actions Found one more.
Comment Actions
Done
Comment Actions
Could you please clarify, what do you mean? All the IR tests are here now. Comment Actions You are adding a new constant to the LLVM IR, so there should be a round-trip test that tests the LLVM IR parser, bitcode writer, bitcode reader, and LLVM IR printer to make sure we're handling the new constant correctly. One easy way to do this is by adding the new flag to the already existing test in test/IR/disubprogram.ll. vleschuk marked an inline comment as done. Comment ActionsAdded test for noreturn flag for test/Assembler/disubprogram.ll Comment Actions Replied on doxygen-related comment: I do not think we should use different styles within one file.
Revision Contents
Diff 68330 include/llvm/IR/DebugInfoFlags.def
include/llvm/IR/DebugInfoMetadata.h
include/llvm/Support/Dwarf.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/Support/Dwarf.cpp
test/Assembler/disubprogram.ll
test/DebugInfo/noreturn_c11.ll
test/DebugInfo/noreturn_cpp11.ll
test/DebugInfo/noreturn_objc.ll
unittests/IR/DebugInfoTest.cpp
|
The \brief is redundant. We compile doxygen with autobrief now.
Also, there's a missing . at the end.