diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-09-11 06:18:07 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-09-20 22:18:07 +0800 |
commit | 6f73a03665213b423b4417c77336c7671d2b684e (patch) | |
tree | eb511b85cfecb726c2c674e715c1a1244e3da540 /BaseTools/Source/Python/Workspace/DecBuildData.py | |
parent | b0a2645162a43973befe05743a3c90d0a906b339 (diff) | |
download | edk2-6f73a03665213b423b4417c77336c7671d2b684e.tar.gz edk2-6f73a03665213b423b4417c77336c7671d2b684e.tar.bz2 edk2-6f73a03665213b423b4417c77336c7671d2b684e.zip |
BaseTools: Don't save unused workspace data
FlexibleFieldName was never used not set.
DefinitionPosition (file and line number) are recalculated
and never used outside the function. remove the saving of the
data.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DecBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DecBuildData.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 1f74e898f2..31ee13eca9 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -410,6 +410,7 @@ class DecBuildData(PackageBuildClassObject): if not (PcdCName, TokenSpaceGuid) in PcdSet:
PcdSet.append((PcdCName, TokenSpaceGuid))
+ DefinitionPosition = {}
for PcdCName, TokenSpaceGuid in PcdSet:
#
# limit the ARCH to self._Arch, if no self._Arch found, tdict
@@ -436,7 +437,7 @@ class DecBuildData(PackageBuildClassObject): list(validlists),
list(expressions)
)
- PcdObj.DefinitionPosition = (self.MetaFile.File, LineNo)
+ DefinitionPosition[PcdObj] = (self.MetaFile.File, LineNo)
if "." in TokenSpaceGuid:
StrPcdSet.append((PcdObj, LineNo))
else:
@@ -449,10 +450,10 @@ class DecBuildData(PackageBuildClassObject): for pcd in Pcds.values():
if pcd.DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64, TAB_VOID, "BOOLEAN"]:
if StructPattern.match(pcd.DatumType) is None:
- EdkLogger.error('build', FORMAT_INVALID, "DatumType only support BOOLEAN, UINT8, UINT16, UINT32, UINT64, VOID* or a valid struct name.", pcd.DefinitionPosition[0], pcd.DefinitionPosition[1])
+ EdkLogger.error('build', FORMAT_INVALID, "DatumType only support BOOLEAN, UINT8, UINT16, UINT32, UINT64, VOID* or a valid struct name.", DefinitionPosition[pcd][0], DefinitionPosition[pcd][1])
for struct_pcd in Pcds.values():
if isinstance(struct_pcd, StructurePcd) and not struct_pcd.StructuredPcdIncludeFile:
- EdkLogger.error("build", PCD_STRUCTURE_PCD_ERROR, "The structure Pcd %s.%s header file is not found in %s line %s \n" % (struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCName, struct_pcd.DefinitionPosition[0], struct_pcd.DefinitionPosition[1] ))
+ EdkLogger.error("build", PCD_STRUCTURE_PCD_ERROR, "The structure Pcd %s.%s header file is not found in %s line %s \n" % (struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCName, DefinitionPosition[struct_pcd][0], DefinitionPosition[struct_pcd][1] ))
return Pcds
|