summaryrefslogtreecommitdiff
path: root/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp')
-rw-r--r--unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp b/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
index 04b7bb0ba936..c84eae32face 100644
--- a/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
+++ b/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
@@ -7,13 +7,11 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/ADT/SmallBitVector.h"
+#include "llvm/DebugInfo/CodeView/AppendingTypeTableBuilder.h"
#include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
#include "llvm/DebugInfo/CodeView/LazyRandomTypeCollection.h"
#include "llvm/DebugInfo/CodeView/TypeRecord.h"
#include "llvm/DebugInfo/CodeView/TypeRecordMapping.h"
-#include "llvm/DebugInfo/CodeView/TypeSerializer.h"
-#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h"
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
#include "llvm/DebugInfo/PDB/Native/RawTypes.h"
#include "llvm/Support/Allocator.h"
@@ -95,7 +93,7 @@ public:
static void SetUpTestCase() {
GlobalState = llvm::make_unique<GlobalTestState>();
- TypeTableBuilder Builder(GlobalState->Allocator);
+ AppendingTypeTableBuilder Builder(GlobalState->Allocator);
uint32_t Offset = 0;
for (int I = 0; I < 11; ++I) {
@@ -108,7 +106,7 @@ public:
Stream << "Array [" << I << "]";
AR.Name = GlobalState->Strings.save(Stream.str());
GlobalState->Records.push_back(AR);
- GlobalState->Indices.push_back(Builder.writeKnownType(AR));
+ GlobalState->Indices.push_back(Builder.writeLeafType(AR));
CVType Type(TypeLeafKind::LF_ARRAY, Builder.records().back());
GlobalState->TypeVector.push_back(Type);
@@ -352,7 +350,7 @@ TEST_F(RandomAccessVisitorTest, InnerChunk) {
}
TEST_F(RandomAccessVisitorTest, CrossChunkName) {
- TypeTableBuilder Builder(GlobalState->Allocator);
+ AppendingTypeTableBuilder Builder(GlobalState->Allocator);
// TypeIndex 0
ClassRecord Class(TypeRecordKind::Class);
@@ -363,13 +361,13 @@ TEST_F(RandomAccessVisitorTest, CrossChunkName) {
Class.DerivationList = TypeIndex::fromArrayIndex(0);
Class.FieldList = TypeIndex::fromArrayIndex(0);
Class.VTableShape = TypeIndex::fromArrayIndex(0);
- TypeIndex IndexZero = Builder.writeKnownType(Class);
+ TypeIndex IndexZero = Builder.writeLeafType(Class);
// TypeIndex 1 refers to type index 0.
ModifierRecord Modifier(TypeRecordKind::Modifier);
Modifier.ModifiedType = TypeIndex::fromArrayIndex(0);
Modifier.Modifiers = ModifierOptions::Const;
- TypeIndex IndexOne = Builder.writeKnownType(Modifier);
+ TypeIndex IndexOne = Builder.writeLeafType(Modifier);
// set up a type stream that refers to the above two serialized records.
std::vector<CVType> TypeArray;