summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-04-04 00:28:48 +0000
committerReid Kleckner <rnk@google.com>2019-04-04 00:28:48 +0000
commite10d00419ab749170301ef6b902b86bb2fb56da1 (patch)
treee301a26421fd35546acc13ecf0ec64e4a8954c9c /llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
parent15f0057e66c58c390d5cd813fe98864d844f1e0d (diff)
downloadbcm5719-llvm-e10d00419ab749170301ef6b902b86bb2fb56da1.tar.gz
bcm5719-llvm-e10d00419ab749170301ef6b902b86bb2fb56da1.zip
[codeview] Remove Type member from CVRecord
Summary: Now CVType and CVSymbol are effectively type-safe wrappers around ArrayRef<uint8_t>. Make the kind() accessor load it from the RecordPrefix, which is the same for types and symbols. Reviewers: zturner, aganea Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60018 llvm-svn: 357658
Diffstat (limited to 'llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp')
-rw-r--r--llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
index 4049f6165e2..ff01ef7e739 100644
--- a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
+++ b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
@@ -42,8 +42,6 @@ inline bool operator!=(const ArrayRecord &R1, const ArrayRecord &R2) {
}
inline bool operator==(const CVType &R1, const CVType &R2) {
- if (R1.Type != R2.Type)
- return false;
if (R1.RecordData != R2.RecordData)
return false;
return true;
@@ -107,7 +105,7 @@ public:
GlobalState->Records.push_back(AR);
GlobalState->Indices.push_back(Builder.writeLeafType(AR));
- CVType Type(TypeLeafKind::LF_ARRAY, Builder.records().back());
+ CVType Type(Builder.records().back());
GlobalState->TypeVector.push_back(Type);
GlobalState->AllOffsets.push_back(
@@ -369,11 +367,10 @@ TEST_F(RandomAccessVisitorTest, CrossChunkName) {
TypeIndex IndexOne = Builder.writeLeafType(Modifier);
// set up a type stream that refers to the above two serialized records.
- std::vector<CVType> TypeArray;
- TypeArray.push_back(
- CVType(static_cast<TypeLeafKind>(Class.Kind), Builder.records()[0]));
- TypeArray.push_back(
- CVType(static_cast<TypeLeafKind>(Modifier.Kind), Builder.records()[1]));
+ std::vector<CVType> TypeArray = {
+ {Builder.records()[0]},
+ {Builder.records()[1]},
+ };
BinaryItemStream<CVType> ItemStream(llvm::support::little);
ItemStream.setItems(TypeArray);
VarStreamArray<CVType> TypeStream(ItemStream);
OpenPOWER on IntegriCloud