diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-08-17 16:02:43 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-08-17 16:02:43 +0000 |
commit | c19dee734f3adfb800f1a9684fe661c827370885 (patch) | |
tree | 72f2f9cf241855aa23c8d588816072032d21362c /llvm/lib | |
parent | ea7e4647dbebcbbf327b747cba651e13e1fc65b0 (diff) | |
download | bcm5719-llvm-c19dee734f3adfb800f1a9684fe661c827370885.tar.gz bcm5719-llvm-c19dee734f3adfb800f1a9684fe661c827370885.zip |
Support the DW_AT_noreturn DWARF flag.
This is used to mark functions with the C++11 [[ noreturn ]] or C11 _Noreturn
attributes.
Patch by Victor Leschuk!
https://reviews.llvm.org/D23167
llvm-svn: 278940
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Support/Dwarf.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 4100d728a53..b36964a2f98 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1248,6 +1248,9 @@ void DwarfUnit::applySubprogramAttributes(const DISubprogram *SP, DIE &SPDie, if (SP->isRValueReference()) addFlag(SPDie, dwarf::DW_AT_rvalue_reference); + if (SP->isNoReturn()) + addFlag(SPDie, dwarf::DW_AT_noreturn); + if (SP->isProtected()) addUInt(SPDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_data1, dwarf::DW_ACCESS_protected); diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp index 7aea05d7701..e7c1ecf8093 100644 --- a/llvm/lib/Support/Dwarf.cpp +++ b/llvm/lib/Support/Dwarf.cpp @@ -147,6 +147,7 @@ const char *llvm::dwarf::AttributeString(unsigned Attribute) { case DW_AT_dwo_name: return "DW_AT_dwo_name"; case DW_AT_reference: return "DW_AT_reference"; case DW_AT_rvalue_reference: return "DW_AT_rvalue_reference"; + case DW_AT_noreturn: return "DW_AT_noreturn"; case DW_AT_MIPS_loop_begin: return "DW_AT_MIPS_loop_begin"; case DW_AT_MIPS_tail_loop_begin: return "DW_AT_MIPS_tail_loop_begin"; case DW_AT_MIPS_epilog_begin: return "DW_AT_MIPS_epilog_begin"; |