llvm-dwarfdump: Use deque rather than vector to preserve object reference/pointer...
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 7 Apr 2016 22:59:58 +0000 (22:59 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 7 Apr 2016 22:59:58 +0000 (22:59 +0000)
commit97a42caeb0381c5640ea12617c0963239ad06248
tree7ad6573bcb3b734a173676a26ba02bb36314e061
parentac40034e06a74d2a7da8a28cc2eed87498fa8a20
llvm-dwarfdump: Use deque rather than vector to preserve object reference/pointer identity

TUs in each unit refer to the unit they are in, if the unit is moved
this reference is invalidated & things break.

No test case because UB isn't testable - ASan would likely catch this on
a large enough test case (just needs to have enough TUs that a
reallocation of the vector would occur) but didn't seem worthwhile. Up
for debate/revisiting if anyone feels strongly.

llvm-svn: 265740
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h