mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
DwarfCompileUnit: Simplify getLanguage() calls to use existing member function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -57,7 +57,7 @@ DIEEntry *CompileUnit::createDIEEntry(DIE *Entry) {
|
|||||||
/// getDefaultLowerBound - Return the default lower bound for an array. If the
|
/// getDefaultLowerBound - Return the default lower bound for an array. If the
|
||||||
/// DWARF version doesn't handle the language, return -1.
|
/// DWARF version doesn't handle the language, return -1.
|
||||||
int64_t CompileUnit::getDefaultLowerBound() const {
|
int64_t CompileUnit::getDefaultLowerBound() const {
|
||||||
switch (DICompileUnit(Node).getLanguage()) {
|
switch (getLanguage()) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1165,7 +1165,7 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
|||||||
}
|
}
|
||||||
// Add prototype flag if we're dealing with a C language and the
|
// Add prototype flag if we're dealing with a C language and the
|
||||||
// function has been prototyped.
|
// function has been prototyped.
|
||||||
uint16_t Language = DICompileUnit(Node).getLanguage();
|
uint16_t Language = getLanguage();
|
||||||
if (isPrototyped &&
|
if (isPrototyped &&
|
||||||
(Language == dwarf::DW_LANG_C89 || Language == dwarf::DW_LANG_C99 ||
|
(Language == dwarf::DW_LANG_C89 || Language == dwarf::DW_LANG_C99 ||
|
||||||
Language == dwarf::DW_LANG_ObjC))
|
Language == dwarf::DW_LANG_ObjC))
|
||||||
@ -1423,7 +1423,7 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
|
|||||||
|
|
||||||
// Add the prototype if we have a prototype and we have a C like
|
// Add the prototype if we have a prototype and we have a C like
|
||||||
// language.
|
// language.
|
||||||
uint16_t Language = DICompileUnit(Node).getLanguage();
|
uint16_t Language = getLanguage();
|
||||||
if (SP.isPrototyped() &&
|
if (SP.isPrototyped() &&
|
||||||
(Language == dwarf::DW_LANG_C89 || Language == dwarf::DW_LANG_C99 ||
|
(Language == dwarf::DW_LANG_C89 || Language == dwarf::DW_LANG_C99 ||
|
||||||
Language == dwarf::DW_LANG_ObjC))
|
Language == dwarf::DW_LANG_ObjC))
|
||||||
|
Reference in New Issue
Block a user