summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-11-29 19:35:21 +0000
committerZachary Turner <zturner@google.com>2017-11-29 19:35:21 +0000
commit7fe0c00835994ebd08ccf0f2b962fb602c9d3e9e (patch)
tree246bdd8ff8ebd2cd2caaa23a05ac3500cd621328 /tools/llvm-readobj
parent4c205748741b4add62652c91cb22ce437d5a6e87 (diff)
Make TypeTableBuilder inherit from TypeCollection.
A couple of places in LLD were passing references to TypeTableCollections around, which makes it hard to change the implementation at runtime. However, these cases only needed to iterate over the types in the collection, and TypeCollection already provides a handy abstract interface for this purpose. By implementing this interface, we can get rid of the need to pass TypeTableBuilder references around, which should allow us to swap the implementation at runtime in subsequent patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp
index 1ce00610edd..fa56ed6942e 100644
--- a/tools/llvm-readobj/COFFDumper.cpp
+++ b/tools/llvm-readobj/COFFDumper.cpp
@@ -1808,8 +1808,8 @@ void llvm::dumpCodeViewMergedTypes(ScopedPrinter &Writer,
llvm::codeview::TypeTableBuilder &CVTypes) {
// Flatten it first, then run our dumper on it.
SmallString<0> TypeBuf;
- CVTypes.ForEachRecord([&](TypeIndex TI, ArrayRef<uint8_t> Record) {
- TypeBuf.append(Record.begin(), Record.end());
+ CVTypes.ForEachRecord([&](TypeIndex TI, const CVType &Record) {
+ TypeBuf.append(Record.RecordData.begin(), Record.RecordData.end());
});
TypeTableCollection TpiTypes(CVTypes.records());