|
From: <hc...@us...> - 2012-06-08 05:00:35
|
Revision: 2538
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2538&view=rev
Author: hchen30
Date: 2012-06-08 05:00:29 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
1. Add checkpoint of duplicate PCD defined in DEC file
Reviewed-by: Yurui Zeng <yur...@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-08 01:49:59 UTC (rev 2537)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2012-06-08 05:00:29 UTC (rev 2538)
@@ -1567,6 +1567,7 @@
MetaFileParser.__init__(self, FilePath, FileType, Table, -1)
self._Comments = []
self._Version = 0x00010005 # Only EDK2 dec file is supported
+ self._AllPCDs = [] # Only for check duplicate PCD
## Parser starter
def Start(self):
@@ -1809,6 +1810,14 @@
elif ValueList[0] in ['False', 'false', 'FALSE']:
ValueList[0] = '0'
+ # check for duplicate PCD definition
+ if (self._Scope[0], self._ValueList[0], self._ValueList[1]) in self._AllPCDs:
+ EdkLogger.error('Parser', FORMAT_INVALID,
+ "The same PCD name and GUID have been already defined",
+ ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)
+ else:
+ self._AllPCDs.append((self._Scope[0], self._ValueList[0], self._ValueList[1]))
+
self._ValueList[2] = ValueList[0].strip() + '|' + ValueList[1].strip() + '|' + ValueList[2].strip()
_SectionParser = {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|