llvm-project/llvm/test/tools/llvm-profdata/sample-empty-lines.test
William Huang 84719e2f03 [llvm-profdata] Fix bug llvm-profdata crashes when reading a text sample profile with an empty line with spaces.
Text editors can introduce spaces aligning the previous line's indentation. This crashes llvm-profdata. Added check to handle this case.

Reviewed By: snehasish

Differential Revision: https://reviews.llvm.org/D143369
2023-02-06 22:29:20 +00:00

9 lines
262 B
Plaintext

Test llvm-profdata merge can handle empty line with spaces in text format sample profile.
RUN: llvm-profdata merge --sample --text %p/Inputs/sample-empty-lines.proftext | FileCheck %s
CHECK: main:10:1
CHECK-NEXT: 2: 3
CHECK-NEXT: 3: inline1:5
CHECK-NEXT: 4: 1