[llvm-commits] [llvm] r169486 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfCompileUnit.cpp DwarfCompileUnit.h
Bill Wendling
isanbard at gmail.com
Wed Dec 5 23:55:19 PST 2012
Author: void
Date: Thu Dec 6 01:55:19 2012
New Revision: 169486
URL: http://llvm.org/viewvc/llvm-project?rev=169486&view=rev
Log:
s/getLowerBoundDefault/getDefaultLowerBound/ for consistency. Also put the more natural check first in the if-then statement.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=169486&r1=169485&r2=169486&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Dec 6 01:55:19 2012
@@ -51,9 +51,9 @@
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.
-int64_t CompileUnit::getLowerBoundDefault() const {
+int64_t CompileUnit::getDefaultLowerBound() const {
switch (Language) {
default:
break;
@@ -1302,10 +1302,10 @@
// Count == 0, then the array has zero elements in which case we do not emit
// an upper bound.
int64_t LowerBound = SR.getLo();
- int64_t DefaultLowerBound = getLowerBoundDefault();
+ int64_t DefaultLowerBound = getDefaultLowerBound();
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);
if (Count != -1 && Count != 0)
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=169486&r1=169485&r2=169486&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Thu Dec 6 01:55:19 2012
@@ -79,7 +79,9 @@
/// corresponds to the MDNode mapped with the subprogram DIE.
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:
CompileUnit(unsigned UID, unsigned L, DIE *D, AsmPrinter *A, DwarfDebug *DW);
More information about the llvm-commits
mailing list