MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / GetAllIncludeFiles

Function GetAllIncludeFiles

BaseTools/Source/Python/Ecc/c.py:602–636  ·  view source on GitHub ↗
(FullFileName)

Source from the content-addressed store, hash-verified

600 return None
601
602def GetAllIncludeFiles(FullFileName):
603 if AllIncludeFileListDict.get(FullFileName) is not None:
604 return AllIncludeFileListDict.get(FullFileName)
605
606 FileDirName = os.path.dirname(FullFileName)
607 IncludePathList = IncludePathListDict.get(FileDirName)
608 if IncludePathList is None:
609 IncludePathList = MetaDataParser.GetIncludeListOfFile(EccGlobalData.gWorkspace, FullFileName, GetDB())
610 if FileDirName not in IncludePathList:
611 IncludePathList.insert(0, FileDirName)
612 IncludePathListDict[FileDirName] = IncludePathList
613 IncludeFileQueue = []
614 for IncludeFile in GetIncludeFileList(FullFileName):
615 FileName = IncludeFile[0].lstrip('#').strip()
616 FileName = FileName.lstrip('include').strip()
617 FileName = FileName.strip('\"')
618 FileName = FileName.lstrip('<').rstrip('>').strip()
619 FullPath = GetFullPathOfIncludeFile(FileName, IncludePathList)
620 if FullPath is not None:
621 IncludeFileQueue.append(FullPath)
622
623 i = 0
624 while i < len(IncludeFileQueue):
625 for IncludeFile in GetIncludeFileList(IncludeFileQueue[i]):
626 FileName = IncludeFile[0].lstrip('#').strip()
627 FileName = FileName.lstrip('include').strip()
628 FileName = FileName.strip('\"')
629 FileName = FileName.lstrip('<').rstrip('>').strip()
630 FullPath = GetFullPathOfIncludeFile(FileName, IncludePathList)
631 if FullPath is not None and FullPath not in IncludeFileQueue:
632 IncludeFileQueue.insert(i + 1, FullPath)
633 i += 1
634
635 AllIncludeFileListDict[FullFileName] = IncludeFileQueue
636 return IncludeFileQueue
637
638def GetPredicateListFromPredicateExpStr(PES):
639

Callers 5

GetTypedefDictFunction · 0.70
GetSUDictFunction · 0.70
GetVarInfoFunction · 0.70
CheckFuncLayoutPrototypeFunction · 0.70
CheckDeclTypedefFormatFunction · 0.70

Calls 5

GetIncludeFileListFunction · 0.85
GetFullPathOfIncludeFileFunction · 0.85
lenFunction · 0.85
insertMethod · 0.80
GetDBFunction · 0.70

Tested by

no test coverage detected