mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natural check first in the if-then statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -51,9 +51,9 @@ DIEEntry *CompileUnit::createDIEEntry(DIE *Entry) {
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getLowerBoundDefault - 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::getLowerBoundDefault() const {
|
int64_t CompileUnit::getDefaultLowerBound() const {
|
||||||
switch (Language) {
|
switch (Language) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -1302,10 +1302,10 @@ void CompileUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR,
|
|||||||
// Count == 0, then the array has zero elements in which case we do not emit
|
// Count == 0, then the array has zero elements in which case we do not emit
|
||||||
// an upper bound.
|
// an upper bound.
|
||||||
int64_t LowerBound = SR.getLo();
|
int64_t LowerBound = SR.getLo();
|
||||||
int64_t DefaultLowerBound = getLowerBoundDefault();
|
int64_t DefaultLowerBound = getDefaultLowerBound();
|
||||||
int64_t Count = SR.getCount();
|
int64_t Count = SR.getCount();
|
||||||
|
|
||||||
if (LowerBound != DefaultLowerBound || DefaultLowerBound == -1)
|
if (DefaultLowerBound == -1 || LowerBound != DefaultLowerBound)
|
||||||
addUInt(DW_Subrange, dwarf::DW_AT_lower_bound, 0, LowerBound);
|
addUInt(DW_Subrange, dwarf::DW_AT_lower_bound, 0, LowerBound);
|
||||||
|
|
||||||
if (Count != -1 && Count != 0)
|
if (Count != -1 && Count != 0)
|
||||||
|
@ -79,7 +79,9 @@ class CompileUnit {
|
|||||||
/// corresponds to the MDNode mapped with the subprogram DIE.
|
/// corresponds to the MDNode mapped with the subprogram DIE.
|
||||||
DenseMap<DIE *, const MDNode *> ContainingTypeMap;
|
DenseMap<DIE *, const MDNode *> ContainingTypeMap;
|
||||||
|
|
||||||
int64_t getLowerBoundDefault() const;
|
/// getLowerBoundDefault - Return the default lower bound for an array. If the
|
||||||
|
/// DWARF version doesn't handle the language, return -1.
|
||||||
|
int64_t getDefaultLowerBound() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CompileUnit(unsigned UID, unsigned L, DIE *D, AsmPrinter *A, DwarfDebug *DW);
|
CompileUnit(unsigned UID, unsigned L, DIE *D, AsmPrinter *A, DwarfDebug *DW);
|
||||||
|
Reference in New Issue
Block a user