[llvm] r196178 - Make ranges and range lists be a discrete entity that can be located

Eric Christopher echristo at gmail.com
Wed Dec 4 13:29:38 PST 2013


> You could use llvm_move when passing the list to addRangeList here.

Fixed this and a few other things in follow up commits. Thanks :)

>> +      for (SmallVectorImpl<RangeSpan>::const_iterator
>> +               I = List->getRanges().begin(),
>> +               E = List->getRanges().end();
>> +           I != E; ++I) {
>> +        RangeSpan Range = *I;
>> +        // We occasionally have ranges without begin/end labels.
>> +        // FIXME: Verify and fix.
>
> Any test cases for that? Would be nice to have them committed and
> XFAILed, ideally. (yeah, I don't often do this either, so hardly a
> requirement)

Yeah, it's been in the code forever. The "Verify and fix" part is
"well, we have this check, but there aren't any test cases that I can
find that fail if we remove it" - it's a note that someone should look
into this.

>> -  // Flag if we've emitted any ranges and their location for the compile unit.
>> -  if (DebugRangeSymbols.size()) {
>> +  // Attribute if we've emitted any ranges and their location for the compile unit.
>> +  if (CU->getRangeLists().size()) {
>
> This looks like a !empty() test.

Fair :)

>> +
>> +class RangeSpanList {
>
> I think the DWARF spec refers to each top level entry in the ranges
> section as a "range set", possibly? Maybe reusing that terminology
> would be helpful?

Possibly. I was trying to avoid overlapping names with common data
structures as well. :\

Not sure what's more clear.

-eric



More information about the llvm-commits mailing list