Changeset 3705 in CLRX


Ignore:
Timestamp:
Feb 2, 2018, 8:35:31 PM (3 years ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCmMetadata: Skip lines with same comment with shorter indent in skipYAMLLine inside block object.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r3704 r3705  
    648648    else
    649649    {   // block value
     650        bool blockValue = false;
    650651        if (ptr!=end && (*ptr=='|' || *ptr=='>'))
     652        {
    651653            ptr++; // skip '|' or '>'
     654            blockValue = true;
     655        }
    652656        if (ptr!=end && *ptr=='#')
    653657            while (ptr!=end && *ptr!='\n') ptr++;
     
    669673                continue;
    670674            }
    671             if (ptr-lineStart <= prevIndent && *ptr!='\n')
     675            if (ptr-lineStart <= prevIndent && *ptr!='\n' &&
     676                (blockValue || *ptr!='#'))
     677                // if indent is short and not empty line (same spaces) or
     678                // or with only comment and not blockValue
    672679            {
    673680                ptr = lineStart;
  • CLRadeonExtender/trunk/tests/amdbin/ROCmMetadata.cpp

    r3704 r3705  
    944944      shorter empty line
    945945   
     946      xxxxxx
     947    YXaya:
     948      aaaa
     949      bbbb
     950  # some comment
    946951      xxxxxx
    947952    LanguageVersion: [ 1
Note: See TracChangeset for help on using the changeset viewer.