Skip to content

Commit 87e4339

Browse files
committed
rename RefWithAccess to MemberRef
1 parent 8265ca8 commit 87e4339

File tree

12 files changed

+27
-27
lines changed

12 files changed

+27
-27
lines changed

include/mrdox/Metadata/Access.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum class Access
4040
This is used in records to refer to nested
4141
elements with access control.
4242
*/
43-
struct RefWithAccess
43+
struct MemberRef
4444
{
4545
SymbolID id;
4646
Access access;

include/mrdox/Metadata/Record.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ struct BaseInfo
6767
*/
6868
struct RecordScope
6969
{
70-
std::vector<RefWithAccess> Records;
71-
std::vector<RefWithAccess> Functions;
72-
std::vector<RefWithAccess> Enums;
73-
std::vector<RefWithAccess> Types;
74-
std::vector<RefWithAccess> Vars;
70+
std::vector<MemberRef> Records;
71+
std::vector<MemberRef> Functions;
72+
std::vector<MemberRef> Enums;
73+
std::vector<MemberRef> Types;
74+
std::vector<MemberRef> Vars;
7575
};
7676

7777
/** Metadata for struct, class, or union.

include/mrdox/Metadata/Template.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct TemplateInfo
3939
// for partial specializations:
4040
// - Params will be non-empty
4141
// - each template parameter will appear at least
42-
// once in Args outside of a non-deduced context
42+
// once in Args outside of a non-deduced context
4343
std::vector<TParam> Params;
4444
std::vector<TArg> Args;
4545

include/mrdox/MetadataFwd.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct MemberTypeInfo;
3939
struct NamespaceInfo;
4040
struct RecordInfo;
4141
struct RecordScope;
42-
struct RefWithAccess;
42+
struct MemberRef;
4343
struct Reference;
4444
struct Scope;
4545
struct SymbolInfo;

source/AST/ASTVisitor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ writeParent(
697697
}
698698

699699
// Create an empty Record for the child,
700-
// and insert the child as a RefWithAccess.
700+
// and insert the child as a MemberRef.
701701
// Then return the parent as a serialized bitcode.
702702
Assert(! I.Namespace.empty());
703703
Assert(I.Namespace[0].RefType == InfoType::IT_record);

source/AST/AnyBlock.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ class TemplateParamBlock
691691
return makeError("invalid template parameter kind");
692692
}
693693
}
694-
694+
695695
default:
696696
return AnyBlock::parseRecord(R, ID, Blob);
697697
}
@@ -729,7 +729,7 @@ class TemplateParamBlock
729729
TypeBlock B(*t, br_);
730730
if(auto Err = br_.readBlock(B, ID))
731731
return Err;
732-
// KRYSTIAN NOTE: is this check correct?
732+
// KRYSTIAN NOTE: is this check correct?
733733
// copied from a function with TypeInfo sub-block
734734
switch(B.F)
735735
{

source/AST/BitcodeWriter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,11 @@ emitRecord(
591591
Stream.EmitRecordWithAbbrev(Abbrevs.get(ID), Record);
592592
}
593593

594-
// vector<RefWithAccess>
594+
// vector<MemberRef>
595595
void
596596
BitcodeWriter::
597597
emitRecord(
598-
std::vector<RefWithAccess> const& list,
598+
std::vector<MemberRef> const& list,
599599
RecordID ID)
600600
{
601601
Assert(RecordIDNameMap[ID]);

source/AST/BitcodeWriter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class BitcodeWriter
8686
void emitRecord(Enum Value, RecordID ID);
8787

8888
void emitRecord(llvm::SmallVectorImpl<SymbolID> const& Values, RecordID ID);
89-
void emitRecord(std::vector<RefWithAccess> const& list, RecordID ID);
89+
void emitRecord(std::vector<MemberRef> const& list, RecordID ID);
9090

9191
void emitRecord(SymbolID const& Str, RecordID ID);
9292
void emitRecord(StringRef Str, RecordID ID);

source/AST/DecodeRecord.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ decodeRecord(
9999
return llvm::Error::success();
100100
}
101101

102-
// vector<RefWithAccess>
102+
// vector<MemberRef>
103103
inline
104104
llvm::Error
105105
decodeRecord(
106106
Record const& R,
107-
std::vector<RefWithAccess>& f,
107+
std::vector<MemberRef>& f,
108108
llvm::StringRef blob)
109109
{
110-
constexpr auto RefWithAccessSize =
110+
constexpr auto MemberRefSize =
111111
BitCodeConstants::USRHashSize + 1;
112112
if(R.empty())
113113
return makeError("empty");
114-
auto n = R.size() / RefWithAccessSize;
115-
if(R.size() != n * RefWithAccessSize)
114+
auto n = R.size() / MemberRefSize;
115+
if(R.size() != n * MemberRefSize)
116116
return makeError("short Record");
117117
auto src = R.begin();
118118
f.resize(n);

source/Metadata/Reduce.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ void merge(NamespaceInfo& I, NamespaceInfo&& Other)
124124
static
125125
void
126126
reduceRefsWithAccess(
127-
std::vector<RefWithAccess>& list,
128-
std::vector<RefWithAccess>&& otherList)
127+
std::vector<MemberRef>& list,
128+
std::vector<MemberRef>&& otherList)
129129
{
130130
for(auto const& ref : otherList)
131131
{
132132
auto it = llvm::find_if(
133133
list,
134-
[ref](RefWithAccess const& other) noexcept
134+
[ref](MemberRef const& other) noexcept
135135
{
136136
return other.id == ref.id;
137137
});

0 commit comments

Comments
 (0)