<div dir="ltr">Hi Bruce,<br><br>The DWARF5 standard hasn't been released yet and so the numbers aren't technically final yet so I've been avoiding making those changes if possible. Mind holding off a couple weeks until (I hope) the preliminary review copy is released?<div><br></div><div>Thanks!</div><div><br></div><div>-eric</div></div><br><div class="gmail_quote">On Thu Feb 05 2015 at 2:57:04 AM Bruce Mitchener <<a href="mailto:bruce.mitchener@gmail.com">bruce.mitchener@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi echristo,<br>
<br>
<a href="http://reviews.llvm.org/D7430" target="_blank">http://reviews.llvm.org/D7430</a><br>
<br>
Files:<br>
include/llvm/Support/Dwarf.h<br>
lib/CodeGen/AsmPrinter/<u></u>DwarfUnit.cpp<br>
lib/IR/DIBuilder.cpp<br>
lib/Support/Dwarf.cpp<br>
<br>
Index: include/llvm/Support/Dwarf.h<br>
==============================<u></u>==============================<u></u>=======<br>
--- include/llvm/Support/Dwarf.h<br>
+++ include/llvm/Support/Dwarf.h<br>
@@ -545,6 +545,14 @@<br>
DW_LANG_C_plus_plus_03 = 0x0019,<br>
DW_LANG_C_plus_plus_11 = 0x001a,<br>
DW_LANG_OCaml = 0x001b,<br>
+ DW_LANG_Rust = 0x001c,<br>
+ DW_LANG_C11 = 0x001d,<br>
+ DW_LANG_Swift = 0x001e,<br>
+ DW_LANG_Julia = 0x001f,<br>
+ DW_LANG_Dylan = 0x0020,<br>
+ DW_LANG_C_plus_plus_14 = 0x0021,<br>
+ DW_LANG_Fortran03 = 0x0022,<br>
+ DW_LANG_Fortran08 = 0x0023,<br>
<br>
DW_LANG_lo_user = 0x8000,<br>
DW_LANG_Mips_Assembler = 0x8001,<br>
Index: lib/CodeGen/AsmPrinter/<u></u>DwarfUnit.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- lib/CodeGen/AsmPrinter/<u></u>DwarfUnit.cpp<br>
+++ lib/CodeGen/AsmPrinter/<u></u>DwarfUnit.cpp<br>
@@ -130,6 +130,30 @@<br>
if (dwarf::DWARF_VERSION >= 4)<br>
return 1;<br>
break;<br>
+<br>
+ // The languages below have valid values only if the DWARF version >= 5.<br>
+ case dwarf::DW_LANG_OpenCL:<br>
+ case dwarf::DW_LANG_Go:<br>
+ case dwarf::DW_LANG_Haskell:<br>
+ case dwarf::DW_LANG_C_plus_plus_03:<br>
+ case dwarf::DW_LANG_C_plus_plus_11:<br>
+ case dwarf::DW_LANG_OCaml:<br>
+ case dwarf::DW_LANG_Rust:<br>
+ case dwarf::DW_LANG_C11:<br>
+ case dwarf::DW_LANG_Swift:<br>
+ case dwarf::DW_LANG_Dylan:<br>
+ case dwarf::DW_LANG_C_plus_plus_14:<br>
+ if (dwarf::DWARF_VERSION >= 5)<br>
+ return 0;<br>
+ break;<br>
+<br>
+ case dwarf::DW_LANG_Modula3:<br>
+ case dwarf::DW_LANG_Julia:<br>
+ case dwarf::DW_LANG_Fortran03:<br>
+ case dwarf::DW_LANG_Fortran08:<br>
+ if (dwarf::DWARF_VERSION >= 5)<br>
+ return 1;<br>
+ break;<br>
}<br>
<br>
return -1;<br>
Index: lib/IR/DIBuilder.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- lib/IR/DIBuilder.cpp<br>
+++ lib/IR/DIBuilder.cpp<br>
@@ -145,7 +145,7 @@<br>
DebugEmissionKind Kind,<br>
bool EmitDebugInfo) {<br>
<br>
- assert(((Lang <= dwarf::DW_LANG_OCaml && Lang >= dwarf::DW_LANG_C89) ||<br>
+ assert(((Lang <= dwarf::DW_LANG_Fortran08 && Lang >= dwarf::DW_LANG_C89) ||<br>
(Lang <= dwarf::DW_LANG_hi_user && Lang >= dwarf::DW_LANG_lo_user)) &&<br>
"Invalid Language tag");<br>
assert(!Filename.empty() &&<br>
Index: lib/Support/Dwarf.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- lib/Support/Dwarf.cpp<br>
+++ lib/Support/Dwarf.cpp<br>
@@ -507,6 +507,15 @@<br>
case DW_LANG_C_plus_plus_03: return "DW_LANG_C_plus_plus_03";<br>
case DW_LANG_C_plus_plus_11: return "DW_LANG_C_plus_plus_11";<br>
case DW_LANG_OCaml: return "DW_LANG_OCaml";<br>
+ case DW_LANG_Rust: return "DW_LANG_Rust";<br>
+ case DW_LANG_C11: return "DW_LANG_C11";<br>
+ case DW_LANG_Swift: return "DW_LANG_Swift";<br>
+ case DW_LANG_Julia: return "DW_LANG_Julia";<br>
+ case DW_LANG_Dylan: return "DW_LANG_Dylan";<br>
+ case DW_LANG_C_plus_plus_14: return "DW_LANG_C_plus_plus_14";<br>
+ case DW_LANG_Fortran03: return "DW_LANG_Fortran03";<br>
+ case DW_LANG_Fortran08: return "DW_LANG_Fortran08";<br>
+<br>
case DW_LANG_lo_user: return "DW_LANG_lo_user";<br>
case DW_LANG_Mips_Assembler: return "DW_LANG_Mips_Assembler";<br>
case DW_LANG_hi_user: return "DW_LANG_hi_user";<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
</blockquote></div>