Fix VfrCompiler bug to create varstore name by varstore name field not structure...
authorlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 17 Jul 2009 11:07:47 +0000 (11:07 +0000)
committerlgao4 <lgao4@7335b38e-4728-0410-8992-fb3ffe349368>
Fri, 17 Jul 2009 11:07:47 +0000 (11:07 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1662 7335b38e-4728-0410-8992-fb3ffe349368

Source/C/VfrCompile/VfrSyntax.g
Source/C/VfrCompile/VfrUtilityLib.cpp

index 2aee307..f91a2c3 100644 (file)
@@ -623,14 +623,12 @@ vfrStatementVarStoreLinear :
                                                                                   TypeName,\r
                                                                                   VarStoreId\r
                                                                                   ), LineNum);\r
-                                                    >>\r
-                                                    <<\r
                                                        VSObj.SetGuid (&Guid);\r
                                                        _PCATCH(mCVfrDataStorage.GetVarStoreId(StoreName, &VarStoreId), SN);\r
                                                        VSObj.SetVarStoreId (VarStoreId);\r
                                                        _PCATCH(gCVfrVarDataTypeDB.GetDataTypeSize(TypeName, &Size), LineNum);\r
                                                        VSObj.SetSize (Size);\r
-                                                       VSObj.SetName (StoreName);\r
+                                                       VSObj.SetName (SN->getText());\r
                                                     >>\r
   ";"\r
   ;\r
index df17922..e59fbb7 100644 (file)
@@ -1669,21 +1669,21 @@ CVfrDataStorage::GetVarStoreType (
   }\r
 \r
   for (pNode = mBufferVarStoreList; pNode != NULL; pNode = pNode->mNext) {\r
-    if (strcmp (pNode->mVarStoreName, StoreName) == NULL) {\r
+    if (strcmp (pNode->mVarStoreName, StoreName) == 0) {\r
       VarStoreType = pNode->mVarStoreType;\r
       return VFR_RETURN_SUCCESS;\r
     }\r
   }\r
 \r
   for (pNode = mEfiVarStoreList; pNode != NULL; pNode = pNode->mNext) {\r
-    if (strcmp (pNode->mVarStoreName, StoreName) == NULL) {\r
+    if (strcmp (pNode->mVarStoreName, StoreName) == 0) {\r
       VarStoreType = pNode->mVarStoreType;\r
       return VFR_RETURN_SUCCESS;\r
     }\r
   }\r
 \r
   for (pNode = mNameVarStoreList; pNode != NULL; pNode = pNode->mNext) {\r
-    if (strcmp (pNode->mVarStoreName, StoreName) == NULL) {\r
+    if (strcmp (pNode->mVarStoreName, StoreName) == 0) {\r
       VarStoreType = pNode->mVarStoreType;\r
       return VFR_RETURN_SUCCESS;\r
     }\r