Update language check. Do not ignore DW_LANG_Python.

Patch by  Joe Groff!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147781 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2012-01-09 17:49:47 +00:00
parent 7e4ac32a4e
commit bc44b9f8d2

View File

@ -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");