From 9d07f62b627cdc94cc7c472343cda291b155c137 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 13 Nov 2024 00:23:24 +0900 Subject: [PATCH 1/4] Use yaml2obj for llvm-cov tests to see covmap --- .../llvm-cov/Inputs/branch-c-general.o32l | Bin 16272 -> 0 bytes .../llvm-cov/Inputs/branch-c-general.yaml | 160 +++++++++ .../{ => Inputs}/branch-logical-mixed.cpp | 13 +- .../llvm-cov/Inputs/branch-logical-mixed.o32l | Bin 4884 -> 0 bytes .../llvm-cov/Inputs/branch-logical-mixed.yaml | 50 +++ .../llvm-cov/{ => Inputs}/branch-macros.cpp | 14 +- .../tools/llvm-cov/Inputs/branch-macros.o32l | Bin 4456 -> 0 bytes .../tools/llvm-cov/Inputs/branch-macros.yaml | 61 ++++ .../Inputs/branch-showBranchPercentage.c | 58 +++ .../Inputs/branch-showBranchPercentage.o32l | Bin 3284 -> 0 bytes .../Inputs/branch-showBranchPercentage.yaml | 39 ++ .../llvm-cov/Inputs/branch-templates.cpp | 38 ++ .../llvm-cov/Inputs/branch-templates.o32l | Bin 5408 -> 0 bytes .../llvm-cov/Inputs/branch-templates.yaml | 72 ++++ .../llvm-cov/Inputs/mcdc-const-folding.o | Bin 34528 -> 0 bytes .../llvm-cov/Inputs/mcdc-const-folding.yaml | 333 ++++++++++++++++++ llvm/test/tools/llvm-cov/Inputs/mcdc-const.o | Bin 5208 -> 0 bytes .../tools/llvm-cov/Inputs/mcdc-const.yaml | 57 +++ .../tools/llvm-cov/Inputs/mcdc-general-18.o | Bin 6456 -> 0 bytes .../llvm-cov/Inputs/mcdc-general-18.yaml | 57 +++ .../test/tools/llvm-cov/Inputs/mcdc-general.o | Bin 6544 -> 0 bytes .../tools/llvm-cov/Inputs/mcdc-general.yaml | 57 +++ llvm/test/tools/llvm-cov/Inputs/mcdc-macro.o | Bin 6408 -> 0 bytes .../tools/llvm-cov/Inputs/mcdc-macro.yaml | 69 ++++ llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.o | Bin 4112 -> 0 bytes .../tools/llvm-cov/Inputs/mcdc-maxbs.yaml | 57 +++ llvm/test/tools/llvm-cov/Inputs/yaml.makefile | 16 + .../test/tools/llvm-cov/branch-c-general.test | 11 +- .../tools/llvm-cov/branch-export-json.test | 6 +- .../tools/llvm-cov/branch-export-lcov.test | 10 +- .../tools/llvm-cov/branch-logical-mixed.test | 12 + llvm/test/tools/llvm-cov/branch-macros.test | 12 + .../tools/llvm-cov/branch-noShowBranch.test | 5 +- .../llvm-cov/branch-showBranchPercentage.c | 77 ---- .../llvm-cov/branch-showBranchPercentage.test | 25 ++ ...ch-templates.cpp => branch-templates.test} | 41 +-- llvm/test/tools/llvm-cov/mcdc-const.test | 8 +- .../test/tools/llvm-cov/mcdc-export-json.test | 3 +- llvm/test/tools/llvm-cov/mcdc-general-18.test | 13 +- .../tools/llvm-cov/mcdc-general-none.test | 13 +- llvm/test/tools/llvm-cov/mcdc-general.test | 13 +- llvm/test/tools/llvm-cov/mcdc-macro.test | 3 +- llvm/test/tools/llvm-cov/mcdc-maxbs.test | 4 +- 43 files changed, 1235 insertions(+), 172 deletions(-) delete mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-c-general.o32l create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-c-general.yaml rename llvm/test/tools/llvm-cov/{ => Inputs}/branch-logical-mixed.cpp (80%) delete mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.o32l create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml rename llvm/test/tools/llvm-cov/{ => Inputs}/branch-macros.cpp (70%) delete mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-macros.o32l create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.c delete mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.o32l create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.yaml create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-templates.cpp delete mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-templates.o32l create mode 100644 llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-const.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-general.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-general.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-macro.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-macro.yaml delete mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.o create mode 100644 llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml create mode 100644 llvm/test/tools/llvm-cov/Inputs/yaml.makefile create mode 100644 llvm/test/tools/llvm-cov/branch-logical-mixed.test create mode 100644 llvm/test/tools/llvm-cov/branch-macros.test delete mode 100644 llvm/test/tools/llvm-cov/branch-showBranchPercentage.c create mode 100644 llvm/test/tools/llvm-cov/branch-showBranchPercentage.test rename llvm/test/tools/llvm-cov/{branch-templates.cpp => branch-templates.test} (54%) diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-c-general.o32l b/llvm/test/tools/llvm-cov/Inputs/branch-c-general.o32l deleted file mode 100644 index 7b3151184817805fefe16e9023f69501e552f067..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16272 zcmeHNdw5$%m7lp+k}X@ZE!py0iImum?L@X@OSVPhCbBIh&Z|kAq-mSt_?6hLU&Kn2 z0?TG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aLE3kx#+R}0I2JzALl{bu@34vQPB@rw#D^<~4Brsq&FH`9!AJMUGD%bS0B7{y zC&4Gj7grV;z8;M)W8XR5KEhCv_N_JX9W&U6D~}A{OE8Y?lXkoXzSTseC&?E=e`(#6 z=}AmT+275mBpm$`n*TC{K8NNL`5wJP$;|h(fo}ua7vnn$zCC2Ho)+UfZs6Mp>|%VE zuvyW4s7#CTJ#XOay#n8QY(#YbD$` zG?OIm*H{Rstm-Yhfb(Tg+5Uc6TZh#izAu{Ap(hRNnv7Gz{tFZu^&W=a z5y7NAB%fI?;pzb)A5)Szv)yW7;?S@1n0n6!uFGwUTB>BV)jND^n(d&Z#mdLX6VO(@VivcH$WcT}UA z$7j|{IMR!2@_9J3-nR^T>E8vU-d>y!jCy@IMBc4)QATZ)%z6n&dU1U(lEj(yzHQKp ztNM)IOQ!K%556g#i!#Y))=N0j+oxkC&aBr`lijEH04w|Z5z{=H0^f+vMVaI?>m?lN z9ni57XVzO{&^rjM)cZUN^o|_gqu|5PWs>AG>m?lN9oCT&XVzO|(7P8{srNM27o*-8 z@cDEu$|RpzFX2en#wv)-^l?81#+- zEA`s3uF*Tv&qbB*PcPv}@5G #include @@ -81,10 +81,3 @@ int main(int argc, char *argv[]) __llvm_profile_write_file(); return 0; } - -// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover -// REPORT-NEXT: --- -// REPORT-NEXT: _Z4funcii 77 9 88.31% 68 3 95.59% 80 32 60.00% -// REPORT-NEXT: main 1 0 100.00% 5 0 100.00% 0 0 0.00% -// REPORT-NEXT: --- -// REPORT-NEXT: TOTAL 78 9 88.46% 73 3 95.89% 80 32 60.00% diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.o32l b/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.o32l deleted file mode 100644 index a50099716bce95767b945b968ffa7fcb5d034c2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4884 zcma)9eN0r@6~E^(;J^wZ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iuY6Ka$L*)8F0?Mpm5&+h-H;hH5C3HRitnaf#Z0imP6to^WDg#aQ6Xn*6#`G z#~5A@t{2aNv6B{8=7V!&m~3&&+#6a4C1QT16kF8(svY#c|`kL&bb#|oAO diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml new file mode 100644 index 0000000000000..00135f2e8b987 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml @@ -0,0 +1,50 @@ +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_ARM + Flags: [ EF_ARM_EABI_VER5 ] + SectionHeaderStringTable: .strtab +Sections: + - Name: __llvm_covfun + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: F0A0ED2C305C0BB3C0030000F834CF5F518FC8834287299580773304010030012525291D2115190D110509014D4D5145493D4135392D31017D7D8101758501850189016D8D018D019101659501950199015D9D019D01A10155A501A501A90101D501D501D901CD01DD01DD01E101C501E501E501E901BD01ED01ED01F101B501F501F501F901AD01FD01FD018102018502018502018502018902018902018902018D02018D02018D020191020191020191027D010819430201080C000E01000C010E01000C020E01000C030E01000C040E202502000C000E25010C000E202906000C000E1D010C000E20210A000C000E15010C000E20190E000C000E0D010C000E201112000C000E05010C000E200916000C000E01020C000E01000C010E01000C020E01000C030E01000C040E201A4D000C000E4D010C000E201E51000C000E45010C000E202249000C000E3D010C000E202641000C000E35010C000E202A39000C000E2D010C000E202E31000C000E01020C011001000C031001000C051001000C071001000C091001000D000F207D32000D000F7D010D000F20810136000D000F75010C011075000D000F2085013A000D000F8501010D000F2089013E000D000F6D010C01106D000D000F208D0142000D000F8D01010D000F20910146000D000F65010C011065000D000F2095014A000D000F9501010D000F2099014E000D000F5D010C01105D000D000F209D0152000D000F9D01010D000F20A10156000D000F55010C011055000D000F20A5015A000D000FA501010D000F20A9015E000D000F01020C011001000C031001000C051001000C071001000C091001000D000F2062D501000D000FD501010D000F2066D901000D000FCD01010C0110CD01000D000F206ADD01000D000FDD01010D000F206EE101000D000FC501010C0110C501000D000F2072E501000D000FE501010D000F2076E901000D000FBD01010C0110BD01000D000F207AED01000D000FED01010D000F207EF101000D000FB501010C0110B501000D000F208201F501000D000FF501010D000F208601F901000D000FAD01010C0110AD01000D000F208A01FD01000D000FFD01010D000F208E018102000D000F01020700082085029A0100070008850200090185808080088502010500169A0100170285808080089A01020500160102070008208902A6010007000889020009018580808008890201050016A6010017028580808008A601020500160102070008208D02B201000700088D0200090185808080088D0201050016B2010017028580808008B201020500160102070008209102BE010007000891020009018580808008910201050016BE010017028580808008BE0102050016 + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: FAD58DE7366495DB090000001800000000000000428729958077330401000001014F010402 + - Name: __llvm_covmap + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: 00000000210000000000000003000000011E001D2F746D702F6272616E63682D6C6F676963616C2D6D697865642E637070000000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + AddressAlign: 0x1 + Content: 0E005F5A3466756E636969016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: __llvm_covfun + - Name: '__llvm_covfun (1)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_B30B5C302CEDA0F0u + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0x3DC + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x25 + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/branch-macros.cpp b/llvm/test/tools/llvm-cov/Inputs/branch-macros.cpp similarity index 70% rename from llvm/test/tools/llvm-cov/branch-macros.cpp rename to llvm/test/tools/llvm-cov/Inputs/branch-macros.cpp index 73042ac397d40..712b2790f774a 100644 --- a/llvm/test/tools/llvm-cov/branch-macros.cpp +++ b/llvm/test/tools/llvm-cov/Inputs/branch-macros.cpp @@ -1,6 +1,6 @@ -// RUN: llvm-profdata merge %S/Inputs/branch-macros.proftext -o %t.profdata -// RUN: llvm-cov show --show-expansions --show-branches=count %S/Inputs/branch-macros.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck %s -// RUN: llvm-cov report --show-branch-summary %S/Inputs/branch-macros.o32l -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S %s | FileCheck %s -check-prefix=REPORT + + + #define COND1 (a == b) #define COND2 (a != b) @@ -50,11 +50,3 @@ int main(int argc, char *argv[]) __llvm_profile_write_file(); return 0; } - -// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover -// REPORT-NEXT: --- -// REPORT-NEXT: _Z4funcii 28 4 85.71% 18 0 100.00% 30 14 53.33% -// REPORT-NEXT: _Z5func2ii 13 1 92.31% 8 0 100.00% 10 2 80.00% -// REPORT-NEXT: main 1 0 100.00% 6 0 100.00% 0 0 0.00% -// REPORT-NEXT: --- -// REPORT-NEXT: TOTAL 42 5 88.10% 32 0 100.00% 40 16 60.00% diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-macros.o32l b/llvm/test/tools/llvm-cov/Inputs/branch-macros.o32l deleted file mode 100644 index bb4c85adeb4dbc25cc29d8aac06748a6dac3343d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4456 zcma)9Z)jWB6+ibqOSWWNmKDp696MGL+c+kEezN6%#ogq;UBDS_NrwpmRhFJ@wbq}> z&zTEjGoy?QwtZSh)^=rscC6nFV{BgvNjloV@?p*x6c$(^g;pO1(HI+)(d>7w-j$w} zX6&H%&N=s-^E>C<`|f>D-(6W-6+)0AK_gVxi1u5h#S@oogoa@~_-*1Jq}{}IuT1kN zDk88}A^rN|?J_+$dvvd?iF;-5yf7CkByK}n?}Ht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yk}kY@jNIz2E(s5&rMJsLRX~f<2>&9TL&KZ!Ts{v zL*ac284$Jl_`SsSsW*(O?*Yc#c!#d~`1?-b@j7(kQuHDgn(;UE#zB)mfyxCccF?+pyN%BGLt$M1AS z$}jHBt9mY5@X*~*PTDFR*Mn<8Q$46-Q>qHoovT@fcngo)iUiCX*(`WF*=fz`w^YFv3M*GNn2oT2M L{|!7ZJWu}xjeK)v diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml new file mode 100644 index 0000000000000..1b4e6bbfcbce5 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml @@ -0,0 +1,61 @@ +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_ARM + Flags: [ EF_ARM_EABI_VER5 ] + SectionHeaderStringTable: .strtab +Sections: + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: F0A0ED2C305C0BB3A8010000A9166572A6C7691F5CCB403140FE0666150000000000000000000000000000000000000000000F014545493D4135392D3101050509010D0D1101151519011D1D21012525291401101911020C010C0011140015001A1C020C001124020C00122C020C001234020C001201020A000B01000A001001000A001501000A001A204502000A000B45000F0010204906000F00103D0014001520410A00140015350019001A20390E0019001A2D001E001F203112001E001F0301050F001701000F0017200516000F00170205060F001720091A000F00170301070F001F3C00100015440019001E014C0910001501540A100016015C0B1000160301050F001701000F0017200D1E000F0017020D060F0017201122000F00170301070F001F64001000156C0019001E017409100015017C0A1000160301050F001701000F0017201526000F00170215060F001720192A000F00170301070F001F8401001000158C010019001E019401091000150301050F001701000F0017201D2E000F0017021D060F0017202132000F00170301070F001F9C0100100015A4010019001E0301050F001701000F0017202536000F00170225060F001720293A000F0017 + - Name: __llvm_covfun + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: B01D983FC6736395C8000000403729A19E990E4D5CCB403140FE06660D0000000000000000000000000006050905150519191D010D0D110301241A07020C010E0014140018001D011C0B1000160505080F0026200209000F002624001000152C0018001D3400200025013C0A1000160305070F001F44001000154C0019001E0115060F00170106050F00170154091000150305050F001705000F001720190A000F00170219060F0017201D0E000F00170401070F001F01000F001F5C00100015640019001E0301050F001701000F0017200D12000F0017020D060F0017201116000F0017 + - Name: '__llvm_covfun (2)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: FAD58DE7366495DB0900000018000000000000005CCB403140FE066601000001012F010502 + - Name: __llvm_covmap + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: 000000001A0000000000000003000000011700162F746D702F6272616E63682D6D6163726F732E6370700000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + AddressAlign: 0x1 + Content: 19005F5A3466756E636969015F5A3566756E63326969016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: '__llvm_covfun (1)' + - Name: __llvm_covfun + - Name: '__llvm_covfun (2)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_956373C63F981DB0u + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0xE4 + Other: [ STV_HIDDEN ] + - Name: __covrec_B30B5C302CEDA0F0u + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x1C4 + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (2)' + Binding: STB_WEAK + Size: 0x25 + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.c b/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.c new file mode 100644 index 0000000000000..c41739ff0b22f --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.c @@ -0,0 +1,58 @@ + + + + + +#include +#include + +extern void __llvm_profile_write_file(void); + +int main(int argc, char *argv[]) +{ + int i = 0; + if (argc < 3) // CHECK: Branch ([[@LINE]]:7): [True: 16.67%, False: 83.33%] + { + __llvm_profile_write_file(); + return 0; + } + + int a = atoi(argv[1]); + int b = atoi(argv[2]); + + // CHECK: Branch ([[@LINE+4]]:8): [True: 20.00%, False: 80.00%] + // CHECK: Branch ([[@LINE+3]]:18): [True: 0.00%, False: 100.00%] + // CHECK: Branch ([[@LINE+2]]:29): [True: 0.00%, False: 100.00%] + // CHECK: Branch ([[@LINE+1]]:40): [True: 40.00%, False: 60.00%] + if ((a == 0 && b == 2) || b == 34 || a == b) + printf("case1\n"); + + b = (a != 0 || a == 2) ? b : b+2; // CHECK: Branch ([[@LINE]]:8): [True: 80.00%, False: 20.00%] + // CHECK: Branch ([[@LINE-1]]:18): [True: 0.00%, False: 100.00%] + b = (a != 0 && a == 1); // CHECK: Branch ([[@LINE]]:8): [True: 80.00%, False: 20.00%] + // CHECK: Branch ([[@LINE-1]]:18): [True: 25.00%, False: 75.00%] + for (i = 0; i < b; i++) { a = 2 + b + b; } + // CHECK: Branch ([[@LINE-1]]:15): [True: 16.67%, False: 83.33%] + + b = a; + + switch (a) + { + case 0: // CHECK: Branch ([[@LINE]]:5): [True: 20.00%, False: 80.00%] + printf("case0\n"); + case 2: // CHECK: Branch ([[@LINE]]:5): [True: 20.00%, False: 80.00%] + printf("case2\n"); + case 3: // CHECK: Branch ([[@LINE]]:5): [True: 0.00%, False: 100.00%] + printf("case3\n"); + default: break; // CHECK: Branch ([[@LINE]]:5): [True: 60.00%, False: 40.00%] + } + + i = 0; + do { + printf("loop\n"); + } while (i++ < 10); // CHECK: Branch ([[@LINE]]:12): [True: 90.91%, False: 9.09%] + + __llvm_profile_write_file(); + + return b; +} diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.o32l b/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.o32l deleted file mode 100644 index 5f8b9fa10582777140f099297ecccc2374a4c0d5..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EEA!w)ach`(9m!7v*(unZ8+ZT-*5ZJ@?PlUDJA)OxG!?%qYUH z;c3Be)oQ6yB*UxR+}_5EP*g0gsI+V6uhdGeooAK)|1)J^x~^Fuqy9)afcdiRn#AP= zR%qK~A1{!x;A7UujF0n(ahS(>Q$~u$T_fpj<#%dwI5WW;_c_k%OYkXC>IfXH^POO6 z{SVjDxy7;dkel^x`c?b$yEY;@6um`xNiL(6tutfc>9<#Pj8KVNtwwDE`)Z{%0|6 M5 +template +void unused(T x) { + return; +} + +template +int func(T x) { + if(x) // CHECK: | Branch ([[@LINE]]:6): [True: 0, False: 1] + return 0; // CHECK: | Branch ([[@LINE-1]]:6): [True: 1, False: 0] + else // CHECK: | Branch ([[@LINE-2]]:6): [True: 0, False: 1] + return 1; + int j = 1; +} + + // CHECK-LABEL: _Z4funcIiEiT_: + // CHECK: | | Branch ([[@LINE-8]]:6): [True: 0, False: 1] + // CHECK-LABEL: _Z4funcIbEiT_: + // CHECK: | | Branch ([[@LINE-10]]:6): [True: 1, False: 0] + // CHECK-LABEL: _Z4funcIfEiT_: + // CHECK: | | Branch ([[@LINE-12]]:6): [True: 0, False: 1] + +extern "C" { extern void __llvm_profile_write_file(void); } +int main() { + if (func(0)) // CHECK: | Branch ([[@LINE]]:7): [True: 1, False: 0] + printf("case1\n"); + if (func(true)) // CHECK: | Branch ([[@LINE]]:7): [True: 0, False: 1] + printf("case2\n"); + if (func(0.0)) // CHECK: | Branch ([[@LINE]]:7): [True: 1, False: 0] + printf("case3\n"); + __llvm_profile_write_file(); + return 0; +} diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-templates.o32l b/llvm/test/tools/llvm-cov/Inputs/branch-templates.o32l deleted file mode 100644 index d611727170d9b6bc452efdb8a6c725061e3e0419..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5408 zcmcInYit}>6+U;?>)6KYIJQ$iVmq5Bj*Dj>UcV}}@;Y{!fQy zyNQH)q_gMs%{lknx%bZ9r{?C*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DiTc(h->oG%~$Tke-{?H=Zt&-nV_HBi_6Ir1>K?&I})?Blwx58l;vzWP3xkA09ytVOEtV*>%*$1vji_3?dQ zAH25ey2-je{(g^ryyEMF{|R-z`aYPCJ&b@!`}OgvuMhrL)O|b;o$FLn4+2qbK^yMZb=~nWMqcrx&T$Di|M{YE2`JPx{f-0jk&b-@K9nx&5OEi@0jY5>Kxvxa yF6q#p&@a~$*E31u9)}WeaqINI4jj+idfc~w^OiDU@-w^-o^8y-eaPW*UHlL0cE2A0 diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml new file mode 100644 index 0000000000000..671c530e939e8 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml @@ -0,0 +1,72 @@ +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_ARM + Flags: [ EF_ARM_EABI_VER5 ] + SectionHeaderStringTable: .strtab +Sections: + - Name: '__llvm_covfun (3)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: FAD58DE7366495DB5D00000058242991A4449202DDC07F26680C05B801000301050109010D0D011D0C0902010107001320050200070013050014018580808008050105001601010700172009060007001709001801858080800809010500160101070017200D0A000700170D00180185808080080D01050016 + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: 5427717259E0E43E4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + - Name: '__llvm_covfun (2)' + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: 4B7E22082F0551AA4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + - Name: __llvm_covfun + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: AC1440BC3DA3E41A4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + - Name: __llvm_covmap + Type: SHT_PROGBITS + AddressAlign: 0x8 + Content: 000000001D0000000000000003000000011A00192F746D702F6272616E63682D74656D706C617465732E637070000000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + AddressAlign: 0x1 + Content: 2E006D61696E015F5A3466756E6349694569545F015F5A3466756E6349624569545F015F5A3466756E6349664569545F + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: '__llvm_covfun (3)' + - Name: '__llvm_covfun (1)' + - Name: '__llvm_covfun (2)' + - Name: __llvm_covfun + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_1AE4A33DBC4014ACu + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0x66 + Other: [ STV_HIDDEN ] + - Name: __covrec_3EE4E05972712754u + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x66 + Other: [ STV_HIDDEN ] + - Name: __covrec_AA51052F08227E4Bu + Type: STT_OBJECT + Section: '__llvm_covfun (2)' + Binding: STB_WEAK + Size: 0x66 + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (3)' + Binding: STB_WEAK + Size: 0x79 + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.o b/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.o deleted file mode 100644 index 7a16162f29c00777d9a05f5fed1cc4cbf333c56c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34528 zcmcg#3wTu3wLWJKkD!DEMU547qEgc;IFm^xGiq@rnTgS&V)22`5E5PjNeY2R>mw@I zP+!y*rS*kxP}G20u~%DK(PC?_T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z|JQ*ho_Cfu{y9FcH%>y=ZR>w;k^HYS@c(m2g5&f0-x2Yz5fLZKDGHey@2evhMd|3nK249Hpk6~5Mf7fvTcRgfQ T5Sx$nt9#3RiT!SbLy!Oe6Jcr| diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml new file mode 100644 index 0000000000000..18dc57488acb3 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml @@ -0,0 +1,333 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_GNU + Type: ET_REL + Machine: EM_X86_64 + SectionHeaderStringTable: .strtab +Sections: + - Name: __llvm_covfun + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: AA19D25F7410F1EA300000000E06000000000000B975BFDE464C3C13010101050906010314020201010C000D280302000C0012300000010200000C000D050011001230090202000000110012 + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 92691AC8D7253F8B300000000E06000000000000B975BFDE464C3C13010101010506010614020201010C000D280302000C0012300502010200000C000D050011001230000002000000110012 + - Name: '__llvm_covfun (2)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 9A7D6FA40D389A5B300000000E06000000000000B975BFDE464C3C13010101050906010914020201010C000D280302000C0012300000010200000C000D050011001230090202000000110012 + - Name: '__llvm_covfun (3)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 3CC016E1B5A95933300000000E06000000000000B975BFDE464C3C13010101010506010C14020201010C000D280302000C0012300502010200000C000D050011001230000002000000110012 + - Name: '__llvm_covfun (4)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 98207F8F78271E50300000000F06000000000000B975BFDE464C3C13010101050906010F14020201010C000D280302000C0012300000010002000C000D050011001230020902000000110012 + - Name: '__llvm_covfun (5)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 0969FC47730492F1300000000F06000000000000B975BFDE464C3C13010101010506011214020201010C000D280302000C0012300205010002000C000D050011001230000002000000110012 + - Name: '__llvm_covfun (6)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 0ECB0EF7963F6F79300000000F06000000000000B975BFDE464C3C13010101050906011514020201010C000D280302000C0012300000010002000C000D050011001230020902000000110012 + - Name: '__llvm_covfun (7)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 123E012CB073B24A300000000F06000000000000B975BFDE464C3C13010101010506011814020201010C000D280302000C0012300205010002000C000D050011001230000002000000110012 + - Name: '__llvm_covfun (8)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: C2EA1D70E059B55D460000008E83010000000000B975BFDE464C3C130101020D11050909011C1C020201010C000D01000C0012280403000C0017300000010300000C000D0D0011001230110203020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (9)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 24244E16CFFB9F53460000008E83010000000000B975BFDE464C3C13010102010D050909011F1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (10)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: CC9CCD1D2ED1627D460000008E83010000000000B975BFDE464C3C130101020D1105090901221C020201010C000D01000C0012280403000C0017300000010300000C000D0D0011001230110203020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (11)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 69198FBDA5C488EE460000008E83010000000000B975BFDE464C3C13010102010D05090901251C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (12)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: A753680B241373ED46000000CF83010000000000B975BFDE464C3C130101020D1105090901281C020201010C000D01000C0012280403000C0017300000010003000C000D0D0011001230021103000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (13)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 54BD46601EA033AC46000000CF83010000000000B975BFDE464C3C13010102010D050909012B1C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (14)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 39953E03B6ADA13B46000000CF83010000000000B975BFDE464C3C130101020D11050909012E1C020201010C000D01000C0012280403000C0017300000010003000C000D0D0011001230021103000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (15)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 9BCFA8D8AA6B9E2046000000CF83010000000000B975BFDE464C3C13010102010D05090901311C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (16)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 4F2882F8142D1DD9460000008E83010000000000B975BFDE464C3C13010102010D0D110901351C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230110603020000110012050016001730000002000000160017 + - Name: '__llvm_covfun (17)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 98DB88AFB7497C76460000008E83010000000000B975BFDE464C3C13010102010D05090901381C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (18)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 596357935D55EEBA460000008E83010000000000B975BFDE464C3C13010102010D0D1109013B1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230110603020000110012050016001730000002000000160017 + - Name: '__llvm_covfun (19)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 3237FBD998D0D824460000008E83010000000000B975BFDE464C3C13010102010D050909013E1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + - Name: '__llvm_covfun (20)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: D656F1340A0C4ED846000000CF83010000000000B975BFDE464C3C13010102010D0D110901411C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230061103000200110012050016001730000002000000160017 + - Name: '__llvm_covfun (21)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 5E66CCF22EE6A4AC46000000CF83010000000000B975BFDE464C3C13010102010D05090901441C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (22)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 7C4DEA109976A2E846000000CF83010000000000B975BFDE464C3C13010102010D0D110901471C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230061103000200110012050016001730000002000000160017 + - Name: '__llvm_covfun (23)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: E25997DF8D6D856B46000000CF83010000000000B975BFDE464C3C13010102010D050909014A1C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + - Name: '__llvm_covfun (24)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: FAD58DE7366495DB1D0000001800000000000000B975BFDE464C3C1301010005014F0121021004010001100901000110090100011009010001 + - Name: __llvm_covmap + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 000000001B000000000000000600000002180000166D6364632D636F6E73742D666F6C64696E672E63707000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] + AddressAlign: 0x1 + Content: 8402005F5A35636173653062015F5A35636173653162015F5A35636173653262015F5A35636173653362015F5A35636173653462015F5A35636173653562015F5A35636173653662015F5A35636173653762015F5A3563617365386262015F5A3563617365396262015F5A3563617365616262015F5A3563617365626262015F5A3563617365636262015F5A3563617365646262015F5A3563617365656262015F5A3563617365666262015F5A3563617365676262015F5A3563617365686262015F5A3563617365696262015F5A35636173656A6262015F5A35636173656B6262015F5A35636173656C6262015F5A35636173656D6262015F5A35636173656E6262016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: __llvm_covfun + - Name: '__llvm_covfun (1)' + - Name: '__llvm_covfun (2)' + - Name: '__llvm_covfun (3)' + - Name: '__llvm_covfun (4)' + - Name: '__llvm_covfun (5)' + - Name: '__llvm_covfun (6)' + - Name: '__llvm_covfun (7)' + - Name: '__llvm_covfun (8)' + - Name: '__llvm_covfun (9)' + - Name: '__llvm_covfun (10)' + - Name: '__llvm_covfun (11)' + - Name: '__llvm_covfun (12)' + - Name: '__llvm_covfun (13)' + - Name: '__llvm_covfun (14)' + - Name: '__llvm_covfun (15)' + - Name: '__llvm_covfun (16)' + - Name: '__llvm_covfun (17)' + - Name: '__llvm_covfun (18)' + - Name: '__llvm_covfun (19)' + - Name: '__llvm_covfun (20)' + - Name: '__llvm_covfun (21)' + - Name: '__llvm_covfun (22)' + - Name: '__llvm_covfun (23)' + - Name: '__llvm_covfun (24)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_covmap + Type: STT_SECTION + Section: __llvm_covmap + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_EAF110745FD219AAu + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_8B3F25D7C81A6992u + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_5B9A380DA46F7D9Au + Type: STT_OBJECT + Section: '__llvm_covfun (2)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_3359A9B5E116C03Cu + Type: STT_OBJECT + Section: '__llvm_covfun (3)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_501E27788F7F2098u + Type: STT_OBJECT + Section: '__llvm_covfun (4)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_F192047347FC6909u + Type: STT_OBJECT + Section: '__llvm_covfun (5)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_796F3F96F70ECB0Eu + Type: STT_OBJECT + Section: '__llvm_covfun (6)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_4AB273B02C013E12u + Type: STT_OBJECT + Section: '__llvm_covfun (7)' + Binding: STB_WEAK + Size: 0x4C + Other: [ STV_HIDDEN ] + - Name: __covrec_5DB559E0701DEAC2u + Type: STT_OBJECT + Section: '__llvm_covfun (8)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_539FFBCF164E2424u + Type: STT_OBJECT + Section: '__llvm_covfun (9)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_7D62D12E1DCD9CCCu + Type: STT_OBJECT + Section: '__llvm_covfun (10)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_EE88C4A5BD8F1969u + Type: STT_OBJECT + Section: '__llvm_covfun (11)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_ED7313240B6853A7u + Type: STT_OBJECT + Section: '__llvm_covfun (12)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_AC33A01E6046BD54u + Type: STT_OBJECT + Section: '__llvm_covfun (13)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_3BA1ADB6033E9539u + Type: STT_OBJECT + Section: '__llvm_covfun (14)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_209E6BAAD8A8CF9Bu + Type: STT_OBJECT + Section: '__llvm_covfun (15)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_D91D2D14F882284Fu + Type: STT_OBJECT + Section: '__llvm_covfun (16)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_767C49B7AF88DB98u + Type: STT_OBJECT + Section: '__llvm_covfun (17)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_BAEE555D93576359u + Type: STT_OBJECT + Section: '__llvm_covfun (18)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_24D8D098D9FB3732u + Type: STT_OBJECT + Section: '__llvm_covfun (19)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_D84E0C0A34F156D6u + Type: STT_OBJECT + Section: '__llvm_covfun (20)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_ACA4E62EF2CC665Eu + Type: STT_OBJECT + Section: '__llvm_covfun (21)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_E8A2769910EA4D7Cu + Type: STT_OBJECT + Section: '__llvm_covfun (22)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_6B856D8DDF9759E2u + Type: STT_OBJECT + Section: '__llvm_covfun (23)' + Binding: STB_WEAK + Size: 0x62 + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (24)' + Binding: STB_WEAK + Size: 0x39 + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const.o b/llvm/test/tools/llvm-cov/Inputs/mcdc-const.o deleted file mode 100644 index bc38b71b5de072cedeb2172d160d6705d4855c47..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5208 zcmb_fU1(fY5T0{yHb4EzZW>eVuNx>*)ZA`jn+#Kd7kCHwCFa2)+m+D1x;1L8=c$sG=y?hl14?s|5us#+h?x?mao~Qm_u}ojKpk zoS8Fc&bfDwj7^L?O1Z$K;7(97F!(oXqCr}VY1oREndKObjxPHHm*W*JPsbO}OvkUB zT3Sn*mdo)Y8fMGPu{#Ld`VTx=NXicYGD@3lBd zdYrvfLlz}!s*qs3zAzc7<2jvUXvJCepM2yrElHEZT=s0)qLm<3L(&%502@=itub&&>VO*|iCRh)r5N<8qf1Lm?J*UD zZNUQm{OZ_`gN5VYb>r}c05b9fS9PflClSLO6AnJK1=$j{;?GF{be8gkd|$p&uKQlT zTGhJ$>mhZN8eVPQ4mObe5qnvutWof0T=rG;3CJGU=@;w%6p||C=E^kaPZo;#x%ynC zob+o8MS%Q#t~`@mEY>vEKkTKv)Xba@xH$o-C+`P!IH5MJX={H4gJAh!GwTY>DM#Ej zP2H5p-p<6cj@zX=+w~4m-3e~j767Z6)4A`&U!2EX%xS+Ueh-fuv6m5SfnS#!>0I4F zD>YB!P{H*fDC=9G#Be5?9%Y=?Ym*DIYmo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sh_~Vp+LQm7Jzw@-#@Z0>fep{6Mw1y r1;pHmW%_%tgujp`*`K#jpC3}%`41pq=T3Hqxk0zHlKf~d?fCxyAk0HP diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml new file mode 100644 index 0000000000000..5e57a7e7739d6 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml @@ -0,0 +1,57 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_GNU + Type: ET_REL + Machine: EM_X86_64 + SectionHeaderStringTable: .strtab +Sections: + - Name: __llvm_covfun + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 8AC9CB6DFFBEFE928600000091E438CFA3000000A8826E3AB548EA6F01010201151D2113010A2B04021001010001010107000F010007001B0100070020280B050007002001000800093015020104030008000915000D000E300000040003000D000E110013001B1100140015300000030502001400151D0019001A3021060500020019001A09001F0020300000020000001F00200500210185808080080501050024 + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: FAD58DE7366495DB130000001800000000000000A8826E3AB548EA6F01010003011101090210050100011002010001 + - Name: __llvm_covmap + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 00000000130000000000000006000000021000000E6D6364632D636F6E73742E63707000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] + AddressAlign: 0x1 + Content: 10005F5A347465737462626262016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: __llvm_covfun + - Name: '__llvm_covfun (1)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_covmap + Type: STT_SECTION + Section: __llvm_covmap + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_92FEBEFF6DCBC98Au + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0xA2 + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x2F + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.o b/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.o deleted file mode 100644 index e802f51132c068f0f4e2921c952710cb5c5665e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6456 zcmd5=eQaA-6~FJjWU*VvcC)5U(xq}rH?p!k>?X~c(jYsHvs7eLwzAQ|z;zubjTV2% zd5H!L7F4%e5a~8hCH_Df|1qHN&o~k&z2nn6Lm{Z zC|`2!B`h8~_tr|&n}B?okPBBWG95Qwd)~P8d!JeLIE)^z;#c{y(@$`+Tyb`+r=+UP zu6#LEehzeKf2kD>%(d^rx4SlCt6&s5^&LRgc0w<_nDKK){L+=UZy=0b{s0Ob+^yVo z;H!qd?i`^tRPs}3!C1Wfmr(fy&(O<@J*{|U5VU?nySdHy7yV z>nnjI)|@O~caG97wB~MFHi|ud@+ZE}CBBeIeSQs$xhw0NHt5UH3R<YH`(dXikSd zxIn%+Fo~WU&3~*SolBJb$Id@^5hev&0)(NFzP|diT;!cyZicL#_(`rD49GQH8y>0vl%uFVHie>2pOV9?C2Fu z$PD2V{%EUdSSGGoMXLx#x7=hwY*_il&0>dNY!&U%_DyD!z*W2G6kXBIAV|1s7PlCu zmX?-$%|^4>T@B*HAg#Toi7eXFW{6fR=0~TH|Xs(L9sF;)Y}A=8L-C6hIip{1FKiVEjH@AR z#E?`;?!n4HB`H-7+gKT>>=R)($UY1LnE2;gD}NfCI(zwMnFS(ns#N(?-mnM>zqB8%CQ zw2ckfQ9C*_>)@2TWPIs9VLTExb_7~{PeC%{0N+A;a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/tools/llvm-cov/Inputs/mcdc-general-18.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml new file mode 100644 index 0000000000000..13a9bce74ab1a --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml @@ -0,0 +1,57 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_GNU + Type: ET_REL + Machine: EM_X86_64 + SectionHeaderStringTable: .strtab +Sections: + - Name: __llvm_covfun + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 8AC9CB6DFFBEFE9260010000F7C63A91EAF34488EB382E2763226D9301010C010D0D1109151519012121251D2D2D31013D3D413945454930010A2B0B021001010001010107000F010007001B2800040007001B0100080009300D02010302000800090D000D000E301106030002000D000E090013001B090014001530150A02040000140015150019001A30190E0400000019001A05001C018580808008050105002410010100010101070008010007000D2802020007000D3021120102000007000821000C000D302516020000000C000D1D000E008F808080081D000F01241D001300141D0013001928030200130019302D1A010200001300142D0018001930311E0200000018001929001A01858080800829010500241001010001010107000F010007010F2804040007010F0100080009303D22010300000800093D000D000E304126030200000D000E390107000F390008000930452A0204000008000945000D000E30492E040000000D000E3500100185808080083501050024 + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: FAD58DE7366495DB130000001800000000000000EB382E2763226D93010100030118010C0210050100011004010001 + - Name: __llvm_covmap + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 0000000015000000000000000600000002120000106D6364632D67656E6572616C2E637070000000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] + AddressAlign: 0x1 + Content: 10005F5A347465737462626262016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: __llvm_covfun + - Name: '__llvm_covfun (1)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_covmap + Type: STT_SECTION + Section: __llvm_covmap + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_92FEBEFF6DCBC98Au + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0x17C + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x2F + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-general.o b/llvm/test/tools/llvm-cov/Inputs/mcdc-general.o deleted file mode 100644 index 8bed601221a1459b613300a7386e5251a3fdce1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6544 zcmd6rZ){sv6~OO(P8uh5Y&UDVq-}~*bu4Aeo82Z^QZ2|%swp>z!$ERcklV#bI&>Vyz}0>&SS}`2}??!peDtqg=9hN!yTRwSHrm21)2{fzL5C* z1JkRoCRSgc+-Sy`)qf{eZ^YJ4Z8$rLoJWiC%HN&M1kT0R@1kL{vf&)2ap=X%X99_n zm#oS~=LD_J5M$yYVctM*7G()@BGv`3RP3fOjS5OI6u7ED7mD_QlymlV0 z?zkLVgCIhuUIcP&7(%UULc#<`;O_HjJ*s5oJ*PfviRxq4}R7yDoL2ij^}t2=xyQoU8x zrI*ji)ju*`e|wrEJE`_*c^myLZQM-&skt|3wMLqG8LKJw-p{d9epM+bdO=NHjjbs} z%RC=$l3k-uaIRf3;;lCf$2OEzMagjN;ukMtN}yqCv7uvZPp`e2+qiJ!TQdOO|J8wS z{_Xns>Gfgz&dl!Ix1|io_Vz8Uot@pXxA%^o{{EO89ZifRlZT?R?XJyM7>Z0v*&;$x zw1^#jElt=-;TNsZc1!v!9JPyf5sYrxDNmKlWq-457JI5r{OF{;ug$_P+S?&vFD=5~D*_ zd=mDFqY+HRh*C*@3U>x7Nu_e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VDW|N87$naoae{WC!=)r-Jk-o8^g|caE zaOh~?=wNrx=*ZFjfdMo{vdOu4B%fT$LnM(&rIP79y3frmregEi=~yD2&*}Q)Y^9!# zr;<5{%w#hQ^WukXq~f|Zy^u!Rd^R&ZnTn}5w4^0UN+g}hCnHZh_3Zv!KAt!Y5mh}t zHH9zi3^$lO6`RgtEvWdPvy~JdXReTlksQh8v-vpj=TeH(Dz#-z#q)6)?LF}Zyufl- z^+cc3;Xvx93$Bqv1v;OE(f?GPqO5$QgDA`S6!;)xQ305*@l*3A7o_)r&W^n3a^98^ zb9*H(@S?<@;>l0y3x5?cRl*FTRHiW3m3K}ol27z%_19eL)BicCE4*6$U%0-!r&7;Z zzkr64Ygk+qAK=T^S%H@4Cvdg?-*f4odX~P0PasD1@k_3PjAA@`z*F$j&Bu!xx@?KKwM4|T;@kJlX#imO~kBY#SF3){B6-D$IJZa{1Z9*4} So&3J#{%>#qG5U^i*8c~u_-R%E diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml new file mode 100644 index 0000000000000..617ad17fa1008 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml @@ -0,0 +1,57 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + OSABI: ELFOSABI_GNU + Type: ET_REL + Machine: EM_X86_64 + SectionHeaderStringTable: .strtab +Sections: + - Name: __llvm_covfun + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 8A68DC3E925EACF9B1000000C67EFC36662A3548DEBA335F42BD13F502010107010502151519111D1D210109090D1101031003020C0107000C05001A009B8080800805001B0023020024018380808008020103003C02000B0021280A04000B003B02000C0014301506010302000C0014150018002030190A03000200180020110025003B110026002E301D0E0204000026002E1D0032003A3021120400000032003A06010116003001001700212803020017002F30091601020000170021090025002F300D1A0200000025002F + - Name: '__llvm_covfun (1)' + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: FAD58DE7366495DB2A0000005C83010000000000DEBA335F42BD13F5010101010506010B01020201010B0010200502000B0010050012009380808008050013001902001C001D + - Name: __llvm_covmap + Type: SHT_PROGBITS + Flags: [ SHF_GNU_RETAIN ] + AddressAlign: 0x8 + Content: 00000000110000000000000006000000020E00000C6D6364632D6D617862732E63000000 + - Name: __llvm_prf_names + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] + AddressAlign: 0x1 + Content: 0800737562016D61696E + - Type: SectionHeaderTable + Sections: + - Name: .strtab + - Name: __llvm_covfun + - Name: '__llvm_covfun (1)' + - Name: __llvm_covmap + - Name: __llvm_prf_names + - Name: .symtab +Symbols: + - Name: __llvm_covmap + Type: STT_SECTION + Section: __llvm_covmap + - Name: __llvm_prf_names + Type: STT_SECTION + Section: __llvm_prf_names + - Name: __covrec_F9AC5E923EDC688Au + Type: STT_OBJECT + Section: __llvm_covfun + Binding: STB_WEAK + Size: 0xCD + Other: [ STV_HIDDEN ] + - Name: __covrec_DB956436E78DD5FAu + Type: STT_OBJECT + Section: '__llvm_covfun (1)' + Binding: STB_WEAK + Size: 0x46 + Other: [ STV_HIDDEN ] +... diff --git a/llvm/test/tools/llvm-cov/Inputs/yaml.makefile b/llvm/test/tools/llvm-cov/Inputs/yaml.makefile new file mode 100644 index 0000000000000..c5b55d28eb3b5 --- /dev/null +++ b/llvm/test/tools/llvm-cov/Inputs/yaml.makefile @@ -0,0 +1,16 @@ +# This is for developers' convenience and not expected to be in build steps. +# +# Usage: +# cd /path/to/llvm-project/llvm/test/tools/llvm-cov/Inputs +# PATH=/path/to/build/bin:$PATH make *.yaml + +%.covmap.o: %.o + llvm-objcopy \ + --only-section=__llvm_covfun \ + --only-section=__llvm_covmap \ + --only-section=__llvm_prf_names \ + --strip-unneeded \ + $< $@ + +%.yaml: %.covmap.o + obj2yaml $< > $@ diff --git a/llvm/test/tools/llvm-cov/branch-c-general.test b/llvm/test/tools/llvm-cov/branch-c-general.test index 2fa99dfe61532..93aac3e6ba468 100644 --- a/llvm/test/tools/llvm-cov/branch-c-general.test +++ b/llvm/test/tools/llvm-cov/branch-c-general.test @@ -1,8 +1,9 @@ // Test visualization of general branch constructs in C. +// RUN: yaml2obj %S/Inputs/branch-c-general.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/branch-c-general.proftext -o %t.profdata -// RUN: llvm-cov show --show-branches=count %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -// RUN: llvm-cov report --show-branch-summary %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov show --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s +// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT // CHECK: simple_loops() // CHECK: Branch (9:15): [True: 100, False: 1] @@ -133,15 +134,15 @@ // Test file-level report. // RUN: llvm-profdata merge %S/Inputs/branch-c-general.proftext -o %t.profdata -// RUN: llvm-cov report %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=FILEREPORT +// RUN: llvm-cov report %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=FILEREPORT // FILEREPORT: TOTAL{{.*}}172 36 79.07% // Test color True/False output. -// RUN: llvm-cov show --use-color --show-branches=count %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=USECOLOR +// RUN: llvm-cov show --use-color --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=USECOLOR // USECOLOR: Branch ({{[0-9]+}}:7): {{.*}}: 0, {{.*}}0] // Test html output. -// RUN: llvm-cov show --show-branch-summary --show-branches=count %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c -format html -o %t.html.dir +// RUN: llvm-cov show --show-branch-summary --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c -format html -o %t.html.dir // RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/tmp/branch-c-general.c.html %s // HTML-COUNT-89: Branch ( // HTML-NOT: Branch ( diff --git a/llvm/test/tools/llvm-cov/branch-export-json.test b/llvm/test/tools/llvm-cov/branch-export-json.test index 7cf4286087982..edeb23c9161d2 100644 --- a/llvm/test/tools/llvm-cov/branch-export-json.test +++ b/llvm/test/tools/llvm-cov/branch-export-json.test @@ -1,6 +1,7 @@ +// RUN: yaml2obj %S/Inputs/branch-showBranchPercentage.yaml -o %t-branch-showBranchPercentage.o // RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata -// RUN: llvm-cov export --format=text %S/Inputs/branch-showBranchPercentage.o32l -instr-profile %t.profdata | FileCheck %s +// RUN: llvm-cov export --format=text %t-branch-showBranchPercentage.o -instr-profile %t.profdata | FileCheck %s // CHECK: "branches": // CHECK: 14,7,14,15,1,5,0,0,4 @@ -21,8 +22,9 @@ // CHECK: {"count":30,"covered":26,"notcovered":4,"percent":86.666666666666671} // Check recursive macro-expansions. +// RUN: yaml2obj %S/Inputs/branch-macros.yaml -o %t-branch-macros.o // RUN: llvm-profdata merge %S/Inputs/branch-macros.proftext -o %t.profdata -// RUN: llvm-cov export --format=text %S/Inputs/branch-macros.o32l -instr-profile %t.profdata | FileCheck %s -check-prefix=MACROS +// RUN: llvm-cov export --format=text %t-branch-macros.o -instr-profile %t.profdata | FileCheck %s -check-prefix=MACROS // MACROS: "branches": // MACROS: 27,10,27,11,0,3,0,0,4 diff --git a/llvm/test/tools/llvm-cov/branch-export-lcov.test b/llvm/test/tools/llvm-cov/branch-export-lcov.test index fe43dd66de8d0..60b2fed2f3d2c 100644 --- a/llvm/test/tools/llvm-cov/branch-export-lcov.test +++ b/llvm/test/tools/llvm-cov/branch-export-lcov.test @@ -1,7 +1,8 @@ +// RUN: yaml2obj %S/Inputs/branch-showBranchPercentage.yaml -o %t-branch-showBranchPercentage.o // RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata -// RUN: llvm-cov export --format=lcov %S/Inputs/branch-showBranchPercentage.o32l -instr-profile %t.profdata | FileCheck %s -// RUN: llvm-cov export --format=lcov --skip-branches %S/Inputs/branch-showBranchPercentage.o32l -instr-profile %t.profdata | FileCheck %s --check-prefix=NOBRANCH +// RUN: llvm-cov export --format=lcov %t-branch-showBranchPercentage.o -instr-profile %t.profdata | FileCheck %s +// RUN: llvm-cov export --format=lcov --skip-branches %t-branch-showBranchPercentage.o -instr-profile %t.profdata | FileCheck %s --check-prefix=NOBRANCH // CHECK-DAG: BRDA:14,0,0,1 // CHECK-DAG: BRDA:14,0,1,5 @@ -38,9 +39,10 @@ // CHECK: BRH:26 // Check recursive macro-expansions. +// RUN: yaml2obj %S/Inputs/branch-macros.yaml -o %t-branch-macros.o // RUN: llvm-profdata merge %S/Inputs/branch-macros.proftext -o %t.profdata -// RUN: llvm-cov export --format=lcov %S/Inputs/branch-macros.o32l -instr-profile %t.profdata | FileCheck %s -check-prefix=MACROS -// RUN: llvm-cov export --format=lcov --skip-branches %S/Inputs/branch-macros.o32l -instr-profile %t.profdata | FileCheck %s -check-prefix=NOBRANCH +// RUN: llvm-cov export --format=lcov %t-branch-macros.o -instr-profile %t.profdata | FileCheck %s -check-prefix=MACROS +// RUN: llvm-cov export --format=lcov --skip-branches %t-branch-macros.o -instr-profile %t.profdata | FileCheck %s -check-prefix=NOBRANCH // MACROS-COUNT-4: BRDA:17 // MACROS-NOT: BRDA:17 diff --git a/llvm/test/tools/llvm-cov/branch-logical-mixed.test b/llvm/test/tools/llvm-cov/branch-logical-mixed.test new file mode 100644 index 0000000000000..f570aa999fa4a --- /dev/null +++ b/llvm/test/tools/llvm-cov/branch-logical-mixed.test @@ -0,0 +1,12 @@ +// RUN: yaml2obj %S/Inputs/branch-logical-mixed.yaml -o %t.o +// RUN: llvm-profdata merge %S/Inputs/branch-logical-mixed.proftext -o %t.profdata +// RUN: llvm-cov show --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %S/Inputs/branch-logical-mixed.cpp +// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-logical-mixed.cpp +| FileCheck %s -check-prefix=REPORT + +// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover +// REPORT-NEXT: --- +// REPORT-NEXT: _Z4funcii 77 15 80.52% 60 2 96.67% 80 30 62.50% +// REPORT-NEXT: main 1 0 100.00% 5 0 100.00% 0 0 0.00% +// REPORT-NEXT: --- +// REPORT-NEXT: TOTAL 78 15 80.77% 65 2 96.92% 80 30 62.50% diff --git a/llvm/test/tools/llvm-cov/branch-macros.test b/llvm/test/tools/llvm-cov/branch-macros.test new file mode 100644 index 0000000000000..5d012bb0ec039 --- /dev/null +++ b/llvm/test/tools/llvm-cov/branch-macros.test @@ -0,0 +1,12 @@ +// RUN: yaml2obj %S/Inputs/branch-macros.yaml -o %t.o +// RUN: llvm-profdata merge %S/Inputs/branch-macros.proftext -o %t.profdata +// RUN: llvm-cov show --show-expansions --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %S/Inputs/branch-macros.cpp +// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-macros.cpp | FileCheck %s -check-prefix=REPORT + +// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover +// REPORT-NEXT: --- +// REPORT-NEXT: _Z4funcii 28 4 85.71% 18 0 100.00% 30 14 53.33% +// REPORT-NEXT: _Z5func2ii 13 1 92.31% 8 0 100.00% 10 2 80.00% +// REPORT-NEXT: main 1 0 100.00% 6 0 100.00% 0 0 0.00% +// REPORT-NEXT: --- +// REPORT-NEXT: TOTAL 42 5 88.10% 32 0 100.00% 40 16 60.00% diff --git a/llvm/test/tools/llvm-cov/branch-noShowBranch.test b/llvm/test/tools/llvm-cov/branch-noShowBranch.test index 25a98d59481aa..42763d48e9b5d 100644 --- a/llvm/test/tools/llvm-cov/branch-noShowBranch.test +++ b/llvm/test/tools/llvm-cov/branch-noShowBranch.test @@ -1,7 +1,8 @@ +// RUN: yaml2obj %S/Inputs/branch-c-general.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/branch-c-general.proftext -o %t.profdata -// RUN: llvm-cov show %S/Inputs/branch-c-general.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %s -// RUN: llvm-cov report %S/Inputs/branch-c-general.o32l --show-branch-summary=false -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov show %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %s +// RUN: llvm-cov report %t.o --show-branch-summary=false -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-c-general.c | FileCheck %s -check-prefix=REPORT // CHECK-NOT: | Branch diff --git a/llvm/test/tools/llvm-cov/branch-showBranchPercentage.c b/llvm/test/tools/llvm-cov/branch-showBranchPercentage.c deleted file mode 100644 index a649462116a08..0000000000000 --- a/llvm/test/tools/llvm-cov/branch-showBranchPercentage.c +++ /dev/null @@ -1,77 +0,0 @@ -// Test visualization of branch taken percentages - -// RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata -// RUN: llvm-cov show --show-branches=percent %S/Inputs/branch-showBranchPercentage.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck %s - -#include -#include - -extern void __llvm_profile_write_file(void); - -int main(int argc, char *argv[]) -{ - int i = 0; - if (argc < 3) // CHECK: Branch ([[@LINE]]:7): [True: 16.67%, False: 83.33%] - { - __llvm_profile_write_file(); - return 0; - } - - int a = atoi(argv[1]); - int b = atoi(argv[2]); - - // CHECK: Branch ([[@LINE+4]]:8): [True: 20.00%, False: 80.00%] - // CHECK: Branch ([[@LINE+3]]:18): [True: 0.00%, False: 100.00%] - // CHECK: Branch ([[@LINE+2]]:29): [True: 0.00%, False: 100.00%] - // CHECK: Branch ([[@LINE+1]]:40): [True: 40.00%, False: 60.00%] - if ((a == 0 && b == 2) || b == 34 || a == b) - printf("case1\n"); - - b = (a != 0 || a == 2) ? b : b+2; // CHECK: Branch ([[@LINE]]:8): [True: 80.00%, False: 20.00%] - // CHECK: Branch ([[@LINE-1]]:18): [True: 0.00%, False: 100.00%] - b = (a != 0 && a == 1); // CHECK: Branch ([[@LINE]]:8): [True: 80.00%, False: 20.00%] - // CHECK: Branch ([[@LINE-1]]:18): [True: 25.00%, False: 75.00%] - for (i = 0; i < b; i++) { a = 2 + b + b; } - // CHECK: Branch ([[@LINE-1]]:15): [True: 16.67%, False: 83.33%] - - b = a; - - switch (a) - { - case 0: // CHECK: Branch ([[@LINE]]:5): [True: 20.00%, False: 80.00%] - printf("case0\n"); - case 2: // CHECK: Branch ([[@LINE]]:5): [True: 20.00%, False: 80.00%] - printf("case2\n"); - case 3: // CHECK: Branch ([[@LINE]]:5): [True: 0.00%, False: 100.00%] - printf("case3\n"); - default: break; // CHECK: Branch ([[@LINE]]:5): [True: 60.00%, False: 40.00%] - } - - i = 0; - do { - printf("loop\n"); - } while (i++ < 10); // CHECK: Branch ([[@LINE]]:12): [True: 90.91%, False: 9.09%] - - __llvm_profile_write_file(); - - return b; -} -// RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata -// RUN: llvm-cov show --show-branches=percent %S/Inputs/branch-showBranchPercentage.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S %s -format html -o %t.html.dir - -// Test html output. -// RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/tmp/branch-showBranchPercentage.c.html %s -// HTML: Branch ({{.*}}16.67%,{{.*}}83.33%] -// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] -// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] -// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] -// HTML: Branch ({{.*}}40.00%,{{.*}}60.00%] -// HTML: Branch ({{.*}}80.00%,{{.*}}20.00%] -// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] -// HTML: Branch ({{.*}}80.00%,{{.*}}20.00%] -// HTML: Branch ({{.*}}25.00%,{{.*}}75.00%] -// HTML: Branch ({{.*}}16.67%,{{.*}}83.33%] -// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] -// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] -// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] -// HTML: Branch ({{.*}}60.00%,{{.*}}40.00%] diff --git a/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test b/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test new file mode 100644 index 0000000000000..fe0bc2c7eec37 --- /dev/null +++ b/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test @@ -0,0 +1,25 @@ +// Test visualization of branch taken percentages + +// RUN: yaml2obj %S/Inputs/branch-showBranchPercentage.yaml -o %t.o +// RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata +// RUN: llvm-cov show --show-branches=percent %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %S/Inputs/branch-showBranchPercentage.c + +// RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata +// RUN: llvm-cov show --show-branches=percent %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs -format html -o %t.html.dir + +// Test html output. +// RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/tmp/branch-showBranchPercentage.c.html %s +// HTML: Branch ({{.*}}16.67%,{{.*}}83.33%] +// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] +// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] +// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] +// HTML: Branch ({{.*}}40.00%,{{.*}}60.00%] +// HTML: Branch ({{.*}}80.00%,{{.*}}20.00%] +// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] +// HTML: Branch ({{.*}}80.00%,{{.*}}20.00%] +// HTML: Branch ({{.*}}25.00%,{{.*}}75.00%] +// HTML: Branch ({{.*}}16.67%,{{.*}}83.33%] +// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] +// HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] +// HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] +// HTML: Branch ({{.*}}60.00%,{{.*}}40.00%] diff --git a/llvm/test/tools/llvm-cov/branch-templates.cpp b/llvm/test/tools/llvm-cov/branch-templates.test similarity index 54% rename from llvm/test/tools/llvm-cov/branch-templates.cpp rename to llvm/test/tools/llvm-cov/branch-templates.test index 4797428f8835a..1c18356043f66 100644 --- a/llvm/test/tools/llvm-cov/branch-templates.cpp +++ b/llvm/test/tools/llvm-cov/branch-templates.test @@ -1,41 +1,8 @@ +// RUN: yaml2obj %S/Inputs/branch-templates.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/branch-templates.proftext -o %t.profdata -// RUN: llvm-cov show --show-expansions --show-branches=count %S/Inputs/branch-templates.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck %s -// RUN: llvm-cov report --show-branch-summary %S/Inputs/branch-templates.o32l -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S %s | FileCheck %s -check-prefix=REPORT -// RUN: llvm-cov report --show-branch-summary %S/Inputs/branch-templates.o32l -instr-profile %t.profdata -path-equivalence=/tmp,%S %s | FileCheck %s -check-prefix=REPORTFILE - -#include -template -void unused(T x) { - return; -} - -template -int func(T x) { - if(x) // CHECK: | Branch ([[@LINE]]:6): [True: 0, False: 1] - return 0; // CHECK: | Branch ([[@LINE-1]]:6): [True: 1, False: 0] - else // CHECK: | Branch ([[@LINE-2]]:6): [True: 0, False: 1] - return 1; - int j = 1; -} - - // CHECK-LABEL: _Z4funcIiEiT_: - // CHECK: | | Branch ([[@LINE-8]]:6): [True: 0, False: 1] - // CHECK-LABEL: _Z4funcIbEiT_: - // CHECK: | | Branch ([[@LINE-10]]:6): [True: 1, False: 0] - // CHECK-LABEL: _Z4funcIfEiT_: - // CHECK: | | Branch ([[@LINE-12]]:6): [True: 0, False: 1] - -extern "C" { extern void __llvm_profile_write_file(void); } -int main() { - if (func(0)) // CHECK: | Branch ([[@LINE]]:7): [True: 1, False: 0] - printf("case1\n"); - if (func(true)) // CHECK: | Branch ([[@LINE]]:7): [True: 0, False: 1] - printf("case2\n"); - if (func(0.0)) // CHECK: | Branch ([[@LINE]]:7): [True: 1, False: 0] - printf("case3\n"); - __llvm_profile_write_file(); - return 0; -} +// RUN: llvm-cov show --show-expansions --show-branches=count %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %S/Inputs/branch-templates.cpp +// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-templates.cpp | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %s -check-prefix=REPORTFILE // REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover // REPORT-NEXT: --- diff --git a/llvm/test/tools/llvm-cov/mcdc-const.test b/llvm/test/tools/llvm-cov/mcdc-const.test index 5424625cf6a6b..e6abaa1fa6da8 100644 --- a/llvm/test/tools/llvm-cov/mcdc-const.test +++ b/llvm/test/tools/llvm-cov/mcdc-const.test @@ -1,7 +1,8 @@ // Test visualization of MC/DC constructs for constant-folded condition masking. +// RUN: yaml2obj %S/Inputs/mcdc-const.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/mcdc-const.proftext -o %t.profdata -// RUN: llvm-cov show --show-branches=count --show-mcdc %S/Inputs/mcdc-const.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=CHECKGENERALCASE +// RUN: llvm-cov show --show-branches=count --show-mcdc %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=CHECKGENERALCASE // CHECKGENERALCASE: ------------------ // CHECKGENERALCASE-NEXT: | Branch (12:8): [True: 4, False: 1] @@ -34,9 +35,10 @@ // CHECKGENERALCASE-NEXT: | // CHECKGENERALCASE-NEXT: ------------------ +// RUN: yaml2obj %S/Inputs/mcdc-const-folding.yaml -o %t-folding.o // RUN: llvm-profdata merge %S/Inputs/mcdc-const-folding.proftext -o %t.profdata -// RUN: llvm-cov show --show-mcdc %S/Inputs/mcdc-const-folding.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=CHECKFULLCASE -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-const-folding.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-const-folding.cpp | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov show --show-mcdc %t-folding.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=CHECKFULLCASE +// RUN: llvm-cov report --show-mcdc-summary %t-folding.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-const-folding.cpp | FileCheck %s -check-prefix=REPORT // CHECKFULLCASE: | 1 { C, - = F } // CHECKFULLCASE: | C1-Pair: constant folded diff --git a/llvm/test/tools/llvm-cov/mcdc-export-json.test b/llvm/test/tools/llvm-cov/mcdc-export-json.test index c2cebf52db8cc..e4e349a0fe900 100644 --- a/llvm/test/tools/llvm-cov/mcdc-export-json.test +++ b/llvm/test/tools/llvm-cov/mcdc-export-json.test @@ -1,5 +1,6 @@ +// RUN: yaml2obj %S/Inputs/mcdc-general.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/mcdc-general.proftext -o %t.profdata -// RUN: llvm-cov export --format=text %S/Inputs/mcdc-general.o -instr-profile %t.profdata | FileCheck %s +// RUN: llvm-cov export --format=text %t.o -instr-profile %t.profdata | FileCheck %s // CHECK: 12,7,12,27,0,5,[true,true,true,true] // CHECK: 15,7,15,13,0,5,[true,true] diff --git a/llvm/test/tools/llvm-cov/mcdc-general-18.test b/llvm/test/tools/llvm-cov/mcdc-general-18.test index 8707238c4cdcb..1adeae4cc6fd6 100644 --- a/llvm/test/tools/llvm-cov/mcdc-general-18.test +++ b/llvm/test/tools/llvm-cov/mcdc-general-18.test @@ -1,20 +1,21 @@ // Test Version11 (clang-18) files. // mcdc-general.test is used as test patterns. -// RUN: llvm-cov show --show-mcdc %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs | FileCheck %S/mcdc-general.test -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=REPORT +// RUN: yaml2obj %S/Inputs/mcdc-general-18.yaml -o %t.o +// RUN: llvm-cov show --show-mcdc %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs | FileCheck %S/mcdc-general.test +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=REPORT // Turn off MC/DC visualization. -// RUN: llvm-cov show %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs | FileCheck %S/mcdc-general.test -check-prefix=NOMCDC +// RUN: llvm-cov show %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs | FileCheck %S/mcdc-general.test -check-prefix=NOMCDC // Turn off MC/DC summary. -// RUN: llvm-cov report %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=REPORT_NOMCDC +// RUN: llvm-cov report %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=REPORT_NOMCDC // Test file-level report. -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=FILEREPORT +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %S/mcdc-general.test -check-prefix=FILEREPORT // Test html output. // RUN: rm -rf %t.html.dir -// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %S/Inputs/mcdc-general-18.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir +// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %t.o -instr-profile %S/Inputs/mcdc-general-18.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir // RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/mcdc-general.cpp.html %S/mcdc-general.test // RUN: FileCheck -check-prefix HTML-INDEX -input-file %t.html.dir/index.html %S/mcdc-general.test diff --git a/llvm/test/tools/llvm-cov/mcdc-general-none.test b/llvm/test/tools/llvm-cov/mcdc-general-none.test index b57b35d49c8c1..a30ebf4b83b3b 100644 --- a/llvm/test/tools/llvm-cov/mcdc-general-none.test +++ b/llvm/test/tools/llvm-cov/mcdc-general-none.test @@ -1,8 +1,9 @@ // Test visualization of general MC/DC constructs with 0 executed test vectors. +// RUN: yaml2obj %S/Inputs/mcdc-general.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/mcdc-general-none.proftext -o %t.profdata -// RUN: llvm-cov show --show-mcdc %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov show --show-mcdc %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT // CHECK: test(bool @@ -29,7 +30,7 @@ // Turn off MC/DC visualization. -// RUN: llvm-cov show %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=NOMCDC +// RUN: llvm-cov show %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=NOMCDC // NOMCDC-NOT: MC/DC Decision Region // REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover MC/DC Conditions Miss Cover @@ -40,18 +41,18 @@ // REPORT-NEXT: TOTAL 26 0 100.00% 20 0 100.00% 24 2 91.67% 12 12 0.00% // Turn off MC/DC summary. -// RUN: llvm-cov report %S/Inputs/mcdc-general.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT_NOMCDC +// RUN: llvm-cov report %t.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT_NOMCDC // REPORT_NOMCDC-NOT: TOTAL{{.*}}12 12 0.00% // Test file-level report. -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=FILEREPORT +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=FILEREPORT // FILEREPORT: TOTAL{{.*}}12 12 0.00% // Test html output. // RUN: rm -rf %t.html.dir -// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir +// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir // RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/mcdc-general.cpp.html %s // HTML-COUNT-4: MC/DC Decision Region ( diff --git a/llvm/test/tools/llvm-cov/mcdc-general.test b/llvm/test/tools/llvm-cov/mcdc-general.test index c1e95cb2bd92a..7cbd2838eddab 100644 --- a/llvm/test/tools/llvm-cov/mcdc-general.test +++ b/llvm/test/tools/llvm-cov/mcdc-general.test @@ -1,8 +1,9 @@ // Test visualization of general MC/DC constructs. +// RUN: yaml2obj %S/Inputs/mcdc-general.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/mcdc-general.proftext -o %t.profdata -// RUN: llvm-cov show --show-mcdc %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT +// RUN: llvm-cov show --show-mcdc %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT // CHECK: test(bool @@ -95,7 +96,7 @@ // CHECK-NEXT: ------------------ // Turn off MC/DC visualization. -// RUN: llvm-cov show %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=NOMCDC +// RUN: llvm-cov show %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs | FileCheck %s -check-prefix=NOMCDC // NOMCDC-NOT: MC/DC Decision Region // REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover MC/DC Conditions Miss Cover @@ -106,18 +107,18 @@ // REPORT-NEXT: TOTAL 26 0 100.00% 20 0 100.00% 24 2 91.67% 12 2 83.33% // Turn off MC/DC summary. -// RUN: llvm-cov report %S/Inputs/mcdc-general.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT_NOMCDC +// RUN: llvm-cov report %t.o -instr-profile %t.profdata -show-functions -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=REPORT_NOMCDC // REPORT_NOMCDC-NOT: TOTAL{{.*}}12 2 83.33% // Test file-level report. -// RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=FILEREPORT +// RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs %S/Inputs/mcdc-general.cpp | FileCheck %s -check-prefix=FILEREPORT // FILEREPORT: TOTAL{{.*}}12 2 83.33% // Test html output. // RUN: rm -rf %t.html.dir -// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %S/Inputs/mcdc-general.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir +// RUN: llvm-cov show --show-mcdc-summary --show-mcdc %t.o -instr-profile %t.profdata -path-equivalence=.,%S/Inputs -format html -o %t.html.dir // RUN: FileCheck -check-prefix=HTML -input-file=%t.html.dir/coverage/mcdc-general.cpp.html %s // HTML-COUNT-4: MC/DC Decision Region ( diff --git a/llvm/test/tools/llvm-cov/mcdc-macro.test b/llvm/test/tools/llvm-cov/mcdc-macro.test index 14dd5ebd68eb1..989c7d2fe3039 100644 --- a/llvm/test/tools/llvm-cov/mcdc-macro.test +++ b/llvm/test/tools/llvm-cov/mcdc-macro.test @@ -1,7 +1,8 @@ // Test visualization of MC/DC constructs for branches in macro expansions. +// RUN: yaml2obj %S/Inputs/mcdc-macro.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/mcdc-macro.proftext -o %t.profdata -// RUN: llvm-cov show --show-expansions --show-branches=count --show-mcdc %S/Inputs/mcdc-macro.o -instr-profile %t.profdata --compilation-dir=%S/Inputs | FileCheck %s +// RUN: llvm-cov show --show-expansions --show-branches=count --show-mcdc %t.o -instr-profile %t.profdata --compilation-dir=%S/Inputs | FileCheck %s // CHECK: | | | Branch (2:11): [Folded - Ignored] // CHECK: | | | Branch (3:11): [True: 1, False: 0] diff --git a/llvm/test/tools/llvm-cov/mcdc-maxbs.test b/llvm/test/tools/llvm-cov/mcdc-maxbs.test index c6bd18048fb95..78046b6493b39 100644 --- a/llvm/test/tools/llvm-cov/mcdc-maxbs.test +++ b/llvm/test/tools/llvm-cov/mcdc-maxbs.test @@ -1,6 +1,8 @@ # Test not to trigger the assertion failure in llvm-cov with empty bitmap. # REQUIRES: asserts +// RUN: yaml2obj %S/Inputs/mcdc-maxbs.yaml -o %t.o + # mcdc-maxbs.o contains the record: # # sub: @@ -26,7 +28,7 @@ # by trailing uninitialized garbage. # RUN: llvm-profdata merge %S/Inputs/mcdc-maxbs.proftext -o %t.profdata -# RUN: llvm-cov report --show-mcdc-summary %S/Inputs/mcdc-maxbs.o -instr-profile %t.profdata +# RUN: llvm-cov report --show-mcdc-summary %t.o -instr-profile %t.profdata # Instructions for regenerating the test object: From 9f83734c570e554af44293cf517a86265c0ec191 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 13 Nov 2024 01:13:26 +0900 Subject: [PATCH 2/4] Update usage comment in yaml.makefile I was using `GNUmakefile` just before creating this request. --- llvm/test/tools/llvm-cov/Inputs/yaml.makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/test/tools/llvm-cov/Inputs/yaml.makefile b/llvm/test/tools/llvm-cov/Inputs/yaml.makefile index c5b55d28eb3b5..fd29aa26baed1 100644 --- a/llvm/test/tools/llvm-cov/Inputs/yaml.makefile +++ b/llvm/test/tools/llvm-cov/Inputs/yaml.makefile @@ -2,7 +2,7 @@ # # Usage: # cd /path/to/llvm-project/llvm/test/tools/llvm-cov/Inputs -# PATH=/path/to/build/bin:$PATH make *.yaml +# PATH=/path/to/build/bin:$PATH make -f yaml.makefile *.yaml %.covmap.o: %.o llvm-objcopy \ From 7d62e4d970cbfde0de0eb3cf906cd2504de5a012 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 13 Nov 2024 23:13:44 +0900 Subject: [PATCH 3/4] Reformat tests --- llvm/test/tools/llvm-cov/branch-c-general.test | 2 +- llvm/test/tools/llvm-cov/branch-noShowBranch.test | 8 ++++---- llvm/test/tools/llvm-cov/branch-showBranchPercentage.test | 2 ++ llvm/test/tools/llvm-cov/branch-templates.test | 6 +++--- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/llvm/test/tools/llvm-cov/branch-c-general.test b/llvm/test/tools/llvm-cov/branch-c-general.test index 93aac3e6ba468..8c58c1536f158 100644 --- a/llvm/test/tools/llvm-cov/branch-c-general.test +++ b/llvm/test/tools/llvm-cov/branch-c-general.test @@ -115,7 +115,7 @@ -// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover +// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover // REPORT-NEXT: --- // REPORT-NEXT: simple_loops 8 0 100.00% 9 0 100.00% 6 0 100.00% // REPORT-NEXT: conditionals 24 0 100.00% 15 0 100.00% 16 2 87.50% diff --git a/llvm/test/tools/llvm-cov/branch-noShowBranch.test b/llvm/test/tools/llvm-cov/branch-noShowBranch.test index 42763d48e9b5d..4f16d6629bf12 100644 --- a/llvm/test/tools/llvm-cov/branch-noShowBranch.test +++ b/llvm/test/tools/llvm-cov/branch-noShowBranch.test @@ -6,9 +6,9 @@ // CHECK-NOT: | Branch -// REPORT: Name Regions Miss Cover Lines Miss Cover +// REPORT: Name Regions Miss Cover Lines Miss Cover // REPORT-NOT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover -// REPORT: --- +// REPORT: --- // REPORT-NOT: simple_loops 8 0 100.00% 9 0 100.00% 6 0 100.00% // REPORT-NOT: conditionals 24 0 100.00% 15 0 100.00% 16 2 87.50% // REPORT-NOT: early_exits 20 4 80.00% 25 2 92.00% 16 6 62.50% @@ -21,6 +21,6 @@ // REPORT-NOT: do_fallthrough 9 0 100.00% 12 0 100.00% 6 0 100.00% // REPORT-NOT: main 1 0 100.00% 16 0 100.00% 0 0 0.00% // REPORT-NOT: c-general.c:static_func 4 0 100.00% 4 0 100.00% 2 0 100.00% -// REPORT: TOTAL 197 24 87.82% 234 8 96.58% -// REPORT-NOT: TOTAL 197 24 87.82% 234 13 94.44% 174 38 78.16% +// REPORT: TOTAL 197 24 87.82% 234 8 96.58% +// REPORT-NOT: TOTAL 197 24 87.82% 234 13 94.44% 174 38 78.16% diff --git a/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test b/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test index fe0bc2c7eec37..5365d4419c2e9 100644 --- a/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test +++ b/llvm/test/tools/llvm-cov/branch-showBranchPercentage.test @@ -1,5 +1,6 @@ // Test visualization of branch taken percentages +// RUN: rm -rf %t.html.dir // RUN: yaml2obj %S/Inputs/branch-showBranchPercentage.yaml -o %t.o // RUN: llvm-profdata merge %S/Inputs/branch-showBranchPercentage.proftext -o %t.profdata // RUN: llvm-cov show --show-branches=percent %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %S/Inputs/branch-showBranchPercentage.c @@ -23,3 +24,4 @@ // HTML: Branch ({{.*}}20.00%,{{.*}}80.00%] // HTML: Branch ({{.*}}0.00%,{{.*}}100.00%] // HTML: Branch ({{.*}}60.00%,{{.*}}40.00%] +// HTML: Branch ({{.*}}90.91%,{{.*}}9.09%] diff --git a/llvm/test/tools/llvm-cov/branch-templates.test b/llvm/test/tools/llvm-cov/branch-templates.test index 1c18356043f66..b29e2a9d033c2 100644 --- a/llvm/test/tools/llvm-cov/branch-templates.test +++ b/llvm/test/tools/llvm-cov/branch-templates.test @@ -4,7 +4,7 @@ // RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -show-functions -path-equivalence=/tmp,%S/Inputs %S/Inputs/branch-templates.cpp | FileCheck %s -check-prefix=REPORT // RUN: llvm-cov report --show-branch-summary %t.o -instr-profile %t.profdata -path-equivalence=/tmp,%S/Inputs | FileCheck %s -check-prefix=REPORTFILE -// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover +// REPORT: Name Regions Miss Cover Lines Miss Cover Branches Miss Cover // REPORT-NEXT: --- // REPORT-NEXT: main 7 1 85.71% 10 1 90.00% 6 3 50.00% // REPORT-NEXT: _Z4funcIiEiT_ 5 2 60.00% 7 3 57.14% 2 1 50.00% @@ -21,8 +21,8 @@ // respectively). This is returned by: FunctionCoverageSummary::get(const // InstantiationGroup &Group, ...) -// REPORTFILE: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover +// REPORTFILE: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover Branches Missed Branches Cover // REPORTFILE-NEXT: --- // REPORTFILE-NEXT: branch-templates.cpp 12 3 75.00% 2 0 100.00% 17 4 76.47% 8 4 50.00% // REPORTFILE-NEXT: --- -// REPORTFILE-NEXT: TOTAL 12 3 75.00% 2 0 100.00% 17 4 76.47% 8 4 50.00% +// REPORTFILE-NEXT: TOTAL 12 3 75.00% 2 0 100.00% 17 4 76.47% 8 4 50.00% From 1f4078ae2174a9772eda961015548685fc2d9acd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 13 Nov 2024 23:17:53 +0900 Subject: [PATCH 4/4] llvm/test/tools/llvm-cov yaml --- .../llvm-cov/Inputs/branch-c-general.yaml | 693 +++++++++++++++++- .../llvm-cov/Inputs/branch-logical-mixed.yaml | 203 ++++- .../tools/llvm-cov/Inputs/branch-macros.yaml | 186 ++++- .../Inputs/branch-showBranchPercentage.yaml | 97 ++- .../llvm-cov/Inputs/branch-templates.yaml | 98 ++- .../llvm-cov/Inputs/mcdc-const-folding.yaml | 496 ++++++++++++- .../tools/llvm-cov/Inputs/mcdc-const.yaml | 53 +- .../llvm-cov/Inputs/mcdc-general-18.yaml | 92 ++- .../tools/llvm-cov/Inputs/mcdc-general.yaml | 92 ++- .../tools/llvm-cov/Inputs/mcdc-macro.yaml | 128 +++- .../tools/llvm-cov/Inputs/mcdc-maxbs.yaml | 67 +- 11 files changed, 2125 insertions(+), 80 deletions(-) diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-c-general.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-c-general.yaml index c601280912f05..dbb9b5822a442 100644 --- a/llvm/test/tools/llvm-cov/Inputs/branch-c-general.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/branch-c-general.yaml @@ -10,59 +10,724 @@ Sections: - Name: '__llvm_covfun (7)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: D7878914FBE99B075B000000D136449C106D04009FD374D96F4D6D1A01000401050109010D010D0D010715080203020F0016200501000F0016050018001B05001C009D8080800805001D010407020A000F200901000A000F09001001858080800809010500080F010600080F00100018200D0100100018 + CovFun: + - FuncName: simple_loops + Signature: 0x46D109C4436D1 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + Records: + - { File: 0, dLoc: [ 7, 21, 8, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 2, 15, 0, 22 ], Add: 0 } + - { File: 0, dLoc: [ 0, 15, 0, 22 ], Branch: { True: { Ref: 1 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 24, 0, 27 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 28, 0, 29 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 29, 1, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 2, 10, 0, 15 ], Add: 1 } + - { File: 0, dLoc: [ 0, 10, 0, 15 ], Branch: { True: { Ref: 2 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 16, 1, 5 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 1, 5, 0, 8 ], Ref: 2 } + - { File: 0, dLoc: [ 1, 6, 0, 8 ], Add: 3 } + - { File: 0, dLoc: [ 0, 16, 0, 24 ], Add: 3 } + - { File: 0, dLoc: [ 0, 16, 0, 24 ], Branch: { True: { Ref: 3 }, False: { Ref: 0 } } } - Name: '__llvm_covfun (4)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 83AD05A5F1438E684401000052D33558163C11449FD374D96F4D6D1A01001401050509090D05090509050946110509111546110509461105094611050942194611050921252D312C0111150E02030113001A2005010013001A05001C001F05002000A1808080080500210B04050109000E2009460009000E09000F009080808008090010020609010B000C200D0A000B000C0D000D008E808080080D000E0010460106008C8080800846000C0406460010001520114200100015110016009780808008110017020611010B000C201522000B000C15000D008E8080800815000E0010420106008C8080800842000C020642010B000C20193E000B000C19000D008E8080800819000E0010050309000A050009000F2000000009000A21000E000F20254A000E000F1D00100091808080081D00110013050109000A050009000F2000000009000A2D000E000F204E31000E000F2900100091808080082900110013 + CovFun: + - FuncName: conditionals + Signature: 0x44113C165835D352 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Sub: 17 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 4 }, { Ref: 5 } ] + - [ { Sub: 17 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Sub: 17 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Sub: 17 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Sub: 16 }, { Ref: 6 } ] + - [ { Sub: 17 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 8 }, { Ref: 9 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + Records: + - { File: 0, dLoc: [ 17, 21, 14, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 19, 0, 26 ], Add: 0 } + - { File: 0, dLoc: [ 0, 19, 0, 26 ], Branch: { True: { Ref: 1 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 28, 0, 31 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 32, 0, 33 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 33, 11, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 9, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Ref: 2 }, False: { Sub: 17 } } } + - { File: 0, dLoc: [ 0, 15, 0, 16 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 0, 16, 2, 6 ], Ref: 2 } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 3 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 3 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 3 } + - { File: 0, dLoc: [ 1, 6, 0, 12 ], isGap: true, Sub: 17 } + - { File: 0, dLoc: [ 0, 12, 4, 6 ], Sub: 17 } + - { File: 0, dLoc: [ 0, 16, 0, 21 ], Sub: 17 } + - { File: 0, dLoc: [ 0, 16, 0, 21 ], Branch: { True: { Ref: 4 }, False: { Sub: 16 } } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], isGap: true, Ref: 4 } + - { File: 0, dLoc: [ 0, 23, 2, 6 ], Ref: 4 } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 5 }, False: { Sub: 8 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 5 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 5 } + - { File: 0, dLoc: [ 1, 6, 0, 12 ], isGap: true, Sub: 16 } + - { File: 0, dLoc: [ 0, 12, 2, 6 ], Sub: 16 } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Sub: 16 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 6 }, False: { Sub: 15 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 6 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 6 } + - { File: 0, dLoc: [ 3, 9, 0, 10 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 15 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Zero: { } }, False: { Zero: { } } } } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], Ref: 8 } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], Branch: { True: { Ref: 9 }, False: { Sub: 18 } } } + - { File: 0, dLoc: [ 0, 16, 0, 17 ], isGap: true, Ref: 7 } + - { File: 0, dLoc: [ 0, 17, 0, 19 ], Ref: 7 } + - { File: 0, dLoc: [ 1, 9, 0, 10 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 15 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Zero: { } }, False: { Zero: { } } } } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], Branch: { True: { Sub: 19 }, False: { Ref: 12 } } } + - { File: 0, dLoc: [ 0, 16, 0, 17 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 0, 17, 0, 19 ], Ref: 10 } - Name: '__llvm_covfun (5)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 0449C70428C57369320100003D5C2D0E4B13F9279FD374D96F4D6D1A01001C01050B0D0109010D090D090D090D090D2611090D0115011901195B1D01195B1D01195B1D01195B1D01195B1D0119011D011D011D6E21011D260121141802010307000820050200070008050009008A8080800805000A000C06020A001120090E000A00110900120093808080080900130604090209000F200D260009000F0D00100187808080080D0107000C26000C0185808080082601050204260009000E2011220009000E11000F018780808008110107000F010307000820152A00070008150009008A8080800815000A000C5B020605045B0109000F201D560009000F1D00100187808080081D0107000D56000D008E8080800856000E028780808008560207000A56010C001320196E000C00136E020302026E0007000820216A00070008210009008A8080800821000A000C + CovFun: + - FuncName: early_exits + Signature: 0x27F9134B0E2D5C3D + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Add: 2 }, { Ref: 3 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Sub: 9 }, { Ref: 4 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 0 }, { Ref: 5 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Add: 22 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Add: 22 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Add: 22 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Add: 22 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Add: 22 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Sub: 27 }, { Ref: 8 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + Records: + - { File: 0, dLoc: [ 33, 20, 24, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 3, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 10, 0, 12 ], Ref: 1 } + - { File: 0, dLoc: [ 2, 10, 0, 17 ], Sub: 1 } + - { File: 0, dLoc: [ 0, 10, 0, 17 ], Branch: { True: { Ref: 2 }, False: { Sub: 3 } } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 0, 19, 6, 4 ], Ref: 2 } + - { File: 0, dLoc: [ 2, 9, 0, 15 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 9, 0, 15 ], Branch: { True: { Ref: 3 }, False: { Sub: 9 } } } + - { File: 0, dLoc: [ 0, 16, 1, 7 ], isGap: true, Ref: 3 } + - { File: 0, dLoc: [ 1, 7, 0, 12 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 12, 1, 5 ], isGap: true, Sub: 9 } + - { File: 0, dLoc: [ 1, 5, 2, 4 ], Sub: 9 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Sub: 9 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Ref: 4 }, False: { Sub: 8 } } } + - { File: 0, dLoc: [ 0, 15, 1, 7 ], isGap: true, Ref: 4 } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 4 } + - { File: 0, dLoc: [ 3, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 5 }, False: { Sub: 10 } } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], isGap: true, Ref: 5 } + - { File: 0, dLoc: [ 0, 10, 0, 12 ], Ref: 5 } + - { File: 0, dLoc: [ 2, 6, 5, 4 ], Add: 22 } + - { File: 0, dLoc: [ 1, 9, 0, 15 ], Add: 22 } + - { File: 0, dLoc: [ 0, 9, 0, 15 ], Branch: { True: { Ref: 7 }, False: { Sub: 21 } } } + - { File: 0, dLoc: [ 0, 16, 1, 7 ], isGap: true, Ref: 7 } + - { File: 0, dLoc: [ 1, 7, 0, 13 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Sub: 21 } + - { File: 0, dLoc: [ 0, 14, 2, 7 ], isGap: true, Sub: 21 } + - { File: 0, dLoc: [ 2, 7, 0, 10 ], Sub: 21 } + - { File: 0, dLoc: [ 1, 12, 0, 19 ], Sub: 21 } + - { File: 0, dLoc: [ 0, 12, 0, 19 ], Branch: { True: { Ref: 6 }, False: { Sub: 27 } } } + - { File: 0, dLoc: [ 2, 3, 2, 2 ], Sub: 27 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Sub: 27 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 8 }, False: { Sub: 26 } } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], isGap: true, Ref: 8 } + - { File: 0, dLoc: [ 0, 10, 0, 12 ], Ref: 8 } - Name: '__llvm_covfun (3)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 55947829059F255EDE0100001B9C495D3463E1D09FD374D96F4D6D1A01001F010500090D111915191D1915292D292D292D732D29394A31732D293941453D453D414A31732D29396A316F2D7351293966496A316F2D73512939004D515542013B0E2F0201030F0014200502000F0014000016001905001A009B8080800805001B04040003050104000009000A2009060009000A09000B008C8080800809000C000E0D0301030D0D0107000820110A00070008110009008A8080800811000A000C000403210219000A000B201516000A000B15000C008D8080800815000D03041901030204190109000A201D120009000A1D000B008C808080081D000C000E160303000D21000D0181808080082101011B022501011A022901011902290207000C202D220007000C2D000D0185808080082D0105000F22000F02838080800822020314024A000A000F203146000A000F3100100091808080083100110A0435010309040001100691808080083D01050111203D3B0005000B410205011220413F0005000B45020501112045430005000B460503080266000F0015204962000F0015510017001A49001B009C8080800849001C06045101140383808080080002050304000009000A204D760009000A4D000B008C808080084D000C000E5101030204510109000A20557A0009000A55000B008C8080800855000C000E + CovFun: + - FuncName: jumps + Signature: 0xD0E163345D499C1B + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Zero: { } }, { Ref: 2 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 6 }, { Ref: 5 } ] + - [ { Ref: 6 }, { Ref: 7 } ] + - [ { Ref: 6 }, { Ref: 5 } ] + - [ { Ref: 10 }, { Ref: 11 } ] + - [ { Ref: 10 }, { Ref: 11 } ] + - [ { Ref: 10 }, { Ref: 11 } ] + - [ { Add: 28 }, { Ref: 11 } ] + - [ { Ref: 10 }, { Ref: 14 } ] + - [ { Sub: 18 }, { Ref: 12 } ] + - [ { Add: 28 }, { Ref: 11 } ] + - [ { Ref: 10 }, { Ref: 14 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Ref: 15 }, { Ref: 17 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Sub: 18 }, { Ref: 12 } ] + - [ { Add: 28 }, { Ref: 11 } ] + - [ { Ref: 10 }, { Ref: 14 } ] + - [ { Sub: 26 }, { Ref: 12 } ] + - [ { Add: 27 }, { Ref: 11 } ] + - [ { Add: 28 }, { Ref: 20 } ] + - [ { Ref: 10 }, { Ref: 14 } ] + - [ { Sub: 25 }, { Ref: 18 } ] + - [ { Sub: 26 }, { Ref: 12 } ] + - [ { Add: 27 }, { Ref: 11 } ] + - [ { Add: 28 }, { Ref: 20 } ] + - [ { Ref: 10 }, { Ref: 14 } ] + - [ { Zero: { } }, { Ref: 19 } ] + - [ { Ref: 20 }, { Ref: 21 } ] + Records: + - { File: 0, dLoc: [ 59, 14, 47, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 3, 15, 0, 20 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 15, 0, 20 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 22, 0, 25 ], Zero: { } } + - { File: 0, dLoc: [ 0, 26, 0, 27 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 27, 4, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 3, 5, 1, 4 ], Zero: { } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Zero: { } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Ref: 2 } + - { File: 0, dLoc: [ 3, 1, 3, 13 ], Ref: 3 } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 4 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], isGap: true, Ref: 4 } + - { File: 0, dLoc: [ 0, 10, 0, 12 ], Ref: 4 } + - { File: 0, dLoc: [ 4, 3, 33, 2 ], Zero: { } } + - { File: 0, dLoc: [ 0, 10, 0, 11 ], Ref: 6 } + - { File: 0, dLoc: [ 0, 10, 0, 11 ], Branch: { True: { Ref: 5 }, False: { Sub: 5 } } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], isGap: true, Ref: 5 } + - { File: 0, dLoc: [ 0, 13, 3, 4 ], Ref: 5 } + - { File: 0, dLoc: [ 1, 3, 2, 4 ], Ref: 6 } + - { File: 0, dLoc: [ 1, 9, 0, 10 ], Ref: 6 } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Ref: 7 }, False: { Sub: 4 } } } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], isGap: true, Ref: 7 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Ref: 7 } + - { File: 0, dLoc: [ 3, 3, 0, 13 ], Sub: 5 } + - { File: 0, dLoc: [ 0, 13, 1, 1 ], isGap: true, Ref: 8 } + - { File: 0, dLoc: [ 1, 1, 27, 2 ], Ref: 8 } + - { File: 0, dLoc: [ 1, 1, 26, 2 ], Ref: 9 } + - { File: 0, dLoc: [ 1, 1, 25, 2 ], Ref: 10 } + - { File: 0, dLoc: [ 2, 7, 0, 12 ], Ref: 10 } + - { File: 0, dLoc: [ 0, 7, 0, 12 ], Branch: { True: { Ref: 11 }, False: { Sub: 8 } } } + - { File: 0, dLoc: [ 0, 13, 1, 5 ], isGap: true, Ref: 11 } + - { File: 0, dLoc: [ 1, 5, 0, 15 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 15, 2, 3 ], isGap: true, Sub: 8 } + - { File: 0, dLoc: [ 2, 3, 20, 2 ], Sub: 8 } + - { File: 0, dLoc: [ 0, 10, 0, 15 ], Sub: 18 } + - { File: 0, dLoc: [ 0, 10, 0, 15 ], Branch: { True: { Ref: 12 }, False: { Sub: 17 } } } + - { File: 0, dLoc: [ 0, 16, 0, 17 ], isGap: true, Ref: 12 } + - { File: 0, dLoc: [ 0, 17, 10, 4 ], Ref: 12 } + - { File: 0, dLoc: [ 1, 3, 9, 4 ], Ref: 13 } + - { File: 0, dLoc: [ 1, 16, 6, 17 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 5, 1, 17 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 15 }, False: { Add: 14 } } } + - { File: 0, dLoc: [ 2, 5, 1, 18 ], Ref: 16 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 16 }, False: { Add: 15 } } } + - { File: 0, dLoc: [ 2, 5, 1, 17 ], Ref: 17 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 17 }, False: { Add: 16 } } } + - { File: 0, dLoc: [ 5, 3, 8, 2 ], Sub: 17 } + - { File: 0, dLoc: [ 0, 15, 0, 21 ], Sub: 25 } + - { File: 0, dLoc: [ 0, 15, 0, 21 ], Branch: { True: { Ref: 18 }, False: { Sub: 24 } } } + - { File: 0, dLoc: [ 0, 23, 0, 26 ], Ref: 20 } + - { File: 0, dLoc: [ 0, 27, 0, 28 ], isGap: true, Ref: 18 } + - { File: 0, dLoc: [ 0, 28, 6, 4 ], Ref: 18 } + - { File: 0, dLoc: [ 1, 20, 3, 3 ], isGap: true, Ref: 20 } + - { File: 0, dLoc: [ 2, 5, 3, 4 ], Zero: { } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Zero: { } } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Ref: 19 }, False: { Sub: 29 } } } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], isGap: true, Ref: 19 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Ref: 19 } + - { File: 0, dLoc: [ 1, 3, 2, 4 ], Ref: 20 } + - { File: 0, dLoc: [ 1, 9, 0, 10 ], Ref: 20 } + - { File: 0, dLoc: [ 0, 9, 0, 10 ], Branch: { True: { Ref: 21 }, False: { Sub: 30 } } } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], isGap: true, Ref: 21 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Ref: 21 } - Name: '__llvm_covfun (9)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 7129CA3C268292BFC00100003E688383C9A099009FD374D96F4D6D1A01002507390B250511030D173911251F41232D1D251519151D3341372D1525151D7721151D4B41772D151D252973417725151D2D31393D3541732D7725151D35418301453541030D030D920149030D38016C112502000417028A80808008090103010A2009000003000A05010A0383808080080503031C0203003F0046200D9201003F0046130048004B0D004C00CD808080080D004D1704000119148F80808008150105130F20151B0005000B15010B000C201926000B000C19000D008E8080800819000E0010770205020C201D2F0005000B77010B000C20213E000B000C21000D008E8080800821000E0010250205020F2025470005000B25010B000C202952000B000C29000D008E8080800829000E00102D02050A0F202D570005000B2D010B000C203162000B000C31000D008E8080800831000E001000011203918080800839010702112039000007001339010D000E203D66000D000E3D000F0090808080083D0010001235011103858080800883010305020F350005020F20416F0005000C8301010B001720457E000B0017450018018980808008450109000F92010503020292010007001120498E01000700114900120093808080084900130015 + CovFun: + - FuncName: switches + Signature: 0x99A0C98383683E + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Add: 1 }, { Ref: 14 } ] + - [ { Add: 2 }, { Ref: 9 } ] + - [ { Ref: 1 }, { Ref: 4 } ] + - [ { Add: 0 }, { Ref: 3 } ] + - [ { Add: 5 }, { Ref: 14 } ] + - [ { Ref: 4 }, { Ref: 9 } ] + - [ { Add: 7 }, { Ref: 16 } ] + - [ { Add: 8 }, { Ref: 11 } ] + - [ { Ref: 7 }, { Ref: 9 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Add: 12 }, { Ref: 16 } ] + - [ { Add: 13 }, { Ref: 11 } ] + - [ { Ref: 5 }, { Ref: 9 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Add: 29 }, { Ref: 8 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Add: 18 }, { Ref: 16 } ] + - [ { Add: 29 }, { Ref: 11 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Ref: 9 }, { Ref: 10 } ] + - [ { Add: 28 }, { Ref: 16 } ] + - [ { Add: 29 }, { Ref: 9 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Ref: 14 }, { Ref: 15 } ] + - [ { Ref: 13 }, { Ref: 16 } ] + - [ { Add: 28 }, { Ref: 11 } ] + - [ { Add: 29 }, { Ref: 9 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Ref: 13 }, { Ref: 16 } ] + - [ { Add: 32 }, { Ref: 17 } ] + - [ { Ref: 13 }, { Ref: 16 } ] + - [ { Add: 0 }, { Ref: 3 } ] + - [ { Add: 0 }, { Ref: 3 } ] + - [ { Sub: 36 }, { Ref: 18 } ] + - [ { Add: 0 }, { Ref: 3 } ] + Records: + - { File: 0, dLoc: [ 108, 17, 37, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 4, 23, 2, 10 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 3, 1, 10 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 3, 0, 10 ], Branch: { True: { Ref: 2 }, False: { Zero: { } } } } + - { File: 0, dLoc: [ 1, 10, 3, 3 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 3, 3, 28, 2 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 63, 0, 70 ], Add: 0 } + - { File: 0, dLoc: [ 0, 63, 0, 70 ], Branch: { True: { Ref: 3 }, False: { Sub: 36 } } } + - { File: 0, dLoc: [ 0, 72, 0, 75 ], Add: 4 } + - { File: 0, dLoc: [ 0, 76, 0, 77 ], isGap: true, Ref: 3 } + - { File: 0, dLoc: [ 0, 77, 23, 4 ], Ref: 3 } + - { File: 0, dLoc: [ 1, 25, 20, 15 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 5, 19, 15 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 5 }, False: { Add: 6 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 6 }, False: { Sub: 9 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 6 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 6 } + - { File: 0, dLoc: [ 2, 5, 2, 12 ], Add: 29 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 7 }, False: { Add: 11 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Add: 29 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 8 }, False: { Sub: 15 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 8 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 8 } + - { File: 0, dLoc: [ 2, 5, 2, 15 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 9 }, False: { Add: 17 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 10 }, False: { Sub: 20 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 10 } + - { File: 0, dLoc: [ 2, 5, 10, 15 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 11 }, False: { Add: 21 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 12 }, False: { Sub: 24 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 12 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 12 } + - { File: 0, dLoc: [ 1, 18, 3, 17 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 7, 2, 17 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 7, 0, 19 ], Branch: { True: { Ref: 14 }, False: { Zero: { } } } } + - { File: 0, dLoc: [ 1, 13, 0, 14 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 15 }, False: { Sub: 25 } } } + - { File: 0, dLoc: [ 0, 15, 0, 16 ], isGap: true, Ref: 15 } + - { File: 0, dLoc: [ 0, 16, 0, 18 ], Ref: 15 } + - { File: 0, dLoc: [ 1, 17, 3, 5 ], isGap: true, Ref: 13 } + - { File: 0, dLoc: [ 3, 5, 2, 15 ], Add: 32 } + - { File: 0, dLoc: [ 0, 5, 2, 15 ], Ref: 13 } + - { File: 0, dLoc: [ 0, 5, 0, 12 ], Branch: { True: { Ref: 16 }, False: { Add: 27 } } } + - { File: 0, dLoc: [ 1, 11, 0, 23 ], Add: 32 } + - { File: 0, dLoc: [ 0, 11, 0, 23 ], Branch: { True: { Ref: 17 }, False: { Sub: 31 } } } + - { File: 0, dLoc: [ 0, 24, 1, 9 ], isGap: true, Ref: 17 } + - { File: 0, dLoc: [ 1, 9, 0, 15 ], Ref: 17 } + - { File: 0, dLoc: [ 5, 3, 2, 2 ], Sub: 36 } + - { File: 0, dLoc: [ 0, 7, 0, 17 ], Sub: 36 } + - { File: 0, dLoc: [ 0, 7, 0, 17 ], Branch: { True: { Ref: 18 }, False: { Sub: 35 } } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], isGap: true, Ref: 18 } + - { File: 0, dLoc: [ 0, 19, 0, 21 ], Ref: 18 } - Name: '__llvm_covfun (8)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 3F4D1C6E6087417BB0010000D6FF56B8865A69B69FD374D96F4D6D1A01002F010903050F3D1335172D1B25151D0D110D152B3D2F35332D37250D1D0D15B701190D154B3D4F35532DB701250D151D21633D6735B3012DB7011D0D1525297B3DAF0135B30125B7011D0D152D31AB013DAF012DB30125B7011D0D153539AB0135AF012DB30125B7011D0D153D4131019301131F0203011300192005060013001909001B001E05001F00A0808080080500201C04000115198C808080080D0105180C200D0B000500120D010B000C20111E000B000C11000D008E8080800811000E0010B7010205020C20152700050012B701010B000C20193E000B000C19000D008E8080800819000E00101D0205020C201D47000500201D010B000C20215A000B000C21000D008E8080800821000E0010250405020C20255F0005001325010B000C202972000B000C29000D008E8080800829000E00102D0205020C202D77000500212D010B000C20318A01000B000C31000D008E8080800831000E0010350405020C20358F010005002735010B000C2039A201000B000C39000D008E8080800839000E00103D0205020C203DA7010005000C3D010B000C2041BA01000B000C41000D008E8080800841000E0010 + CovFun: + - FuncName: big_switch + Signature: 0xB6695A86B856FFD6 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Add: 0 }, { Ref: 1 } ] + - [ { Add: 3 }, { Ref: 15 } ] + - [ { Add: 4 }, { Ref: 13 } ] + - [ { Add: 5 }, { Ref: 11 } ] + - [ { Add: 6 }, { Ref: 9 } ] + - [ { Ref: 5 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Add: 10 }, { Ref: 15 } ] + - [ { Add: 11 }, { Ref: 13 } ] + - [ { Add: 12 }, { Ref: 11 } ] + - [ { Add: 13 }, { Ref: 9 } ] + - [ { Ref: 3 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Add: 45 }, { Ref: 6 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Add: 18 }, { Ref: 15 } ] + - [ { Add: 19 }, { Ref: 13 } ] + - [ { Add: 20 }, { Ref: 11 } ] + - [ { Add: 45 }, { Ref: 9 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + - [ { Add: 24 }, { Ref: 15 } ] + - [ { Add: 25 }, { Ref: 13 } ] + - [ { Add: 44 }, { Ref: 11 } ] + - [ { Add: 45 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Ref: 9 }, { Ref: 10 } ] + - [ { Add: 30 }, { Ref: 15 } ] + - [ { Add: 43 }, { Ref: 13 } ] + - [ { Add: 44 }, { Ref: 9 } ] + - [ { Add: 45 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Add: 42 }, { Ref: 15 } ] + - [ { Add: 43 }, { Ref: 11 } ] + - [ { Add: 44 }, { Ref: 9 } ] + - [ { Add: 45 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Ref: 13 }, { Ref: 14 } ] + - [ { Add: 42 }, { Ref: 13 } ] + - [ { Add: 43 }, { Ref: 11 } ] + - [ { Add: 44 }, { Ref: 9 } ] + - [ { Add: 45 }, { Ref: 7 } ] + - [ { Ref: 3 }, { Ref: 5 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + Records: + - { File: 0, dLoc: [ 147, 19, 31, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 19, 0, 25 ], Add: 0 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Branch: { True: { Ref: 1 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 27, 0, 30 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 31, 0, 32 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 32, 28, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 21, 25, 12 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 5, 24, 12 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 5, 0, 18 ], Branch: { True: { Ref: 3 }, False: { Add: 2 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 4 }, False: { Sub: 7 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 4 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 4 } + - { File: 0, dLoc: [ 2, 5, 2, 12 ], Add: 45 } + - { File: 0, dLoc: [ 0, 5, 0, 18 ], Branch: { True: { Ref: 5 }, False: { Add: 9 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Add: 45 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 6 }, False: { Sub: 15 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 6 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 6 } + - { File: 0, dLoc: [ 2, 5, 2, 12 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 5, 0, 32 ], Branch: { True: { Ref: 7 }, False: { Add: 17 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 8 }, False: { Sub: 22 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 8 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 8 } + - { File: 0, dLoc: [ 4, 5, 2, 12 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 5, 0, 19 ], Branch: { True: { Ref: 9 }, False: { Add: 23 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 10 }, False: { Sub: 28 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 10 } + - { File: 0, dLoc: [ 2, 5, 2, 12 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 5, 0, 33 ], Branch: { True: { Ref: 11 }, False: { Add: 29 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 12 }, False: { Sub: 34 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 12 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 12 } + - { File: 0, dLoc: [ 4, 5, 2, 12 ], Ref: 13 } + - { File: 0, dLoc: [ 0, 5, 0, 39 ], Branch: { True: { Ref: 13 }, False: { Add: 35 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 13 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 14 }, False: { Sub: 40 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 14 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 14 } + - { File: 0, dLoc: [ 2, 5, 2, 12 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 5, 0, 12 ], Branch: { True: { Ref: 15 }, False: { Add: 41 } } } + - { File: 0, dLoc: [ 1, 11, 0, 12 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 16 }, False: { Sub: 46 } } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Ref: 16 } + - { File: 0, dLoc: [ 0, 14, 0, 16 ], Ref: 16 } - Name: '__llvm_covfun (2)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 59A48AA8899AA358C100000091E33C8FF36C04009FD374D96F4D6D1A01000B01050509090D0511111505212125191D05313135292D1C01B4011A0C02030213001A2005010013001A05001C001F05002000A1808080080500210804050109000E2006090009000E0900120013200A0D00120013050209000E20110E0009000E110012001320151200120013050209000E05000900172016210009000E2100120017201A250012001719001B001C201E1D001B001C050209000E05000900172031220009000E31001200172035260012001729001B001C202D2A001B001C + CovFun: + - FuncName: boolean_operators + Signature: 0x46CF38F3CE391 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 4 } ] + - [ { Ref: 4 }, { Ref: 5 } ] + - [ { Ref: 1 }, { Ref: 8 } ] + - [ { Ref: 8 }, { Ref: 9 } ] + - [ { Ref: 6 }, { Ref: 7 } ] + - [ { Ref: 1 }, { Ref: 12 } ] + - [ { Ref: 12 }, { Ref: 13 } ] + - [ { Ref: 10 }, { Ref: 11 } ] + Records: + - { File: 0, dLoc: [ 180, 26, 12, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 2, 19, 0, 26 ], Add: 0 } + - { File: 0, dLoc: [ 0, 19, 0, 26 ], Branch: { True: { Ref: 1 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 28, 0, 31 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 32, 0, 33 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 33, 8, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 9, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 } } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], Branch: { True: { Sub: 2 }, False: { Ref: 3 } } } + - { File: 0, dLoc: [ 2, 9, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Ref: 4 }, False: { Sub: 3 } } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], Branch: { True: { Ref: 5 }, False: { Sub: 4 } } } + - { File: 0, dLoc: [ 2, 9, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Sub: 5 }, False: { Ref: 8 } } } + - { File: 0, dLoc: [ 0, 18, 0, 23 ], Ref: 8 } + - { File: 0, dLoc: [ 0, 18, 0, 23 ], Branch: { True: { Sub: 6 }, False: { Ref: 9 } } } + - { File: 0, dLoc: [ 0, 27, 0, 28 ], Ref: 6 } + - { File: 0, dLoc: [ 0, 27, 0, 28 ], Branch: { True: { Sub: 7 }, False: { Ref: 7 } } } + - { File: 0, dLoc: [ 2, 9, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 9, 0, 14 ], Branch: { True: { Ref: 12 }, False: { Sub: 8 } } } + - { File: 0, dLoc: [ 0, 18, 0, 23 ], Ref: 12 } + - { File: 0, dLoc: [ 0, 18, 0, 23 ], Branch: { True: { Ref: 13 }, False: { Sub: 9 } } } + - { File: 0, dLoc: [ 0, 27, 0, 28 ], Ref: 10 } + - { File: 0, dLoc: [ 0, 27, 0, 28 ], Branch: { True: { Ref: 11 }, False: { Sub: 10 } } } - Name: __llvm_covfun Type: SHT_PROGBITS AddressAlign: 0x8 - Content: F5953D044B505D13D20000005FD132562FE71EAC9FD374D96F4D6D1A01001201050309090D011101111B1501111519011D011D2F21011D212501290129432D01292D311D01C201150D0203030A000B03000A0015200906000A000B09000F0015200D0A000F001505001601858080800805010500081B020A00111B000A001C201615000A0011150015001C201E190015001C11001D01858080800811010500082F021100122F0011001C20212A00110012210016001C2025320016001C1D001E00211D0022002343020A001143000A001C203E2D000A00112D0015001C2046310015001C29001E00212900220023 + CovFun: + - FuncName: boolop_loops + Signature: 0xAC1EE72F5632D15F + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Add: 0 }, { Ref: 2 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 0 }, { Ref: 4 } ] + - [ { Ref: 0 }, { Ref: 4 } ] + - [ { Add: 6 }, { Ref: 5 } ] + - [ { Ref: 0 }, { Ref: 4 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Add: 11 }, { Ref: 8 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Ref: 8 }, { Ref: 9 } ] + - [ { Ref: 0 }, { Ref: 10 } ] + - [ { Ref: 0 }, { Ref: 10 } ] + - [ { Add: 16 }, { Ref: 11 } ] + - [ { Ref: 0 }, { Ref: 10 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + Records: + - { File: 0, dLoc: [ 194, 21, 13, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 3, 10, 0, 11 ], Add: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 21 ], Add: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 11 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 15, 0, 21 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 15, 0, 21 ], Branch: { True: { Ref: 3 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 22, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 8 ], Ref: 1 } + - { File: 0, dLoc: [ 2, 10, 0, 17 ], Add: 6 } + - { File: 0, dLoc: [ 0, 10, 0, 28 ], Add: 6 } + - { File: 0, dLoc: [ 0, 10, 0, 17 ], Branch: { True: { Sub: 5 }, False: { Ref: 5 } } } + - { File: 0, dLoc: [ 0, 21, 0, 28 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 21, 0, 28 ], Branch: { True: { Sub: 7 }, False: { Ref: 6 } } } + - { File: 0, dLoc: [ 0, 29, 1, 5 ], isGap: true, Ref: 4 } + - { File: 0, dLoc: [ 1, 5, 0, 8 ], Ref: 4 } + - { File: 0, dLoc: [ 2, 17, 0, 18 ], Add: 11 } + - { File: 0, dLoc: [ 0, 17, 0, 28 ], Add: 11 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 8 }, False: { Sub: 10 } } } + - { File: 0, dLoc: [ 0, 22, 0, 28 ], Ref: 8 } + - { File: 0, dLoc: [ 0, 22, 0, 28 ], Branch: { True: { Ref: 9 }, False: { Sub: 12 } } } + - { File: 0, dLoc: [ 0, 30, 0, 33 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 34, 0, 35 ], Ref: 7 } + - { File: 0, dLoc: [ 2, 10, 0, 17 ], Add: 16 } + - { File: 0, dLoc: [ 0, 10, 0, 28 ], Add: 16 } + - { File: 0, dLoc: [ 0, 10, 0, 17 ], Branch: { True: { Sub: 15 }, False: { Ref: 11 } } } + - { File: 0, dLoc: [ 0, 21, 0, 28 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 21, 0, 28 ], Branch: { True: { Sub: 17 }, False: { Ref: 12 } } } + - { File: 0, dLoc: [ 0, 30, 0, 33 ], Ref: 10 } + - { File: 0, dLoc: [ 0, 34, 0, 35 ], Ref: 10 } - Name: '__llvm_covfun (6)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 20E5C369BDF15C7936000000D0D60000000000009FD374D96F4D6D1A0100030105010901090701D1011D0702200502030B00110500120094808080080500140015020018001920090A020B000C0A00100011 + CovFun: + - FuncName: conditional_operator + Signature: 0xD6D0 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 209, 29, 7, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 3, 11, 0, 17 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 18, 0, 20 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 24, 0, 25 ], Sub: 0 } + - { File: 0, dLoc: [ 2, 11, 0, 12 ], Branch: { True: { Ref: 2 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 16, 0, 17 ], Sub: 2 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 7DE8E7C47096EB427A00000092EAF0986287F0789FD374D96F4D6D1A01000C0105050905092B0D05092B0D05092B0D05092B0D0509050D0F01DA01170B0203011300192005010013001905001B001E05001F00A08080800805002009042B020806062B040B0010200D26000B00100D00110092808080080D00120017260017018780808008260107010626010E001320092E000E0013 + CovFun: + - FuncName: do_fallthrough + Signature: 0x78F0876298F0EA92 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Add: 10 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Add: 10 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Add: 10 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Add: 10 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 1 }, { Ref: 3 } ] + Records: + - { File: 0, dLoc: [ 218, 23, 11, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 19, 0, 25 ], Add: 0 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Branch: { True: { Ref: 1 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 27, 0, 30 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 31, 0, 32 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 32, 9, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 2, 8, 6, 6 ], Add: 10 } + - { File: 0, dLoc: [ 4, 11, 0, 16 ], Add: 10 } + - { File: 0, dLoc: [ 0, 11, 0, 16 ], Branch: { True: { Ref: 3 }, False: { Sub: 9 } } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], isGap: true, Ref: 3 } + - { File: 0, dLoc: [ 0, 18, 0, 23 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 23, 1, 7 ], isGap: true, Sub: 9 } + - { File: 0, dLoc: [ 1, 7, 1, 6 ], Sub: 9 } + - { File: 0, dLoc: [ 1, 14, 0, 19 ], Sub: 9 } + - { File: 0, dLoc: [ 0, 14, 0, 19 ], Branch: { True: { Ref: 2 }, False: { Sub: 11 } } } - Name: '__llvm_covfun (10)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: FAD58DE7366495DB0A00000018000000000000009FD374D96F4D6D1A0100000101F501280F02 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: [] + Records: + - { File: 0, dLoc: [ 245, 40, 15, 2 ], Ref: 0 } - Name: '__llvm_covfun (11)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 4CB4F49D6737EBF92B000000D1460000000000009FD374D96F4D6D1A01000101050601E7011B030203011300192005010013001905001B001E05001F00A0808080080500200104 + CovFun: + - FuncName: 'branch-c-general.c:static_func' + Signature: 0x46D1 + FilenamesRef: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 231, 27, 3, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 19, 0, 25 ], Add: 0 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Branch: { True: { Ref: 1 }, False: { Ref: 0 } } } + - { File: 0, dLoc: [ 0, 27, 0, 30 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 31, 0, 32 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 32, 1, 4 ], Ref: 1 } - Name: __llvm_covmap Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 000000001B0000000000000003000000011800172F746D702F6272616E63682D632D67656E6572616C2E6300 + CovMap: + - Version: 3 + FnBlobHash: 0x1A6D4D6FD974D39F + Filenames: + - '/tmp/branch-c-general.c' - Name: __llvm_prf_names Type: SHT_PROGBITS AddressAlign: 0x1 - Content: A6010073696D706C655F6C6F6F707301636F6E646974696F6E616C73016561726C795F6578697473016A756D7073017377697463686573016269675F73776974636801626F6F6C65616E5F6F70657261746F727301626F6F6C6F705F6C6F6F707301636F6E646974696F6E616C5F6F70657261746F7201646F5F66616C6C7468726F756768016D61696E016272616E63682D632D67656E6572616C2E633A7374617469635F66756E63 + PrfNames: + - Names: + - simple_loops + - conditionals + - early_exits + - jumps + - switches + - big_switch + - boolean_operators + - boolop_loops + - conditional_operator + - do_fallthrough + - main + - 'branch-c-general.c:static_func' - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml index 00135f2e8b987..bae787216fee7 100644 --- a/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/branch-logical-mixed.yaml @@ -10,19 +10,214 @@ Sections: - Name: __llvm_covfun Type: SHT_PROGBITS AddressAlign: 0x8 - Content: F0A0ED2C305C0BB3C0030000F834CF5F518FC8834287299580773304010030012525291D2115190D110509014D4D5145493D4135392D31017D7D8101758501850189016D8D018D019101659501950199015D9D019D01A10155A501A501A90101D501D501D901CD01DD01DD01E101C501E501E501E901BD01ED01ED01F101B501F501F501F901AD01FD01FD018102018502018502018502018902018902018902018D02018D02018D020191020191020191027D010819430201080C000E01000C010E01000C020E01000C030E01000C040E202502000C000E25010C000E202906000C000E1D010C000E20210A000C000E15010C000E20190E000C000E0D010C000E201112000C000E05010C000E200916000C000E01020C000E01000C010E01000C020E01000C030E01000C040E201A4D000C000E4D010C000E201E51000C000E45010C000E202249000C000E3D010C000E202641000C000E35010C000E202A39000C000E2D010C000E202E31000C000E01020C011001000C031001000C051001000C071001000C091001000D000F207D32000D000F7D010D000F20810136000D000F75010C011075000D000F2085013A000D000F8501010D000F2089013E000D000F6D010C01106D000D000F208D0142000D000F8D01010D000F20910146000D000F65010C011065000D000F2095014A000D000F9501010D000F2099014E000D000F5D010C01105D000D000F209D0152000D000F9D01010D000F20A10156000D000F55010C011055000D000F20A5015A000D000FA501010D000F20A9015E000D000F01020C011001000C031001000C051001000C071001000C091001000D000F2062D501000D000FD501010D000F2066D901000D000FCD01010C0110CD01000D000F206ADD01000D000FDD01010D000F206EE101000D000FC501010C0110C501000D000F2072E501000D000FE501010D000F2076E901000D000FBD01010C0110BD01000D000F207AED01000D000FED01010D000F207EF101000D000FB501010C0110B501000D000F208201F501000D000FF501010D000F208601F901000D000FAD01010C0110AD01000D000F208A01FD01000D000FFD01010D000F208E018102000D000F01020700082085029A0100070008850200090185808080088502010500169A0100170285808080089A01020500160102070008208902A6010007000889020009018580808008890201050016A6010017028580808008A601020500160102070008208D02B201000700088D0200090185808080088D0201050016B2010017028580808008B201020500160102070008209102BE010007000891020009018580808008910201050016BE010017028580808008BE0102050016 + CovFun: + - FuncName: _Z4funcii + Signature: 0x83C88F515FCF34F8 + FilenamesRef: 0x433778095298742 + Filenames: + - '/tmp/branch-logical-mixed.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 9 } ] + - [ { Ref: 9 }, { Ref: 10 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 19 } ] + - [ { Ref: 19 }, { Ref: 20 } ] + - [ { Ref: 17 }, { Ref: 18 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Ref: 13 }, { Ref: 14 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Ref: 0 }, { Ref: 31 } ] + - [ { Ref: 31 }, { Ref: 32 } ] + - [ { Ref: 29 }, { Ref: 33 } ] + - [ { Ref: 33 }, { Ref: 34 } ] + - [ { Ref: 27 }, { Ref: 35 } ] + - [ { Ref: 35 }, { Ref: 36 } ] + - [ { Ref: 25 }, { Ref: 37 } ] + - [ { Ref: 37 }, { Ref: 38 } ] + - [ { Ref: 23 }, { Ref: 39 } ] + - [ { Ref: 39 }, { Ref: 40 } ] + - [ { Ref: 21 }, { Ref: 41 } ] + - [ { Ref: 41 }, { Ref: 42 } ] + - [ { Ref: 0 }, { Ref: 53 } ] + - [ { Ref: 53 }, { Ref: 54 } ] + - [ { Ref: 51 }, { Ref: 55 } ] + - [ { Ref: 55 }, { Ref: 56 } ] + - [ { Ref: 49 }, { Ref: 57 } ] + - [ { Ref: 57 }, { Ref: 58 } ] + - [ { Ref: 47 }, { Ref: 59 } ] + - [ { Ref: 59 }, { Ref: 60 } ] + - [ { Ref: 45 }, { Ref: 61 } ] + - [ { Ref: 61 }, { Ref: 62 } ] + - [ { Ref: 43 }, { Ref: 63 } ] + - [ { Ref: 63 }, { Ref: 64 } ] + - [ { Ref: 0 }, { Ref: 65 } ] + - [ { Ref: 0 }, { Ref: 65 } ] + - [ { Ref: 0 }, { Ref: 65 } ] + - [ { Ref: 0 }, { Ref: 66 } ] + - [ { Ref: 0 }, { Ref: 66 } ] + - [ { Ref: 0 }, { Ref: 66 } ] + - [ { Ref: 0 }, { Ref: 67 } ] + - [ { Ref: 0 }, { Ref: 67 } ] + - [ { Ref: 0 }, { Ref: 67 } ] + - [ { Ref: 0 }, { Ref: 68 } ] + - [ { Ref: 0 }, { Ref: 68 } ] + - [ { Ref: 0 }, { Ref: 68 } ] + Records: + - { File: 0, dLoc: [ 8, 25, 67, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 8, 12, 0, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 1, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 2, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 3, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 4, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 9 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 10 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 8 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 6 }, False: { Sub: 3 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 4 }, False: { Sub: 4 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Ref: 2 }, False: { Sub: 5 } } } + - { File: 0, dLoc: [ 2, 12, 0, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 1, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 2, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 3, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 4, 14 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 6 }, False: { Ref: 19 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 19 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 7 }, False: { Ref: 20 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 17 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 8 }, False: { Ref: 18 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 9 }, False: { Ref: 16 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 13 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 10 }, False: { Ref: 14 } } } + - { File: 0, dLoc: [ 1, 12, 0, 14 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 12, 0, 14 ], Branch: { True: { Sub: 11 }, False: { Ref: 12 } } } + - { File: 0, dLoc: [ 2, 12, 1, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 3, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 5, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 7, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 9, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 31 }, False: { Sub: 12 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 31 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 32 }, False: { Sub: 13 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 29 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 29 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 33 }, False: { Sub: 14 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 33 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 34 }, False: { Sub: 15 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 27 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 27 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 35 }, False: { Sub: 16 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 35 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 36 }, False: { Sub: 17 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 25 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 25 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 37 }, False: { Sub: 18 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 37 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 38 }, False: { Sub: 19 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 23 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 23 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 39 }, False: { Sub: 20 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 39 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 40 }, False: { Sub: 21 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 21 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 21 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 41 }, False: { Sub: 22 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 41 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Ref: 42 }, False: { Sub: 23 } } } + - { File: 0, dLoc: [ 2, 12, 1, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 3, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 5, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 7, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 9, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 24 }, False: { Ref: 53 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 53 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 25 }, False: { Ref: 54 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 51 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 51 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 26 }, False: { Ref: 55 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 55 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 27 }, False: { Ref: 56 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 49 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 49 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 28 }, False: { Ref: 57 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 57 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 29 }, False: { Ref: 58 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 47 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 47 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 30 }, False: { Ref: 59 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 59 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 31 }, False: { Ref: 60 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 45 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 45 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 32 }, False: { Ref: 61 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 61 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 33 }, False: { Ref: 62 } } } + - { File: 0, dLoc: [ 1, 12, 1, 16 ], Ref: 43 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Ref: 43 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 34 }, False: { Ref: 63 } } } + - { File: 0, dLoc: [ 1, 13, 0, 15 ], Ref: 63 } + - { File: 0, dLoc: [ 0, 13, 0, 15 ], Branch: { True: { Sub: 35 }, False: { Ref: 64 } } } + - { File: 0, dLoc: [ 2, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 65 }, False: { Sub: 38 } } } + - { File: 0, dLoc: [ 0, 9, 1, 5 ], isGap: true, Ref: 65 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 65 } + - { File: 0, dLoc: [ 0, 23, 2, 5 ], isGap: true, Sub: 38 } + - { File: 0, dLoc: [ 2, 5, 0, 22 ], Sub: 38 } + - { File: 0, dLoc: [ 2, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 66 }, False: { Sub: 41 } } } + - { File: 0, dLoc: [ 0, 9, 1, 5 ], isGap: true, Ref: 66 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 66 } + - { File: 0, dLoc: [ 0, 23, 2, 5 ], isGap: true, Sub: 41 } + - { File: 0, dLoc: [ 2, 5, 0, 22 ], Sub: 41 } + - { File: 0, dLoc: [ 2, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 67 }, False: { Sub: 44 } } } + - { File: 0, dLoc: [ 0, 9, 1, 5 ], isGap: true, Ref: 67 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 67 } + - { File: 0, dLoc: [ 0, 23, 2, 5 ], isGap: true, Sub: 44 } + - { File: 0, dLoc: [ 2, 5, 0, 22 ], Sub: 44 } + - { File: 0, dLoc: [ 2, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 68 }, False: { Sub: 47 } } } + - { File: 0, dLoc: [ 0, 9, 1, 5 ], isGap: true, Ref: 68 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 68 } + - { File: 0, dLoc: [ 0, 23, 2, 5 ], isGap: true, Sub: 47 } + - { File: 0, dLoc: [ 2, 5, 0, 22 ], Sub: 47 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: FAD58DE7366495DB090000001800000000000000428729958077330401000001014F010402 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x433778095298742 + Filenames: + - '/tmp/branch-logical-mixed.cpp' + Expressions: [] + Records: + - { File: 0, dLoc: [ 79, 1, 4, 2 ], Ref: 0 } - Name: __llvm_covmap Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 00000000210000000000000003000000011E001D2F746D702F6272616E63682D6C6F676963616C2D6D697865642E637070000000 + CovMap: + - Version: 3 + FnBlobHash: 0x433778095298742 + Filenames: + - '/tmp/branch-logical-mixed.cpp' - Name: __llvm_prf_names Type: SHT_PROGBITS AddressAlign: 0x1 - Content: 0E005F5A3466756E636969016D61696E + PrfNames: + - Names: + - _Z4funcii + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml index 1b4e6bbfcbce5..bc6275196767f 100644 --- a/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/branch-macros.yaml @@ -10,23 +10,199 @@ Sections: - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: F0A0ED2C305C0BB3A8010000A9166572A6C7691F5CCB403140FE0666150000000000000000000000000000000000000000000F014545493D4135392D3101050509010D0D1101151519011D1D21012525291401101911020C010C0011140015001A1C020C001124020C00122C020C001234020C001201020A000B01000A001001000A001501000A001A204502000A000B45000F0010204906000F00103D0014001520410A00140015350019001A20390E0019001A2D001E001F203112001E001F0301050F001701000F0017200516000F00170205060F001720091A000F00170301070F001F3C00100015440019001E014C0910001501540A100016015C0B1000160301050F001701000F0017200D1E000F0017020D060F0017201122000F00170301070F001F64001000156C0019001E017409100015017C0A1000160301050F001701000F0017201526000F00170215060F001720192A000F00170301070F001F8401001000158C010019001E019401091000150301050F001701000F0017201D2E000F0017021D060F0017202132000F00170301070F001F9C0100100015A4010019001E0301050F001701000F0017202536000F00170225060F001720293A000F0017 + CovFun: + - FuncName: _Z4funcii + Signature: 0x1F69C7A6726516A9 + FilenamesRef: 0x6606FE403140CB5C + Filenames: + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 17 } ] + - [ { Ref: 17 }, { Ref: 18 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Ref: 13 }, { Ref: 14 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 0 }, { Ref: 5 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 7 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + - [ { Ref: 0 }, { Ref: 9 } ] + - [ { Ref: 9 }, { Ref: 10 } ] + Records: + - { File: 0, dLoc: [ 16, 25, 17, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 17 ], Expansion: 1 } + - { File: 0, dLoc: [ 0, 21, 0, 26 ], Expansion: 2 } + - { File: 0, dLoc: [ 2, 12, 0, 17 ], Expansion: 3 } + - { File: 0, dLoc: [ 2, 12, 0, 18 ], Expansion: 4 } + - { File: 0, dLoc: [ 2, 12, 0, 18 ], Expansion: 5 } + - { File: 0, dLoc: [ 2, 12, 0, 18 ], Expansion: 6 } + - { File: 0, dLoc: [ 2, 10, 0, 11 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 21 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 26 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 10, 0, 11 ], Branch: { True: { Ref: 17 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 15, 0, 16 ], Ref: 17 } + - { File: 0, dLoc: [ 0, 15, 0, 16 ], Branch: { True: { Ref: 18 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Branch: { True: { Ref: 16 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Ref: 13 } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Branch: { True: { Ref: 14 }, False: { Sub: 3 } } } + - { File: 0, dLoc: [ 0, 30, 0, 31 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 30, 0, 31 ], Branch: { True: { Ref: 12 }, False: { Sub: 4 } } } + - { File: 1, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 1, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 1, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 1 }, False: { Sub: 5 } } } + - { File: 2, dLoc: [ 6, 15, 0, 23 ], Ref: 1 } + - { File: 2, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 6 } } } + - { File: 3, dLoc: [ 7, 15, 0, 31 ], Ref: 0 } + - { File: 3, dLoc: [ 0, 16, 0, 21 ], Expansion: 7 } + - { File: 3, dLoc: [ 0, 25, 0, 30 ], Expansion: 8 } + - { File: 4, dLoc: [ 9, 16, 0, 21 ], Expansion: 9 } + - { File: 5, dLoc: [ 10, 16, 0, 22 ], Expansion: 10 } + - { File: 6, dLoc: [ 11, 16, 0, 22 ], Expansion: 11 } + - { File: 7, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 7, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 7, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 3 }, False: { Sub: 7 } } } + - { File: 8, dLoc: [ 6, 15, 0, 23 ], Ref: 3 } + - { File: 8, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 4 }, False: { Sub: 8 } } } + - { File: 9, dLoc: [ 7, 15, 0, 31 ], Ref: 0 } + - { File: 9, dLoc: [ 0, 16, 0, 21 ], Expansion: 12 } + - { File: 9, dLoc: [ 0, 25, 0, 30 ], Expansion: 13 } + - { File: 10, dLoc: [ 9, 16, 0, 21 ], Expansion: 14 } + - { File: 11, dLoc: [ 10, 16, 0, 22 ], Expansion: 15 } + - { File: 12, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 12, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 12, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 5 }, False: { Sub: 9 } } } + - { File: 13, dLoc: [ 6, 15, 0, 23 ], Ref: 5 } + - { File: 13, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 6 }, False: { Sub: 10 } } } + - { File: 14, dLoc: [ 7, 15, 0, 31 ], Ref: 0 } + - { File: 14, dLoc: [ 0, 16, 0, 21 ], Expansion: 16 } + - { File: 14, dLoc: [ 0, 25, 0, 30 ], Expansion: 17 } + - { File: 15, dLoc: [ 9, 16, 0, 21 ], Expansion: 18 } + - { File: 16, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 16, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 16, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 7 }, False: { Sub: 11 } } } + - { File: 17, dLoc: [ 6, 15, 0, 23 ], Ref: 7 } + - { File: 17, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 8 }, False: { Sub: 12 } } } + - { File: 18, dLoc: [ 7, 15, 0, 31 ], Ref: 0 } + - { File: 18, dLoc: [ 0, 16, 0, 21 ], Expansion: 19 } + - { File: 18, dLoc: [ 0, 25, 0, 30 ], Expansion: 20 } + - { File: 19, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 19, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 19, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 9 }, False: { Sub: 13 } } } + - { File: 20, dLoc: [ 6, 15, 0, 23 ], Ref: 9 } + - { File: 20, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 10 }, False: { Sub: 14 } } } - Name: __llvm_covfun Type: SHT_PROGBITS AddressAlign: 0x8 - Content: B01D983FC6736395C8000000403729A19E990E4D5CCB403140FE06660D0000000000000000000000000006050905150519191D010D0D110301241A07020C010E0014140018001D011C0B1000160505080F0026200209000F002624001000152C0018001D3400200025013C0A1000160305070F001F44001000154C0019001E0115060F00170106050F00170154091000150305050F001705000F001720190A000F00170219060F0017201D0E000F00170401070F001F01000F001F5C00100015640019001E0301050F001701000F0017200D12000F0017020D060F0017201116000F0017 + CovFun: + - FuncName: _Z5func2ii + Signature: 0x4D0E999EA1293740 + FilenamesRef: 0x6606FE403140CB5C + Filenames: + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + - '/tmp/branch-macros.cpp' + Expressions: + - [ { Ref: 1 }, { Ref: 2 } ] + - [ { Ref: 1 }, { Ref: 5 } ] + - [ { Ref: 1 }, { Ref: 6 } ] + - [ { Ref: 6 }, { Ref: 7 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + Records: + - { File: 0, dLoc: [ 36, 26, 7, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 14, 0, 20 ], Expansion: 1 } + - { File: 0, dLoc: [ 0, 24, 0, 29 ], Expansion: 2 } + - { File: 1, dLoc: [ 11, 16, 0, 22 ], Expansion: 3 } + - { File: 2, dLoc: [ 8, 15, 0, 38 ], Ref: 1 } + - { File: 2, dLoc: [ 0, 15, 0, 38 ], Branch: { True: { Sub: 0 }, False: { Ref: 2 } } } + - { File: 2, dLoc: [ 0, 16, 0, 21 ], Expansion: 4 } + - { File: 2, dLoc: [ 0, 24, 0, 29 ], Expansion: 5 } + - { File: 2, dLoc: [ 0, 32, 0, 37 ], Expansion: 6 } + - { File: 3, dLoc: [ 10, 16, 0, 22 ], Expansion: 7 } + - { File: 4, dLoc: [ 7, 15, 0, 31 ], Ref: 1 } + - { File: 4, dLoc: [ 0, 16, 0, 21 ], Expansion: 8 } + - { File: 4, dLoc: [ 0, 25, 0, 30 ], Expansion: 9 } + - { File: 5, dLoc: [ 6, 15, 0, 23 ], Ref: 5 } + - { File: 6, dLoc: [ 5, 15, 0, 23 ], Sub: 1 } + - { File: 7, dLoc: [ 9, 16, 0, 21 ], Expansion: 10 } + - { File: 8, dLoc: [ 5, 15, 0, 23 ], Ref: 1 } + - { File: 8, dLoc: [ 0, 15, 0, 23 ], Ref: 1 } + - { File: 8, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 6 }, False: { Sub: 2 } } } + - { File: 9, dLoc: [ 6, 15, 0, 23 ], Ref: 6 } + - { File: 9, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 7 }, False: { Sub: 3 } } } + - { File: 10, dLoc: [ 7, 15, 0, 31 ], Ref: 0 } + - { File: 10, dLoc: [ 0, 15, 0, 31 ], Ref: 0 } + - { File: 10, dLoc: [ 0, 16, 0, 21 ], Expansion: 11 } + - { File: 10, dLoc: [ 0, 25, 0, 30 ], Expansion: 12 } + - { File: 11, dLoc: [ 5, 15, 0, 23 ], Ref: 0 } + - { File: 11, dLoc: [ 0, 15, 0, 23 ], Ref: 0 } + - { File: 11, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 3 }, False: { Sub: 4 } } } + - { File: 12, dLoc: [ 6, 15, 0, 23 ], Ref: 3 } + - { File: 12, dLoc: [ 0, 15, 0, 23 ], Branch: { True: { Ref: 4 }, False: { Sub: 5 } } } - Name: '__llvm_covfun (2)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: FAD58DE7366495DB0900000018000000000000005CCB403140FE066601000001012F010502 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x6606FE403140CB5C + Filenames: + - '/tmp/branch-macros.cpp' + Expressions: [] + Records: + - { File: 0, dLoc: [ 47, 1, 5, 2 ], Ref: 0 } - Name: __llvm_covmap Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 000000001A0000000000000003000000011700162F746D702F6272616E63682D6D6163726F732E6370700000 + CovMap: + - Version: 3 + FnBlobHash: 0x6606FE403140CB5C + Filenames: + - '/tmp/branch-macros.cpp' - Name: __llvm_prf_names Type: SHT_PROGBITS AddressAlign: 0x1 - Content: 19005F5A3466756E636969015F5A3566756E63326969016D61696E + PrfNames: + - Names: + - _Z4funcii + - _Z5func2ii + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.yaml index f64ad06e46bbd..b038df7a17cb0 100644 --- a/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/branch-showBranchPercentage.yaml @@ -10,15 +10,106 @@ Sections: - Name: __llvm_covfun Type: SHT_PROGBITS AddressAlign: 0x8 - Content: FAD58DE7366495DB70010000776050A22C20FE35CDAF69BBDD37045201001C0105021D1D2115190D110229292D0225023131352F050139374D45494145434D414967494145674D4145634D67494145674941453D513D5132010C012E02010207000F2005020007000F0500100183808080080501030304020304028380808008020203260202070700190200070024020007002E020008000E201D060008000E1D0012001820210A0012001815001D0024200E19001D00240D0028002E2012110028002E09002F0185808080080901050016020208000E2016290008000E2900120018201A2D0012001825001A009C8080800825001C001D1E00200023020208000E2031220008000E3100120018203526001200182A020F0014203902000F0014390016001939001A009B8080800839001B002D00060307938080800841010506132041330005000B670205041320453F0005000B630205021320494F0005000B5702050013204D630005000C3D00130383808080083D030308026F010602046F020C001420513D000C0014 + CovFun: + - FuncName: main + Signature: 0x35FE202CA2506077 + FilenamesRef: 0x520437DDBB69AFCD + Filenames: + - '/tmp/branch-showBranchPercentage.c' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Sub: 0 }, { Ref: 7 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Sub: 0 }, { Ref: 10 } ] + - [ { Ref: 10 }, { Ref: 11 } ] + - [ { Sub: 0 }, { Ref: 9 } ] + - [ { Sub: 0 }, { Ref: 12 } ] + - [ { Ref: 12 }, { Ref: 13 } ] + - [ { Add: 11 }, { Ref: 1 } ] + - [ { Ref: 0 }, { Ref: 14 } ] + - [ { Add: 13 }, { Ref: 19 } ] + - [ { Ref: 17 }, { Ref: 18 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Add: 16 }, { Ref: 19 } ] + - [ { Ref: 16 }, { Ref: 18 } ] + - [ { Add: 25 }, { Ref: 18 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Add: 25 }, { Ref: 19 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Add: 24 }, { Ref: 19 } ] + - [ { Add: 25 }, { Ref: 18 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Add: 25 }, { Ref: 18 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Ref: 15 }, { Ref: 20 } ] + - [ { Ref: 15 }, { Ref: 20 } ] + Records: + - { File: 0, dLoc: [ 12, 1, 46, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 2, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 15 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 16, 1, 3 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 3, 3, 4 ], Ref: 1 } + - { File: 0, dLoc: [ 3, 4, 2, 3 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 2, 3, 38, 2 ], Sub: 0 } + - { File: 0, dLoc: [ 7, 7, 0, 25 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 36 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 46 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 14 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 14 ], Branch: { True: { Ref: 7 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Branch: { True: { Ref: 8 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 29, 0, 36 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 29, 0, 36 ], Branch: { True: { Sub: 3 }, False: { Ref: 6 } } } + - { File: 0, dLoc: [ 0, 40, 0, 46 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 40, 0, 46 ], Branch: { True: { Sub: 4 }, False: { Ref: 4 } } } + - { File: 0, dLoc: [ 0, 47, 1, 5 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 2 } + - { File: 0, dLoc: [ 2, 8, 0, 14 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 14 ], Branch: { True: { Sub: 5 }, False: { Ref: 10 } } } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Ref: 10 } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Branch: { True: { Sub: 6 }, False: { Ref: 11 } } } + - { File: 0, dLoc: [ 0, 26, 0, 28 ], isGap: true, Ref: 9 } + - { File: 0, dLoc: [ 0, 28, 0, 29 ], Ref: 9 } + - { File: 0, dLoc: [ 0, 32, 0, 35 ], Sub: 7 } + - { File: 0, dLoc: [ 2, 8, 0, 14 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 14 ], Branch: { True: { Ref: 12 }, False: { Sub: 8 } } } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Ref: 12 } + - { File: 0, dLoc: [ 0, 18, 0, 24 ], Branch: { True: { Ref: 13 }, False: { Sub: 9 } } } + - { File: 0, dLoc: [ 2, 15, 0, 20 ], Sub: 10 } + - { File: 0, dLoc: [ 0, 15, 0, 20 ], Branch: { True: { Ref: 14 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 22, 0, 25 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 26, 0, 27 ], isGap: true, Ref: 14 } + - { File: 0, dLoc: [ 0, 27, 0, 45 ], Ref: 14 } + - { File: 0, dLoc: [ 6, 3, 7, 19 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 5, 6, 19 ], Ref: 16 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 16 }, False: { Add: 12 } } } + - { File: 0, dLoc: [ 2, 5, 4, 19 ], Add: 25 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 17 }, False: { Add: 15 } } } + - { File: 0, dLoc: [ 2, 5, 2, 19 ], Add: 24 } + - { File: 0, dLoc: [ 0, 5, 0, 11 ], Branch: { True: { Ref: 18 }, False: { Add: 19 } } } + - { File: 0, dLoc: [ 2, 5, 0, 19 ], Add: 21 } + - { File: 0, dLoc: [ 0, 5, 0, 12 ], Branch: { True: { Ref: 19 }, False: { Add: 24 } } } + - { File: 0, dLoc: [ 0, 19, 3, 3 ], isGap: true, Ref: 15 } + - { File: 0, dLoc: [ 3, 3, 8, 2 ], Ref: 15 } + - { File: 0, dLoc: [ 1, 6, 2, 4 ], Add: 27 } + - { File: 0, dLoc: [ 2, 12, 0, 20 ], Add: 27 } + - { File: 0, dLoc: [ 0, 12, 0, 20 ], Branch: { True: { Ref: 20 }, False: { Ref: 15 } } } - Name: __llvm_covmap Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 00000000260000000000000003000000012300222F746D702F6272616E63682D73686F774272616E636850657263656E746167652E630000 + CovMap: + - Version: 3 + FnBlobHash: 0x520437DDBB69AFCD + Filenames: + - '/tmp/branch-showBranchPercentage.c' - Name: __llvm_prf_names Type: SHT_PROGBITS AddressAlign: 0x1 - Content: 04006D61696E + PrfNames: + - Names: + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml b/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml index 671c530e939e8..c0a89e96e5675 100644 --- a/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/branch-templates.yaml @@ -10,27 +10,113 @@ Sections: - Name: '__llvm_covfun (3)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: FAD58DE7366495DB5D00000058242991A4449202DDC07F26680C05B801000301050109010D0D011D0C0902010107001320050200070013050014018580808008050105001601010700172009060007001709001801858080800809010500160101070017200D0A000700170D00180185808080080D01050016 + CovFun: + - FuncName: main + Signature: 0x29244A491292458 + FilenamesRef: 0xB8050C68267FC0DD + Filenames: + - '/tmp/branch-templates.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Ref: 0 }, { Ref: 3 } ] + Records: + - { File: 0, dLoc: [ 29, 12, 9, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 7, 0, 19 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 19 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 20, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 7, 0, 23 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 } } } + - { File: 0, dLoc: [ 0, 24, 1, 5 ], isGap: true, Ref: 2 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 2 } + - { File: 0, dLoc: [ 1, 7, 0, 23 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 23 ], Branch: { True: { Ref: 3 }, False: { Sub: 2 } } } + - { File: 0, dLoc: [ 0, 24, 1, 5 ], isGap: true, Ref: 3 } + - { File: 0, dLoc: [ 1, 5, 0, 22 ], Ref: 3 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 5427717259E0E43E4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + CovFun: + - FuncName: _Z4funcIiEiT_ + Signature: 0x292613611 + FilenamesRef: 0xB8050C68267FC0DD + Filenames: + - '/tmp/branch-templates.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 13, 15, 6, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 6, 0, 7 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 6, 0, 7 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 8, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 13 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 0, 14, 2, 5 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 2, 5, 0, 13 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 13, 1, 3 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 3, 1, 2 ], Zero: { } } - Name: '__llvm_covfun (2)' Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 4B7E22082F0551AA4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + CovFun: + - FuncName: _Z4funcIbEiT_ + Signature: 0x292613611 + FilenamesRef: 0xB8050C68267FC0DD + Filenames: + - '/tmp/branch-templates.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 13, 15, 6, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 6, 0, 7 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 6, 0, 7 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 8, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 13 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 0, 14, 2, 5 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 2, 5, 0, 13 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 13, 1, 3 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 3, 1, 2 ], Zero: { } } - Name: __llvm_covfun Type: SHT_PROGBITS AddressAlign: 0x8 - Content: AC1440BC3DA3E41A4A0000001136619202000000DDC07F26680C05B801000101050A010D0F0602010106000720050200060007050008018580808008050105000D02000D008E8080800802000E028580808008020205000D00000D0183808080080001030102 + CovFun: + - FuncName: _Z4funcIfEiT_ + Signature: 0x292613611 + FilenamesRef: 0xB8050C68267FC0DD + Filenames: + - '/tmp/branch-templates.cpp' + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 13, 15, 6, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 6, 0, 7 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 6, 0, 7 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 8, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 13 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 0, 14, 2, 5 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 2, 5, 0, 13 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 13, 1, 3 ], isGap: true, Zero: { } } + - { File: 0, dLoc: [ 1, 3, 1, 2 ], Zero: { } } - Name: __llvm_covmap Type: SHT_PROGBITS AddressAlign: 0x8 - Content: 000000001D0000000000000003000000011A00192F746D702F6272616E63682D74656D706C617465732E637070000000 + CovMap: + - Version: 3 + FnBlobHash: 0xB8050C68267FC0DD + Filenames: + - '/tmp/branch-templates.cpp' - Name: __llvm_prf_names Type: SHT_PROGBITS AddressAlign: 0x1 - Content: 2E006D61696E015F5A3466756E6349694569545F015F5A3466756E6349624569545F015F5A3466756E6349664569545F + PrfNames: + - Names: + - main + - _Z4funcIiEiT_ + - _Z4funcIbEiT_ + - _Z4funcIfEiT_ - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml index 18dc57488acb3..021b55ecc0996 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-const-folding.yaml @@ -11,137 +11,579 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: AA19D25F7410F1EA300000000E06000000000000B975BFDE464C3C13010101050906010314020201010C000D280302000C0012300000010200000C000D050011001230090202000000110012 + CovFun: + - FuncName: _Z5case0b + Signature: 0x60E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 3, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 2 }, False: { Sub: 0 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 92691AC8D7253F8B300000000E06000000000000B975BFDE464C3C13010101010506010614020201010C000D280302000C0012300502010200000C000D050011001230000002000000110012 + CovFun: + - FuncName: _Z5case1b + Signature: 0x60E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 6, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (2)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 9A7D6FA40D389A5B300000000E06000000000000B975BFDE464C3C13010101050906010914020201010C000D280302000C0012300000010200000C000D050011001230090202000000110012 + CovFun: + - FuncName: _Z5case2b + Signature: 0x60E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 9, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 2 }, False: { Sub: 0 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (3)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 3CC016E1B5A95933300000000E06000000000000B975BFDE464C3C13010101010506010C14020201010C000D280302000C0012300502010200000C000D050011001230000002000000110012 + CovFun: + - FuncName: _Z5case3b + Signature: 0x60E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 12, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (4)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 98207F8F78271E50300000000F06000000000000B975BFDE464C3C13010101050906010F14020201010C000D280302000C0012300000010002000C000D050011001230020902000000110012 + CovFun: + - FuncName: _Z5case4b + Signature: 0x60F + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 15, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 0 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (5)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 0969FC47730492F1300000000F06000000000000B975BFDE464C3C13010101010506011214020201010C000D280302000C0012300205010002000C000D050011001230000002000000110012 + CovFun: + - FuncName: _Z5case5b + Signature: 0x60F + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 18, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 1 }, MCDC: [ 1, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (6)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 0ECB0EF7963F6F79300000000F06000000000000B975BFDE464C3C13010101050906011514020201010C000D280302000C0012300000010002000C000D050011001230020902000000110012 + CovFun: + - FuncName: _Z5case6b + Signature: 0x60F + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 21, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 0 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (7)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 123E012CB073B24A300000000F06000000000000B975BFDE464C3C13010101010506011814020201010C000D280302000C0012300205010002000C000D050011001230000002000000110012 + CovFun: + - FuncName: _Z5case7b + Signature: 0x60F + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 24, 20, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 1 }, MCDC: [ 1, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (8)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: C2EA1D70E059B55D460000008E83010000000000B975BFDE464C3C130101020D11050909011C1C020201010C000D01000C0012280403000C0017300000010300000C000D0D0011001230110203020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5case8bb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 28, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 4 }, False: { Sub: 0 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (9)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 24244E16CFFB9F53460000008E83010000000000B975BFDE464C3C13010102010D050909011F1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5case9bb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 31, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (10)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: CC9CCD1D2ED1627D460000008E83010000000000B975BFDE464C3C130101020D1105090901221C020201010C000D01000C0012280403000C0017300000010300000C000D0D0011001230110203020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5caseabb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 34, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 4 }, False: { Sub: 0 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (11)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 69198FBDA5C488EE460000008E83010000000000B975BFDE464C3C13010102010D05090901251C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5casebbb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 37, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (12)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: A753680B241373ED46000000CF83010000000000B975BFDE464C3C130101020D1105090901281C020201010C000D01000C0012280403000C0017300000010003000C000D0D0011001230021103000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5casecbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 40, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 0 }, False: { Ref: 4 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (13)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 54BD46601EA033AC46000000CF83010000000000B975BFDE464C3C13010102010D050909012B1C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5casedbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 43, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (14)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 39953E03B6ADA13B46000000CF83010000000000B975BFDE464C3C130101020D11050909012E1C020201010C000D01000C0012280403000C0017300000010003000C000D0D0011001230021103000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5caseebb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 46, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 0 }, False: { Ref: 4 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (15)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 9BCFA8D8AA6B9E2046000000CF83010000000000B975BFDE464C3C13010102010D05090901311C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5casefbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 49, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (16)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 4F2882F8142D1DD9460000008E83010000000000B975BFDE464C3C13010102010D0D110901351C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230110603020000110012050016001730000002000000160017 + CovFun: + - FuncName: _Z5casegbb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + Records: + - { File: 0, dLoc: [ 53, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 4 }, False: { Sub: 1 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (17)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 98DB88AFB7497C76460000008E83010000000000B975BFDE464C3C13010102010D05090901381C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5casehbb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 56, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (18)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 596357935D55EEBA460000008E83010000000000B975BFDE464C3C13010102010D0D1109013B1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230110603020000110012050016001730000002000000160017 + CovFun: + - FuncName: _Z5caseibb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + Records: + - { File: 0, dLoc: [ 59, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Ref: 4 }, False: { Sub: 1 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (19)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 3237FBD998D0D824460000008E83010000000000B975BFDE464C3C13010102010D050909013E1C020201010C000D01000C0012280403000C0017300D02010300000C000D0D0011001230000003020000110012050016001730090602000000160017 + CovFun: + - FuncName: _Z5casejbb + Signature: 0x1838E + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 62, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Ref: 2 }, False: { Sub: 1 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (20)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: D656F1340A0C4ED846000000CF83010000000000B975BFDE464C3C13010102010D0D110901411C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230061103000200110012050016001730000002000000160017 + CovFun: + - FuncName: _Z5casekbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + Records: + - { File: 0, dLoc: [ 65, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 1 }, False: { Ref: 4 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (21)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 5E66CCF22EE6A4AC46000000CF83010000000000B975BFDE464C3C13010102010D05090901441C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5caselbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 68, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (22)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 7C4DEA109976A2E846000000CF83010000000000B975BFDE464C3C13010102010D0D110901471C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230061103000200110012050016001730000002000000160017 + CovFun: + - FuncName: _Z5casembb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + Records: + - { File: 0, dLoc: [ 71, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Sub: 1 }, False: { Ref: 4 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (23)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: E25997DF8D6D856B46000000CF83010000000000B975BFDE464C3C13010102010D050909014A1C020201010C000D01000C0012280403000C001730020D010003000C000D0D0011001230000003000200110012050016001730060902000000160017 + CovFun: + - FuncName: _Z5casenbb + Signature: 0x183CF + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 1 }, { Ref: 2 } ] + Records: + - { File: 0, dLoc: [ 74, 28, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 12, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 23 ], Decision: { BIdx: 4, NCond: 3 } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Sub: 0 }, False: { Ref: 3 }, MCDC: [ 1, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 2 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (24)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB1D0000001800000000000000B975BFDE464C3C1301010005014F0121021004010001100901000110090100011009010001 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp + Expressions: [] + Records: + - { File: 0, dLoc: [ 79, 1, 33, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 4, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 9, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 9, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 9, 1, 0, 1 ], Skip: { } } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 000000001B000000000000000600000002180000166D6364632D636F6E73742D666F6C64696E672E63707000 + CovMap: + - Version: 6 + FnBlobHash: 0x133C4C46DEBF75B9 + Filenames: + - mcdc-const-folding.cpp - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 8402005F5A35636173653062015F5A35636173653162015F5A35636173653262015F5A35636173653362015F5A35636173653462015F5A35636173653562015F5A35636173653662015F5A35636173653762015F5A3563617365386262015F5A3563617365396262015F5A3563617365616262015F5A3563617365626262015F5A3563617365636262015F5A3563617365646262015F5A3563617365656262015F5A3563617365666262015F5A3563617365676262015F5A3563617365686262015F5A3563617365696262015F5A35636173656A6262015F5A35636173656B6262015F5A35636173656C6262015F5A35636173656D6262015F5A35636173656E6262016D61696E + PrfNames: + - Names: + - _Z5case0b + - _Z5case1b + - _Z5case2b + - _Z5case3b + - _Z5case4b + - _Z5case5b + - _Z5case6b + - _Z5case7b + - _Z5case8bb + - _Z5case9bb + - _Z5caseabb + - _Z5casebbb + - _Z5casecbb + - _Z5casedbb + - _Z5caseebb + - _Z5casefbb + - _Z5casegbb + - _Z5casehbb + - _Z5caseibb + - _Z5casejbb + - _Z5casekbb + - _Z5caselbb + - _Z5casembb + - _Z5casenbb + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml index 5e57a7e7739d6..66fac0747dee5 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-const.yaml @@ -11,22 +11,67 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 8AC9CB6DFFBEFE928600000091E438CFA3000000A8826E3AB548EA6F01010201151D2113010A2B04021001010001010107000F010007001B0100070020280B050007002001000800093015020104030008000915000D000E300000040003000D000E110013001B1100140015300000030502001400151D0019001A3021060500020019001A09001F0020300000020000001F00200500210185808080080501050024 + CovFun: + - FuncName: _Z4testbbbb + Signature: 0xA3CF38E491 + FilenamesRef: 0x6FEA48B53A6E82A8 + Filenames: + - mcdc-const.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 5 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + Records: + - { File: 0, dLoc: [ 10, 43, 4, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 27 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 32 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 32 ], Decision: { BIdx: 11, NCond: 5 } } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 5 }, False: { Sub: 0 }, MCDC: [ 1, 4, 3 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 4, 0, 3 ] } } + - { File: 0, dLoc: [ 0, 19, 0, 27 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 3, 5, 2 ] } } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Branch: { True: { Ref: 8 }, False: { Sub: 1 }, MCDC: [ 5, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 31, 0, 32 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 31, 0, 32 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 33, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 1 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB130000001800000000000000A8826E3AB548EA6F01010003011101090210050100011002010001 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x6FEA48B53A6E82A8 + Filenames: + - mcdc-const.cpp + Expressions: [] + Records: + - { File: 0, dLoc: [ 17, 1, 9, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 5, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 2, 1, 0, 1 ], Skip: { } } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 00000000130000000000000006000000021000000E6D6364632D636F6E73742E63707000 + CovMap: + - Version: 6 + FnBlobHash: 0x6FEA48B53A6E82A8 + Filenames: + - mcdc-const.cpp - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 10005F5A347465737462626262016D61696E + PrfNames: + - Names: + - _Z4testbbbb + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml index 13a9bce74ab1a..853c5a0edad41 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-general-18.yaml @@ -11,22 +11,106 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 8AC9CB6DFFBEFE9260010000F7C63A91EAF34488EB382E2763226D9301010C010D0D1109151519012121251D2D2D31013D3D413945454930010A2B0B021001010001010107000F010007001B2800040007001B0100080009300D02010302000800090D000D000E301106030002000D000E090013001B090014001530150A02040000140015150019001A30190E0400000019001A05001C018580808008050105002410010100010101070008010007000D2802020007000D3021120102000007000821000C000D302516020000000C000D1D000E008F808080081D000F01241D001300141D0013001928030200130019302D1A010200001300142D0018001930311E0200000018001929001A01858080800829010500241001010001010107000F010007010F2804040007010F0100080009303D22010300000800093D000D000E304126030200000D000E390107000F390008000930452A0204000008000945000D000E30492E040000000D000E3500100185808080083501050024 + CovFun: + - FuncName: _Z4testbbbb + Signature: 0x8844F3EA913AC6F7 + FilenamesRef: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 2 }, { Ref: 5 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 8 } ] + - [ { Ref: 8 }, { Ref: 9 } ] + - [ { Ref: 7 }, { Ref: 11 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Ref: 0 }, { Ref: 15 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Ref: 14 }, { Ref: 17 } ] + - [ { Ref: 17 }, { Ref: 18 } ] + Records: + - { File: 0, dLoc: [ 10, 43, 11, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 27 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 27 ], Decision: { BIdx: 0, NCond: 4 } } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 2 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 4 }, False: { Sub: 1 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 19, 0, 27 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Branch: { True: { Ref: 5 }, False: { Sub: 2 }, MCDC: [ 2, 4, 0 ] } } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Branch: { True: { Ref: 6 }, False: { Sub: 3 }, MCDC: [ 4, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 28, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Decision: { BIdx: 2, NCond: 2 } } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 8 }, False: { Sub: 4 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Ref: 8 } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 9 }, False: { Sub: 5 }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], isGap: true, Ref: 7 } + - { File: 0, dLoc: [ 0, 15, 1, 36 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 20 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 0, dLoc: [ 0, 19, 0, 20 ], Branch: { True: { Ref: 11 }, False: { Sub: 6 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 24, 0, 25 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 24, 0, 25 ], Branch: { True: { Ref: 12 }, False: { Sub: 7 }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 26, 1, 5 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 10 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 1, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 1, 15 ], Decision: { BIdx: 4, NCond: 4 } } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 15 }, False: { Sub: 8 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 16 }, False: { Sub: 9 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 17 }, False: { Sub: 10 }, MCDC: [ 2, 4, 0 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 17 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 18 }, False: { Sub: 11 }, MCDC: [ 4, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 16, 1, 5 ], isGap: true, Ref: 13 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 13 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB130000001800000000000000EB382E2763226D93010100030118010C0210050100011004010001 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp + Expressions: [] + Records: + - { File: 0, dLoc: [ 24, 1, 12, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 5, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 4, 1, 0, 1 ], Skip: { } } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 0000000015000000000000000600000002120000106D6364632D67656E6572616C2E637070000000 + CovMap: + - Version: 6 + FnBlobHash: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 10005F5A347465737462626262016D61696E + PrfNames: + - Names: + - _Z4testbbbb + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-general.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-general.yaml index ceaa04082ef9e..255659f65ac86 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-general.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-general.yaml @@ -11,22 +11,106 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 8AC9CB6DFFBEFE9260010000F7C63A91EAF34488EB382E2763226D9301010C010D0D1109151519012121251D2D2D31013D3D413945454930010A2B0B021001010001010107000F010007001B2807040007001B0100080009300D02010302000800090D000D000E301106030002000D000E090013001B090014001530150A02040000140015150019001A30190E0400000019001A05001C018580808008050105002410010100010101070008010007000D280A020007000D3021120102000007000821000C000D302516020000000C000D1D000E008F808080081D000F01241D001300141D00130019280D0200130019302D1A010200001300142D0018001930311E0200000018001929001A01858080800829010500241001010001010107000F010007010F2812040007010F0100080009303D22010300000800093D000D000E304126030200000D000E390107000F390008000930452A0204000008000945000D000E30492E040000000D000E3500100185808080083501050024 + CovFun: + - FuncName: _Z4testbbbb + Signature: 0x8844F3EA913AC6F7 + FilenamesRef: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp + Expressions: + - [ { Ref: 0 }, { Ref: 3 } ] + - [ { Ref: 3 }, { Ref: 4 } ] + - [ { Ref: 2 }, { Ref: 5 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 0 }, { Ref: 8 } ] + - [ { Ref: 8 }, { Ref: 9 } ] + - [ { Ref: 7 }, { Ref: 11 } ] + - [ { Ref: 11 }, { Ref: 12 } ] + - [ { Ref: 0 }, { Ref: 15 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Ref: 14 }, { Ref: 17 } ] + - [ { Ref: 17 }, { Ref: 18 } ] + Records: + - { File: 0, dLoc: [ 10, 43, 11, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 27 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 27 ], Decision: { BIdx: 7, NCond: 4 } } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 3 }, False: { Sub: 0 }, MCDC: [ 1, 3, 2 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 3 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 4 }, False: { Sub: 1 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 19, 0, 27 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 20, 0, 21 ], Branch: { True: { Ref: 5 }, False: { Sub: 2 }, MCDC: [ 2, 4, 0 ] } } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Branch: { True: { Ref: 6 }, False: { Sub: 3 }, MCDC: [ 4, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 28, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Decision: { BIdx: 10, NCond: 2 } } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 8 }, False: { Sub: 4 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Ref: 8 } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Branch: { True: { Ref: 9 }, False: { Sub: 5 }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 14, 0, 15 ], isGap: true, Ref: 7 } + - { File: 0, dLoc: [ 0, 15, 1, 36 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 20 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Decision: { BIdx: 13, NCond: 2 } } + - { File: 0, dLoc: [ 0, 19, 0, 20 ], Branch: { True: { Ref: 11 }, False: { Sub: 6 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 24, 0, 25 ], Ref: 11 } + - { File: 0, dLoc: [ 0, 24, 0, 25 ], Branch: { True: { Ref: 12 }, False: { Sub: 7 }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 26, 1, 5 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 10 } + - { File: 0, dLoc: [ 1, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 1, 15 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 1, 15 ], Decision: { BIdx: 18, NCond: 4 } } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 15 }, False: { Sub: 8 }, MCDC: [ 1, 3, 0 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 16 }, False: { Sub: 9 }, MCDC: [ 3, 2, 0 ] } } + - { File: 0, dLoc: [ 1, 7, 0, 15 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 8, 0, 9 ], Branch: { True: { Ref: 17 }, False: { Sub: 10 }, MCDC: [ 2, 4, 0 ] } } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 17 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 18 }, False: { Sub: 11 }, MCDC: [ 4, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 16, 1, 5 ], isGap: true, Ref: 13 } + - { File: 0, dLoc: [ 1, 5, 0, 36 ], Ref: 13 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB130000001800000000000000EB382E2763226D93010100030118010C0210050100011004010001 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp + Expressions: [] + Records: + - { File: 0, dLoc: [ 24, 1, 12, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 5, 1, 0, 1 ], Skip: { } } + - { File: 0, dLoc: [ 4, 1, 0, 1 ], Skip: { } } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 0000000015000000000000000600000002120000106D6364632D67656E6572616C2E637070000000 + CovMap: + - Version: 6 + FnBlobHash: 0x936D2263272E38EB + Filenames: + - mcdc-general.cpp - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 10005F5A347465737462626262016D61696E + PrfNames: + - Names: + - _Z4testbbbb + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-macro.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-macro.yaml index 2ff5aeaaac9b3..24847ae952a68 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-macro.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-macro.yaml @@ -11,27 +11,145 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 3A78E0F3B66AACDC090000001800000000000000013BA98035CEA5EE0101000101062C0037 + CovFun: + - FuncName: func1 + Signature: 0x18 + FilenamesRef: 0xEEA5CE3580A93B01 + Filenames: + - mcdc-macro.c + Expressions: [] + Records: + - { File: 0, dLoc: [ 6, 44, 0, 55 ], Ref: 0 } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 7DF4935F4A5A2865CB010000B13C91C439097C05013BA98035CEA5EE0C0101010101010101010101010A0121090D012D013D3D41191D111541455155494D2401083A07020101070008010007000D01000700120100070012010007001728090500070017302102010502000700080C000C000D1400110012090016001730060D02000000160017050018018580808008050105000C0101070008010007000D280C020007000D302D0A010200000700081C000C000D29000E018580808008290105000C01010700080100070014010007002028190600070020303D0E010302000700083D000C00143D000D000E304112030402000D000E240012001339001800202C0019001A39001A001F34001E001F350021018580808008350105000C0321020B000C01000B000C300000050402000B000C0819030B001301000B001E01000B001E301D16040302000B00133C000C000D110017001E30151A0300020017001E4400180019022D020B000C300000020000000B000C0241010B000C30451E040002000B000C0339020B000C39000B000C300000020600000B000C014C040B000C0119010B000C0111010B000C0751030B001339000B001E305522060500000B001354000C000D490017001E304D260500000017001E5C001800190151010B000C0149010B000C + CovFun: + - FuncName: func + Signature: 0x57C0939C4913CB1 + FilenamesRef: 0xEEA5CE3580A93B01 + Filenames: + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + - mcdc-macro.c + Expressions: + - [ { Ref: 0 }, { Ref: 8 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + - [ { Ref: 0 }, { Ref: 11 } ] + - [ { Ref: 0 }, { Ref: 15 } ] + - [ { Ref: 15 }, { Ref: 16 } ] + - [ { Ref: 6 }, { Ref: 7 } ] + - [ { Ref: 4 }, { Ref: 5 } ] + - [ { Ref: 16 }, { Ref: 17 } ] + - [ { Ref: 20 }, { Ref: 21 } ] + - [ { Ref: 18 }, { Ref: 19 } ] + Records: + - { File: 0, dLoc: [ 8, 58, 7, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 18 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 23 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 23 ], Decision: { BIdx: 9, NCond: 5 } } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 8 }, False: { Sub: 0 }, MCDC: [ 1, 5, 2 ] } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Expansion: 1 } + - { File: 0, dLoc: [ 0, 17, 0, 18 ], Expansion: 2 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Ref: 2 } + - { File: 0, dLoc: [ 0, 22, 0, 23 ], Branch: { True: { Sub: 1 }, False: { Ref: 3 }, MCDC: [ 2, 0, 0 ] } } + - { File: 0, dLoc: [ 0, 24, 1, 5 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 1, 5, 0, 12 ], Ref: 1 } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 13 ], Decision: { BIdx: 12, NCond: 2 } } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 11 }, False: { Sub: 2 }, MCDC: [ 1, 2, 0 ] } } + - { File: 0, dLoc: [ 0, 12, 0, 13 ], Expansion: 3 } + - { File: 0, dLoc: [ 0, 14, 1, 5 ], isGap: true, Ref: 10 } + - { File: 0, dLoc: [ 1, 5, 0, 12 ], Ref: 10 } + - { File: 0, dLoc: [ 1, 7, 0, 8 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 20 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 32 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 7, 0, 32 ], Decision: { BIdx: 25, NCond: 6 } } + - { File: 0, dLoc: [ 0, 7, 0, 8 ], Branch: { True: { Ref: 15 }, False: { Sub: 3 }, MCDC: [ 1, 3, 2 ] } } + - { File: 0, dLoc: [ 0, 12, 0, 20 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Ref: 15 } + - { File: 0, dLoc: [ 0, 13, 0, 14 ], Branch: { True: { Ref: 16 }, False: { Sub: 4 }, MCDC: [ 3, 4, 2 ] } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], Expansion: 4 } + - { File: 0, dLoc: [ 0, 24, 0, 32 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 25, 0, 26 ], Expansion: 5 } + - { File: 0, dLoc: [ 0, 26, 0, 31 ], Ref: 14 } + - { File: 0, dLoc: [ 0, 30, 0, 31 ], Expansion: 6 } + - { File: 0, dLoc: [ 0, 33, 1, 5 ], isGap: true, Ref: 13 } + - { File: 0, dLoc: [ 1, 5, 0, 12 ], Ref: 13 } + - { File: 1, dLoc: [ 2, 11, 0, 12 ], Ref: 8 } + - { File: 1, dLoc: [ 0, 11, 0, 12 ], Ref: 0 } + - { File: 1, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 5, 4, 2 ] } } + - { File: 2, dLoc: [ 3, 11, 0, 19 ], Ref: 6 } + - { File: 2, dLoc: [ 0, 11, 0, 30 ], Ref: 0 } + - { File: 2, dLoc: [ 0, 11, 0, 30 ], Ref: 0 } + - { File: 2, dLoc: [ 0, 11, 0, 19 ], Branch: { True: { Ref: 7 }, False: { Sub: 5 }, MCDC: [ 4, 3, 2 ] } } + - { File: 2, dLoc: [ 0, 12, 0, 13 ], Expansion: 7 } + - { File: 2, dLoc: [ 0, 23, 0, 30 ], Ref: 4 } + - { File: 2, dLoc: [ 0, 23, 0, 30 ], Branch: { True: { Ref: 5 }, False: { Sub: 6 }, MCDC: [ 3, 0, 2 ] } } + - { File: 2, dLoc: [ 0, 24, 0, 25 ], Expansion: 8 } + - { File: 3, dLoc: [ 2, 11, 0, 12 ], Ref: 11 } + - { File: 3, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 0, 0 ] } } + - { File: 4, dLoc: [ 1, 11, 0, 12 ], Ref: 16 } + - { File: 4, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Ref: 17 }, False: { Sub: 7 }, MCDC: [ 4, 0, 2 ] } } + - { File: 5, dLoc: [ 2, 11, 0, 12 ], Ref: 14 } + - { File: 5, dLoc: [ 0, 11, 0, 12 ], Ref: 14 } + - { File: 5, dLoc: [ 0, 11, 0, 12 ], Branch: { True: { Zero: { } }, False: { Zero: { } }, MCDC: [ 2, 6, 0 ] } } + - { File: 6, dLoc: [ 4, 11, 0, 12 ], Expansion: 9 } + - { File: 7, dLoc: [ 1, 11, 0, 12 ], Ref: 6 } + - { File: 8, dLoc: [ 1, 11, 0, 12 ], Ref: 4 } + - { File: 9, dLoc: [ 3, 11, 0, 19 ], Ref: 20 } + - { File: 9, dLoc: [ 0, 11, 0, 30 ], Ref: 14 } + - { File: 9, dLoc: [ 0, 11, 0, 19 ], Branch: { True: { Ref: 21 }, False: { Sub: 8 }, MCDC: [ 6, 5, 0 ] } } + - { File: 9, dLoc: [ 0, 12, 0, 13 ], Expansion: 10 } + - { File: 9, dLoc: [ 0, 23, 0, 30 ], Ref: 18 } + - { File: 9, dLoc: [ 0, 23, 0, 30 ], Branch: { True: { Ref: 19 }, False: { Sub: 9 }, MCDC: [ 5, 0, 0 ] } } + - { File: 9, dLoc: [ 0, 24, 0, 25 ], Expansion: 11 } + - { File: 10, dLoc: [ 1, 11, 0, 12 ], Ref: 20 } + - { File: 11, dLoc: [ 1, 11, 0, 12 ], Ref: 18 } - Name: '__llvm_covfun (2)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB090000001800000000000000013BA98035CEA5EE0101000101110C0302 + CovFun: + - FuncName: main + Signature: 0x18 + FilenamesRef: 0xEEA5CE3580A93B01 + Filenames: + - mcdc-macro.c + Expressions: [] + Records: + - { File: 0, dLoc: [ 17, 12, 3, 2 ], Ref: 0 } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 00000000110000000000000006000000020E00000C6D6364632D6D6163726F2E63000000 + CovMap: + - Version: 6 + FnBlobHash: 0xEEA5CE3580A93B01 + Filenames: + - mcdc-macro.c - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 0F0066756E63310166756E63016D61696E + PrfNames: + - Names: + - func1 + - func + - main - Type: SectionHeaderTable Sections: - Name: .strtab diff --git a/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml b/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml index 617ad17fa1008..31c65bb3f7358 100644 --- a/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml +++ b/llvm/test/tools/llvm-cov/Inputs/mcdc-maxbs.yaml @@ -11,22 +11,81 @@ Sections: Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 8A68DC3E925EACF9B1000000C67EFC36662A3548DEBA335F42BD13F502010107010502151519111D1D210109090D1101031003020C0107000C05001A009B8080800805001B0023020024018380808008020103003C02000B0021280A04000B003B02000C0014301506010302000C0014150018002030190A03000200180020110025003B110026002E301D0E0204000026002E1D0032003A3021120400000032003A06010116003001001700212803020017002F30091601020000170021090025002F300D1A0200000025002F + CovFun: + - FuncName: sub + Signature: 0x48352A6636FC7EC6 + FilenamesRef: 0xF513BD425F33BADE + Filenames: + - mcdc-maxbs.c + - mcdc-maxbs.c + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + - [ { Sub: 0 }, { Ref: 5 } ] + - [ { Ref: 5 }, { Ref: 6 } ] + - [ { Ref: 4 }, { Ref: 7 } ] + - [ { Ref: 7 }, { Ref: 8 } ] + - [ { Ref: 0 }, { Ref: 2 } ] + - [ { Ref: 2 }, { Ref: 3 } ] + Records: + - { File: 0, dLoc: [ 3, 16, 3, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 7, 0, 12 ], Expansion: 1 } + - { File: 0, dLoc: [ 0, 26, 0, 27 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 27, 0, 35 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 36, 1, 3 ], isGap: true, Sub: 0 } + - { File: 0, dLoc: [ 1, 3, 0, 60 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 11, 0, 33 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 11, 0, 59 ], Decision: { BIdx: 10, NCond: 4 } } + - { File: 0, dLoc: [ 0, 12, 0, 20 ], Sub: 0 } + - { File: 0, dLoc: [ 0, 12, 0, 20 ], Branch: { True: { Ref: 5 }, False: { Sub: 1 }, MCDC: [ 1, 3, 2 ] } } + - { File: 0, dLoc: [ 0, 24, 0, 32 ], Ref: 5 } + - { File: 0, dLoc: [ 0, 24, 0, 32 ], Branch: { True: { Ref: 6 }, False: { Sub: 2 }, MCDC: [ 3, 0, 2 ] } } + - { File: 0, dLoc: [ 0, 37, 0, 59 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 38, 0, 46 ], Ref: 4 } + - { File: 0, dLoc: [ 0, 38, 0, 46 ], Branch: { True: { Ref: 7 }, False: { Sub: 3 }, MCDC: [ 2, 4, 0 ] } } + - { File: 0, dLoc: [ 0, 50, 0, 58 ], Ref: 7 } + - { File: 0, dLoc: [ 0, 50, 0, 58 ], Branch: { True: { Ref: 8 }, False: { Sub: 4 }, MCDC: [ 4, 0, 0 ] } } + - { File: 1, dLoc: [ 1, 22, 0, 48 ], Ref: 0 } + - { File: 1, dLoc: [ 0, 23, 0, 33 ], Ref: 0 } + - { File: 1, dLoc: [ 0, 23, 0, 47 ], Decision: { BIdx: 3, NCond: 2 } } + - { File: 1, dLoc: [ 0, 23, 0, 33 ], Branch: { True: { Ref: 2 }, False: { Sub: 5 }, MCDC: [ 1, 2, 0 ] } } + - { File: 1, dLoc: [ 0, 37, 0, 47 ], Ref: 2 } + - { File: 1, dLoc: [ 0, 37, 0, 47 ], Branch: { True: { Ref: 3 }, False: { Sub: 6 }, MCDC: [ 2, 0, 0 ] } } - Name: '__llvm_covfun (1)' Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: FAD58DE7366495DB2A0000005C83010000000000DEBA335F42BD13F5010101010506010B01020201010B0010200502000B0010050012009380808008050013001902001C001D + CovFun: + - FuncName: main + Signature: 0x1835C + FilenamesRef: 0xF513BD425F33BADE + Filenames: + - mcdc-maxbs.c + Expressions: + - [ { Ref: 0 }, { Ref: 1 } ] + Records: + - { File: 0, dLoc: [ 11, 1, 2, 2 ], Ref: 0 } + - { File: 0, dLoc: [ 1, 11, 0, 16 ], Ref: 0 } + - { File: 0, dLoc: [ 0, 11, 0, 16 ], Branch: { True: { Ref: 1 }, False: { Sub: 0 } } } + - { File: 0, dLoc: [ 0, 18, 0, 19 ], isGap: true, Ref: 1 } + - { File: 0, dLoc: [ 0, 19, 0, 25 ], Ref: 1 } + - { File: 0, dLoc: [ 0, 28, 0, 29 ], Sub: 0 } - Name: __llvm_covmap Type: SHT_PROGBITS Flags: [ SHF_GNU_RETAIN ] AddressAlign: 0x8 - Content: 00000000110000000000000006000000020E00000C6D6364632D6D617862732E63000000 + CovMap: + - Version: 6 + FnBlobHash: 0xF513BD425F33BADE + Filenames: + - mcdc-maxbs.c - Name: __llvm_prf_names Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_GNU_RETAIN ] AddressAlign: 0x1 - Content: 0800737562016D61696E + PrfNames: + - Names: + - sub + - main - Type: SectionHeaderTable Sections: - Name: .strtab