File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,16 @@ type FunctionInfo struct {
1313 Targets []ReferencedTypeInfo
1414}
1515
16+ // FunctionInfo can contain information about a function that is defined, or
17+ // only declared that will be linked later.
18+ //
19+ // This method returns true if the function is defined and has a function body,
20+ // and false if it is only declared and has only the signature, parameters and
21+ // targets defined.
22+ func (f * FunctionInfo ) IsDefined () bool {
23+ return f .EntryBlock != nil
24+ }
25+
1626func (f * FunctionInfo ) CollectBasicBlocks () []* BasicBlockInfo {
1727 blocks := make ([]* BasicBlockInfo , 0 )
1828 for block := f .EntryBlock ; block != nil ; block = block .NextBlock {
Original file line number Diff line number Diff line change @@ -19,7 +19,3 @@ func (f *FunctionGlobalInfo) Name() string {
1919func (f * FunctionGlobalInfo ) Declaration () * core.UnmanagedSourceView {
2020 return f .FunctionInfo .Declaration
2121}
22-
23- func (f * FunctionGlobalInfo ) IsDefined () bool {
24- return f .FunctionInfo .EntryBlock != nil
25- }
You can’t perform that action at this time.
0 commit comments