diff options
Diffstat (limited to 'BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp')
-rw-r--r-- | BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp index 654daed..298eb02 100644 --- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp +++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp @@ -787,11 +787,22 @@ CIfrRecordInfoDB::IfrRecordInfoUpdate ( )
{
SIfrRecord *pNode;
+ SIfrRecord *Prev;
if ((pNode = GetRecordInfoFromIdx (RecordIdx)) == NULL) {
return;
}
+ if (LineNo == 0) {
+ //
+ // Line number is not specified explicitly, try to use line number of previous opcode
+ //
+ Prev = GetRecordInfoFromIdx (RecordIdx - 1);
+ if (Prev != NULL) {
+ LineNo = Prev->mLineNo;
+ }
+ }
+
pNode->mLineNo = LineNo;
pNode->mOffset = Offset;
pNode->mBinBufLen = BinBufLen;
|