BaseTools: Fix bug for VOID* DynamicDefault Pcd use Flexible format
authorYonghong Zhu <yonghong.zhu@intel.com>
Thu, 15 Mar 2018 11:40:18 +0000 (19:40 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 18 Mar 2018 07:01:07 +0000 (15:01 +0800)
define a flexible pcd format in Dyanmic/DynamicExDefault section,
it cause build error.
[PcdsDynamicExDefault.common.DEFAULT]
  pcdToken.Name|{GUID("11111111-2222-42eb-b5eb-fef31d207cb4")}

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Common/Misc.py

index 2086b4c..7d44fdc 100644 (file)
@@ -1720,14 +1720,6 @@ def AnalyzeDscPcd(Setting, PcdType, DataType=''):
             Type = DataType\r
         if len(FieldList) > 2:\r
             Size = FieldList[2]\r
-        else:\r
-            if Type == 'VOID*':\r
-                if Value.startswith("L"):\r
-                    Size = str((len(Value)- 3 + 1) * 2)\r
-                elif Value.startswith("{"):\r
-                    Size = str(len(Value.split(",")))\r
-                else:\r
-                    Size = str(len(Value) -2 + 1 )\r
         if DataType == "":\r
             IsValid = (len(FieldList) <= 1)\r
         else:\r