#\r
# This file contained the miscellaneous routines for GenMetaFile usage.\r
#\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials are licensed and made available \r
# under the terms and conditions of the BSD License which accompanies this \r
TokenSpaceGuidName = ''\r
PcdCName = ''\r
TokenSpaceGuidNameFound = False\r
- PcdCNameFound = False\r
\r
#\r
# Get TokenSpaceGuidCName from Guids section \r
#\r
for GuidKey in DecGuidsDict:\r
GuidList = DecGuidsDict[GuidKey]\r
- if TokenSpaceGuidNameFound:\r
- break\r
for GuidItem in GuidList:\r
if TokenSpaceGuidValue.upper() == GuidItem.GuidString.upper():\r
TokenSpaceGuidName = GuidItem.GuidCName\r
TokenSpaceGuidNameFound = True\r
break\r
-\r
+ if TokenSpaceGuidNameFound:\r
+ break\r
#\r
# Retrieve PcdCName from Pcds Section\r
#\r
for PcdKey in DecPcdsDict:\r
PcdList = DecPcdsDict[PcdKey]\r
- if PcdCNameFound:\r
- return TokenSpaceGuidName, PcdCName\r
for PcdItem in PcdList:\r
if TokenSpaceGuidName == PcdItem.TokenSpaceGuidCName and Token == PcdItem.TokenValue:\r
PcdCName = PcdItem.TokenCName\r
- PcdCNameFound = True\r
- break\r
+ return TokenSpaceGuidName, PcdCName\r
\r
return TokenSpaceGuidName, PcdCName\r
\r