[llvm-commits] Path lib/Analysis/DIBuilder.cpp to admit Python, user dwarf language tags
Joe Groff
arcata at gmail.com
Sat Jan 7 10:14:46 PST 2012
Hi everyone. In LLVM 3.0, DIBuilder incorrectly rejects DW_LANG_Python
and user DWARF tags. Attached is a patch against vanilla LLVM 3.0 that
fixes the problem. Let me know if anything needs to be changed.
Thanks!
-Joe
-------------- next part --------------
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp
index bfa429d..722d0b1 100644
--- a/lib/Analysis/DIBuilder.cpp
+++ b/lib/Analysis/DIBuilder.cpp
@@ -76,7 +76,8 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
StringRef Directory, StringRef Producer,
bool isOptimized, StringRef Flags,
unsigned RunTimeVer) {
- assert (Lang <= dwarf::DW_LANG_D && Lang >= dwarf::DW_LANG_C89
+ assert ((Lang <= dwarf::DW_LANG_Python && Lang >= dwarf::DW_LANG_C89
+ || Lang <= dwarf::DW_LANG_hi_user && Lang >= dwarf::DW_LANG_lo_user)
&& "Invalid Language tag");
assert (!Filename.empty()
&& "Unable to create compile unit without filename");
More information about the llvm-commits
mailing list