]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blobdiff - lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Debug info: Modify DebugLocEntry::addValue to take multiple values so it
[opencl/llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 57dda88b0021b11a1602cf651f6a045bde5ac0dd..a669077f08b48fad4cc63b9e43d140c023f417b4 100644 (file)
@@ -1288,8 +1288,9 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
     if (!couldMerge) {
       // Need to add a new DebugLocEntry. Add all values from still
       // valid non-overlapping pieces.
-      for (auto Range : OpenRanges)
-        Loc.addValue(Range.second);
+      if (OpenRanges.size())
+        Loc.addValues(OpenRanges);
+
       DebugLoc.push_back(std::move(Loc));
     }