Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:
1. Fix !include issues 2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers 3. Fix building error C2733 when building C++ code. 4. Add GCC46 tool chain definition 5. Add new RVCT and RVCTLINUX tool chains Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -834,6 +834,59 @@ def ProcessLineExtender(LineList):
|
||||
|
||||
return NewList
|
||||
|
||||
## ProcessEdkComment
|
||||
#
|
||||
# Process EDK style comment in LineList: c style /* */ comment or cpp style // comment
|
||||
#
|
||||
#
|
||||
# @param LineList The LineList need to be processed.
|
||||
#
|
||||
# @return LineList The LineList been processed.
|
||||
# @return FirstPos Where Edk comment is first found, -1 if not found
|
||||
#
|
||||
def ProcessEdkComment(LineList):
|
||||
FindEdkBlockComment = False
|
||||
Count = 0
|
||||
StartPos = -1
|
||||
EndPos = -1
|
||||
FirstPos = -1
|
||||
|
||||
while(Count < len(LineList)):
|
||||
Line = LineList[Count].strip()
|
||||
if Line.startswith("/*"):
|
||||
#
|
||||
# handling c style comment
|
||||
#
|
||||
StartPos = Count
|
||||
while Count < len(LineList):
|
||||
Line = LineList[Count].strip()
|
||||
if Line.endswith("*/"):
|
||||
if (Count == StartPos) and Line.strip() == '/*/':
|
||||
Count = Count + 1
|
||||
continue
|
||||
EndPos = Count
|
||||
FindEdkBlockComment = True
|
||||
break
|
||||
Count = Count + 1
|
||||
|
||||
if FindEdkBlockComment:
|
||||
if FirstPos == -1:
|
||||
FirstPos = StartPos
|
||||
for Index in xrange(StartPos, EndPos+1):
|
||||
LineList[Index] = ''
|
||||
FindEdkBlockComment = False
|
||||
elif Line.find("//") != -1:
|
||||
#
|
||||
# handling cpp style comment
|
||||
#
|
||||
LineList[Count] = Line.replace("//", '#')
|
||||
if FirstPos == -1:
|
||||
FirstPos = Count
|
||||
|
||||
Count = Count + 1
|
||||
|
||||
return LineList, FirstPos
|
||||
|
||||
## GetLibInstanceInfo
|
||||
#
|
||||
# Get the information from Library Instance INF file.
|
||||
|
Reference in New Issue
Block a user