Skip to content

Commit 9fabbcb

Browse files
committed
remove IsMethod
1 parent b46e8df commit 9fabbcb

File tree

5 files changed

+1
-14
lines changed

5 files changed

+1
-14
lines changed

include/mrdox/Metadata/Function.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ union FnFlags1
7474
// Info for functions.
7575
struct FunctionInfo : SymbolInfo
7676
{
77-
bool IsMethod = false; // Indicates whether this function is a class method.
7877
Reference Parent; // Reference to the parent class decl for this method.
7978
TypeInfo ReturnType; // Info about the return type of this function.
8079
llvm::SmallVector<FieldTypeInfo, 4> Params; // List of parameters.

source/lib/api/AST/ASTVisitor.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -797,17 +797,11 @@ constructFunction(
797797
I.specs1.nodiscardSpelling = attr->getSemanticSpelling();
798798
}
799799

800-
if constexpr(! std::derived_from<DeclTy, CXXMethodDecl>)
801-
{
802-
I.IsMethod = false;
803-
}
804-
805800
//
806801
// CXXMethodDecl
807802
//
808803
if constexpr(std::derived_from<DeclTy, CXXMethodDecl>)
809804
{
810-
I.IsMethod = true;
811805
NamedDecl const* PD = nullptr;
812806
if(auto const* SD = dyn_cast<ClassTemplateSpecializationDecl>(D->getParent()))
813807
PD = SD->getSpecializedTemplate();

source/lib/api/AST/AnyBlock.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,6 @@ class FunctionBlock
919919
{
920920
switch(ID)
921921
{
922-
case FUNCTION_IS_METHOD:
923-
return decodeRecord(R, I->IsMethod, Blob);
924922
case FUNCTION_BITS:
925923
return decodeRecord(R, {&I->specs0.raw, &I->specs1.raw}, Blob);
926924
default:

source/lib/api/AST/BitcodeWriter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ RecordIDNameMap = []()
263263
{JAVADOC_PARAM_DIRECTION, {"JavadocParamDirection", &Integer32Abbrev}},
264264
{MEMBER_TYPE_NAME, {"Name", &StringAbbrev}},
265265
{MEMBER_TYPE_ACCESS, {"Access", &Integer32Abbrev}},
266-
{FUNCTION_IS_METHOD, {"IsMethod", &BoolAbbrev}},
267266
{FUNCTION_BITS, {"Bits", &Integer32ArrayAbbrev}},
268267
{RECORD_TAG_TYPE, {"TagType", &Integer32Abbrev}},
269268
{RECORD_IS_TYPE_DEF, {"IsTypeDef", &BoolAbbrev}},
@@ -321,7 +320,7 @@ RecordsByBlock{
321320
{BI_FIELD_TYPE_BLOCK_ID, {FIELD_TYPE_NAME, FIELD_DEFAULT_VALUE, FIELD_ATTRIBUTES}},
322321
// FunctionInfo
323322
{BI_FUNCTION_BLOCK_ID,
324-
{FUNCTION_IS_METHOD, FUNCTION_BITS}},
323+
{FUNCTION_BITS}},
325324
// Javadoc
326325
{BI_JAVADOC_BLOCK_ID,
327326
{}},
@@ -808,7 +807,6 @@ emitBlock(
808807
StreamSubBlockGuard Block(Stream, BI_FUNCTION_BLOCK_ID);
809808
emitInfoPart(I);
810809
emitSymbolPart(I);
811-
emitRecord(I.IsMethod, FUNCTION_IS_METHOD);
812810
emitRecord({I.specs0.raw, I.specs1.raw}, FUNCTION_BITS);
813811
emitBlock(I.Parent, FieldId::F_parent);
814812
emitBlock(I.ReturnType);

source/lib/api/Metadata/Reduce.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ void merge(RecordInfo& I, RecordInfo&& Other)
183183
void merge(FunctionInfo& I, FunctionInfo&& Other)
184184
{
185185
Assert(canMerge(I, Other));
186-
if(! I.IsMethod)
187-
I.IsMethod = Other.IsMethod;
188186
if (I.ReturnType.Type.id == EmptySID && I.ReturnType.Type.Name == "")
189187
I.ReturnType = std::move(Other.ReturnType);
190188
if (I.Parent.id == EmptySID && I.Parent.Name == "")

0 commit comments

Comments
 (0)