diff options
author | Reid Kleckner <rnk@google.com> | 2019-04-04 00:28:48 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-04-04 00:28:48 +0000 |
commit | e10d00419ab749170301ef6b902b86bb2fb56da1 (patch) | |
tree | e301a26421fd35546acc13ecf0ec64e4a8954c9c /llvm/lib/ObjectYAML | |
parent | 15f0057e66c58c390d5cd813fe98864d844f1e0d (diff) | |
download | bcm5719-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/lib/ObjectYAML')
-rw-r--r-- | llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp index d6c9f10de01..301ef4c2334 100644 --- a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp +++ b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp @@ -248,7 +248,7 @@ struct UnknownSymbolRecord : public SymbolRecordBase { uint8_t *Buffer = Allocator.Allocate<uint8_t>(TotalLen); ::memcpy(Buffer, &Prefix, sizeof(RecordPrefix)); ::memcpy(Buffer + sizeof(RecordPrefix), Data.data(), Data.size()); - return CVSymbol(Kind, ArrayRef<uint8_t>(Buffer, TotalLen)); + return CVSymbol(ArrayRef<uint8_t>(Buffer, TotalLen)); } Error fromCodeViewSymbol(CVSymbol CVS) override { diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp index 4d37cbb8455..a5e3ce1e71e 100644 --- a/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp +++ b/llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp @@ -98,7 +98,7 @@ template <typename T> struct LeafRecordImpl : public LeafRecordBase { CVType toCodeViewRecord(AppendingTypeTableBuilder &TS) const override { TS.writeLeafType(Record); - return CVType(Kind, TS.records().back()); + return CVType(TS.records().back()); } mutable T Record; @@ -496,7 +496,7 @@ CVType LeafRecordImpl<FieldListRecord>::toCodeViewRecord( Member.Member->writeTo(CRB); } TS.insertRecord(CRB); - return CVType(Kind, TS.records().back()); + return CVType(TS.records().back()); } void MappingTraits<OneMethodRecord>::mapping(IO &io, OneMethodRecord &Record) { |