|
From: <xf...@us...> - 2012-06-04 01:44:00
|
Revision: 2533
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2533&view=rev
Author: xfzyr
Date: 2012-06-04 01:43:54 +0000 (Mon, 04 Jun 2012)
Log Message:
-----------
Add the check of not allowing list a specified PCD in different PCD type sections in a module.
Signed-off-by: Yurui Zeng <yur...@in...>
Reviewed-by: Chen, Hesheng <hes...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2012-06-01 06:28:38 UTC (rev 2532)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2012-06-04 01:43:54 UTC (rev 2533)
@@ -482,6 +482,7 @@
if hasattr(self, "_Table"):
return
MetaFileParser.__init__(self, FilePath, FileType, Table)
+ self.PcdsDict = {}
## Parser starter
def Start(self):
@@ -688,6 +689,12 @@
self._ValueList[2] = TokenList[1].replace(InfPcdValueList[0], '1', 1);
elif InfPcdValueList[0] in ['False', 'false', 'FALSE']:
self._ValueList[2] = TokenList[1].replace(InfPcdValueList[0], '0', 1);
+ if (self._ValueList[0], self._ValueList[1]) not in self.PcdsDict:
+ self.PcdsDict[self._ValueList[0], self._ValueList[1]] = self._SectionType
+ elif self.PcdsDict[self._ValueList[0], self._ValueList[1]] != self._SectionType:
+ EdkLogger.error('Parser', FORMAT_INVALID, "It is not permissible to list a specified PCD in different PCD type sections.",
+ ExtraData=self._CurrentLine + " (<TokenSpaceGuidCName>.<PcdCName>)",
+ File=self.MetaFile, Line=self._LineIndex + 1)
## [depex] section parser
@ParseMacro
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|