Index: include/llvm/ADT/StringExtras.h =================================================================== --- include/llvm/ADT/StringExtras.h +++ include/llvm/ADT/StringExtras.h @@ -16,6 +16,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/xxhash.h" #include namespace llvm { @@ -121,15 +122,12 @@ /// HashString - Hash function for strings. /// -/// This is the Bernstein hash function. -// -// FIXME: Investigate whether a modified bernstein hash function performs -// better: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx -// X*33+c -> X*33^c -static inline unsigned HashString(StringRef Str, unsigned Result = 0) { - for (StringRef::size_type i = 0, e = Str.size(); i != e; ++i) - Result = Result * 33 + (unsigned char)Str[i]; - return Result; +/// Just fall back on xxHash64. Yes we drop the high bits on platforms where +/// unsigned == 4 bytes (which includes amd64), but xxHash64 already has good +/// avalanching, so we wouldn't gain much if anything. +static inline unsigned HashString(StringRef Str, unsigned Seed = 0) +{ + return xxHash64(Str, Seed); } /// Returns the English suffix for an ordinal integer (-st, -nd, -rd, -th). Index: include/llvm/Support/xxhash.h =================================================================== --- include/llvm/Support/xxhash.h +++ include/llvm/Support/xxhash.h @@ -41,7 +41,7 @@ #include "llvm/ADT/StringRef.h" namespace llvm { -uint64_t xxHash64(llvm::StringRef Data); +uint64_t xxHash64(llvm::StringRef Data, uint64_t Seed = 0); } #endif Index: lib/Support/xxhash.cpp =================================================================== --- lib/Support/xxhash.cpp +++ lib/Support/xxhash.cpp @@ -68,9 +68,8 @@ return Acc; } -uint64_t llvm::xxHash64(StringRef Data) { +uint64_t llvm::xxHash64(StringRef Data, uint64_t Seed) { size_t Len = Data.size(); - uint64_t Seed = 0; const char *P = Data.data(); const char *const BEnd = P + Len; uint64_t H64; Index: test/DebugInfo/Generic/accel-table-hash-collisions.ll =================================================================== --- test/DebugInfo/Generic/accel-table-hash-collisions.ll +++ test/DebugInfo/Generic/accel-table-hash-collisions.ll @@ -27,12 +27,12 @@ ; Check that all the names are present in the output ; CHECK: Hash = 0x00597841 -; CHECK: Name: {{[0-9a-f]*}} "is" ; CHECK: Name: {{[0-9a-f]*}} "k1" +; CHECK: Name: {{[0-9a-f]*}} "is" ; CHECK: Hash = 0xa4b42a1e -; CHECK: Name: {{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE" ; CHECK: Name: {{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv" +; CHECK: Name: {{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE" ; CHECK: Hash = 0xeee7c0b2 ; CHECK: Name: {{[0-9a-f]*}} "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE" Index: test/DebugInfo/PDB/pdbdump-headers.test =================================================================== --- test/DebugInfo/PDB/pdbdump-headers.test +++ test/DebugInfo/PDB/pdbdump-headers.test @@ -73,8 +73,8 @@ ; EMPTY-NEXT: Guid: {0B355641-86A0-A249-896F-9988FAE52FF0} ; EMPTY-NEXT: Features: 0x1 ; EMPTY-NEXT: Named Streams { -; EMPTY-NEXT: /names: 13 ; EMPTY-NEXT: /LinkInfo: 5 +; EMPTY-NEXT: /names: 13 ; EMPTY-NEXT: /src/headerblock: 9 ; EMPTY-NEXT: } ; EMPTY-NEXT: } @@ -1837,8 +1837,8 @@ ; BIG-NEXT: Guid: {880ECC89-DF81-0B4F-839C-58CBD052E937} ; BIG-NEXT: Features: 0x1 ; BIG-NEXT: Named Streams { -; BIG-NEXT: /names: 13 ; BIG-NEXT: /LinkInfo: 5 +; BIG-NEXT: /names: 13 ; BIG-NEXT: /src/headerblock: 61 ; BIG-NEXT: } ; BIG-NEXT: } Index: test/DebugInfo/X86/gnu-public-names.ll =================================================================== --- test/DebugInfo/X86/gnu-public-names.ll +++ test/DebugInfo/X86/gnu-public-names.ll @@ -66,6 +66,7 @@ ; ASM: .section .debug_gnu_pubnames ; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL +; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL ; ASM-NEXT: .asciz "global_variable" # External Name ; ASM: .section .debug_gnu_pubtypes @@ -197,27 +198,29 @@ ; CHECK-LABEL: .debug_gnu_pubnames contents: ; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} ; CHECK-NEXT: Offset Linkage Kind Name +; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b" +; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function" +; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer" +; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable" +; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable" +; CHECK-NEXT: EXTERNAL FUNCTION "f7" +; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)" ; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function" +; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function" ; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns" +; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)" ; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c" +; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d" +; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function" +; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable" ; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i" +; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner" +; CHECK-NEXT: EXTERNAL FUNCTION "f3" ; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and ; comes out naturally from LLVM's implementation, so I'm OK with it for now. If ; it's demonstrated that this is a major size concern or degrades debug info ; consumer behavior, feel free to change it. ; CHECK-NEXT: [[F3_Z]] STATIC VARIABLE "f3::z" -; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)" -; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)" -; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b" -; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer" -; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function" -; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable" -; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable" -; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner" -; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d" -; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function" -; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable" -; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function" ; CHECK-LABEL: debug_gnu_pubtypes contents: ; CHECK: Offset Linkage Kind Name Index: test/tools/llvm-cov/Inputs/test_long_file_names.output =================================================================== --- test/tools/llvm-cov/Inputs/test_long_file_names.output +++ test/tools/llvm-cov/Inputs/test_long_file_names.output @@ -1,8 +1,8 @@ -File 'srcdir/./nested_dir/../test.h' -Lines executed:100.00% of 1 -srcdir/./nested_dir/../test.h:creating 'test_paths.cpp##test.h.gcov' - File 'srcdir/./nested_dir/../test.cpp' Lines executed:84.21% of 38 srcdir/./nested_dir/../test.cpp:creating 'test_paths.cpp##test.cpp.gcov' +File 'srcdir/./nested_dir/../test.h' +Lines executed:100.00% of 1 +srcdir/./nested_dir/../test.h:creating 'test_paths.cpp##test.h.gcov' + Index: test/tools/llvm-cov/Inputs/test_long_paths.output =================================================================== --- test/tools/llvm-cov/Inputs/test_long_paths.output +++ test/tools/llvm-cov/Inputs/test_long_paths.output @@ -1,8 +1,8 @@ -File 'srcdir/./nested_dir/../test.h' -Lines executed:100.00% of 1 -srcdir/./nested_dir/../test.h:creating 'srcdir#^#test_paths.cpp##srcdir#nested_dir#^#test.h.gcov' - File 'srcdir/./nested_dir/../test.cpp' Lines executed:84.21% of 38 srcdir/./nested_dir/../test.cpp:creating 'srcdir#^#test_paths.cpp##srcdir#nested_dir#^#test.cpp.gcov' +File 'srcdir/./nested_dir/../test.h' +Lines executed:100.00% of 1 +srcdir/./nested_dir/../test.h:creating 'srcdir#^#test_paths.cpp##srcdir#nested_dir#^#test.h.gcov' + Index: test/tools/llvm-cov/Inputs/test_missing.output =================================================================== --- test/tools/llvm-cov/Inputs/test_missing.output +++ test/tools/llvm-cov/Inputs/test_missing.output @@ -1,8 +1,8 @@ -File 'srcdir/./nested_dir/../test.h' -Lines executed:100.00% of 1 -srcdir/./nested_dir/../test.h:creating 'test.h.gcov' - File 'srcdir/./nested_dir/../test.cpp' Lines executed:84.21% of 38 srcdir/./nested_dir/../test.cpp:creating 'test.cpp.gcov' +File 'srcdir/./nested_dir/../test.h' +Lines executed:100.00% of 1 +srcdir/./nested_dir/../test.h:creating 'test.h.gcov' + Index: test/tools/llvm-cov/Inputs/test_no_preserve_paths.output =================================================================== --- test/tools/llvm-cov/Inputs/test_no_preserve_paths.output +++ test/tools/llvm-cov/Inputs/test_no_preserve_paths.output @@ -1,8 +1,8 @@ -File 'srcdir/./nested_dir/../test.h' -Lines executed:100.00% of 1 -srcdir/./nested_dir/../test.h:creating 'test.h.gcov' - File 'srcdir/./nested_dir/../test.cpp' Lines executed:84.21% of 38 srcdir/./nested_dir/../test.cpp:creating 'test.cpp.gcov' +File 'srcdir/./nested_dir/../test.h' +Lines executed:100.00% of 1 +srcdir/./nested_dir/../test.h:creating 'test.h.gcov' + Index: test/tools/llvm-cov/Inputs/test_preserve_paths.output =================================================================== --- test/tools/llvm-cov/Inputs/test_preserve_paths.output +++ test/tools/llvm-cov/Inputs/test_preserve_paths.output @@ -1,8 +1,8 @@ -File 'srcdir/./nested_dir/../test.h' -Lines executed:100.00% of 1 -srcdir/./nested_dir/../test.h:creating 'srcdir#nested_dir#^#test.h.gcov' - File 'srcdir/./nested_dir/../test.cpp' Lines executed:84.21% of 38 srcdir/./nested_dir/../test.cpp:creating 'srcdir#nested_dir#^#test.cpp.gcov' +File 'srcdir/./nested_dir/../test.h' +Lines executed:100.00% of 1 +srcdir/./nested_dir/../test.h:creating 'srcdir#nested_dir#^#test.h.gcov' + Index: test/tools/llvm-profdata/overflow-sample.test =================================================================== --- test/tools/llvm-profdata/overflow-sample.test +++ test/tools/llvm-profdata/overflow-sample.test @@ -4,20 +4,20 @@ RUN: llvm-profdata merge -sample %p/Inputs/overflow-sample.proftext %p/Inputs/overflow-sample.proftext -o %t.out 2>&1 | FileCheck %s -check-prefix=MERGE_OVERFLOW RUN: llvm-profdata show -sample %t.out | FileCheck %s --check-prefix=SHOW_OVERFLOW MERGE_OVERFLOW: {{.*}}: main: Counter overflow -SHOW_OVERFLOW: Function: main: 2000, 0, 2 sampled lines +SHOW_OVERFLOW: Function: _Z3fooi: 18446744073709551615, 2000, 1 sampled lines SHOW_OVERFLOW-NEXT: Samples collected in the function's body { -SHOW_OVERFLOW-NEXT: 1: 1000, calls: _Z3bari:18446744073709551615 -SHOW_OVERFLOW-NEXT: 2: 1000, calls: _Z3fooi:18446744073709551615 +SHOW_OVERFLOW-NEXT: 1: 18446744073709551615 SHOW_OVERFLOW-NEXT: } SHOW_OVERFLOW-NEXT: No inlined callsites in this function -SHOW_OVERFLOW-NEXT: Function: _Z3fooi: 18446744073709551615, 2000, 1 sampled lines +SHOW_OVERFLOW-NEXT: Function: _Z3bari: 18446744073709551615, 2000, 1 sampled lines SHOW_OVERFLOW-NEXT: Samples collected in the function's body { SHOW_OVERFLOW-NEXT: 1: 18446744073709551615 SHOW_OVERFLOW-NEXT: } SHOW_OVERFLOW-NEXT: No inlined callsites in this function -SHOW_OVERFLOW-NEXT: Function: _Z3bari: 18446744073709551615, 2000, 1 sampled lines +SHOW_OVERFLOW-NEXT: Function: main: 2000, 0, 2 sampled lines SHOW_OVERFLOW-NEXT: Samples collected in the function's body { -SHOW_OVERFLOW-NEXT: 1: 18446744073709551615 +SHOW_OVERFLOW-NEXT: 1: 1000, calls: _Z3bari:18446744073709551615 +SHOW_OVERFLOW-NEXT: 2: 1000, calls: _Z3fooi:18446744073709551615 SHOW_OVERFLOW-NEXT: } SHOW_OVERFLOW-NEXT: No inlined callsites in this function @@ -25,19 +25,19 @@ RUN: llvm-profdata merge -sample %p/Inputs/overflow-sample.proftext -o %t.out 2>&1 | FileCheck %s -allow-empty -check-prefix=MERGE_NO_OVERFLOW RUN: llvm-profdata show -sample %t.out | FileCheck %s --check-prefix=SHOW_NO_OVERFLOW MERGE_NO_OVERFLOW-NOT: {{.*}}: main: Counter overflow -SHOW_NO_OVERFLOW: Function: main: 1000, 0, 2 sampled lines +SHOW_NO_OVERFLOW: Function: _Z3fooi: 18446744073709551615, 1000, 1 sampled lines SHOW_NO_OVERFLOW-NEXT: Samples collected in the function's body { -SHOW_NO_OVERFLOW-NEXT: 1: 500, calls: _Z3bari:18446744073709551615 -SHOW_NO_OVERFLOW-NEXT: 2: 500, calls: _Z3fooi:18446744073709551615 +SHOW_NO_OVERFLOW-NEXT: 1: 18446744073709551615 SHOW_NO_OVERFLOW-NEXT: } SHOW_NO_OVERFLOW-NEXT: No inlined callsites in this function -SHOW_NO_OVERFLOW-NEXT: Function: _Z3fooi: 18446744073709551615, 1000, 1 sampled lines +SHOW_NO_OVERFLOW-NEXT: Function: _Z3bari: 18446744073709551615, 1000, 1 sampled lines SHOW_NO_OVERFLOW-NEXT: Samples collected in the function's body { SHOW_NO_OVERFLOW-NEXT: 1: 18446744073709551615 SHOW_NO_OVERFLOW-NEXT: } SHOW_NO_OVERFLOW-NEXT: No inlined callsites in this function -SHOW_NO_OVERFLOW-NEXT: Function: _Z3bari: 18446744073709551615, 1000, 1 sampled lines +SHOW_NO_OVERFLOW-NEXT: Function: main: 1000, 0, 2 sampled lines SHOW_NO_OVERFLOW-NEXT: Samples collected in the function's body { -SHOW_NO_OVERFLOW-NEXT: 1: 18446744073709551615 +SHOW_NO_OVERFLOW-NEXT: 1: 500, calls: _Z3bari:18446744073709551615 +SHOW_NO_OVERFLOW-NEXT: 2: 500, calls: _Z3fooi:18446744073709551615 SHOW_NO_OVERFLOW-NEXT: } SHOW_NO_OVERFLOW-NEXT: No inlined callsites in this function Index: test/tools/llvm-profdata/sample-profile-basic.test =================================================================== --- test/tools/llvm-profdata/sample-profile-basic.test +++ test/tools/llvm-profdata/sample-profile-basic.test @@ -2,11 +2,11 @@ 1- Show all functions RUN: llvm-profdata show --sample %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=SHOW1 -SHOW1: Function: main: 184019, 0, 7 sampled lines -SHOW1: 9: 2064, calls: _Z3fooi:631 _Z3bari:1471 SHOW1: Function: _Z3fooi: 7711, 610, 1 sampled lines SHOW1: Function: _Z3bari: 20301, 1437, 1 sampled lines SHOW1: 1: 1437 +SHOW1: Function: main: 184019, 0, 7 sampled lines +SHOW1: 9: 2064, calls: _Z3fooi:631 _Z3bari:1471 2- Show only bar RUN: llvm-profdata show --sample --function=_Z3bari %p/Inputs/sample-profile.proftext | FileCheck %s --check-prefix=SHOW2 @@ -25,9 +25,9 @@ counters have doubled. RUN: llvm-profdata merge --sample %p/Inputs/sample-profile.proftext -o %t-binprof RUN: llvm-profdata merge --sample --text %p/Inputs/sample-profile.proftext %t-binprof -o - | FileCheck %s --check-prefix=MERGE1 +MERGE1: _Z3fooi:15422:1220 MERGE1: main:368038:0 MERGE1: 9: 4128 _Z3fooi:1262 _Z3bari:2942 -MERGE1: _Z3fooi:15422:1220 5- Detect invalid text encoding (e.g. instrumentation profile text format). RUN: not llvm-profdata show --sample %p/Inputs/foo3bar3-1.proftext 2>&1 | FileCheck %s --check-prefix=BADTEXT Index: test/tools/llvm-profdata/weight-sample.test =================================================================== --- test/tools/llvm-profdata/weight-sample.test +++ test/tools/llvm-profdata/weight-sample.test @@ -3,15 +3,7 @@ 1- Merge the foo and bar profiles with unity weight and verify the combined output RUN: llvm-profdata merge -sample -text -weighted-input=1,%p/Inputs/weight-sample-bar.proftext -weighted-input=1,%p/Inputs/weight-sample-foo.proftext -o - | FileCheck %s -check-prefix=1X_1X_WEIGHT RUN: llvm-profdata merge -sample -text -weighted-input=1,%p/Inputs/weight-sample-bar.proftext %p/Inputs/weight-sample-foo.proftext -o - | FileCheck %s -check-prefix=1X_1X_WEIGHT -1X_1X_WEIGHT: foo:1763288:35327 -1X_1X_WEIGHT-NEXT: 7: 35327 -1X_1X_WEIGHT-NEXT: 8: 35327 -1X_1X_WEIGHT-NEXT: 9: 6930 -1X_1X_WEIGHT-NEXT: 10: 29341 -1X_1X_WEIGHT-NEXT: 11: 11906 -1X_1X_WEIGHT-NEXT: 13: 18185 foo:19531 -1X_1X_WEIGHT-NEXT: 15: 36458 -1X_1X_WEIGHT-NEXT: bar:1772037:35370 +1X_1X_WEIGHT: bar:1772037:35370 1X_1X_WEIGHT-NEXT: 17: 35370 1X_1X_WEIGHT-NEXT: 18: 35370 1X_1X_WEIGHT-NEXT: 19: 7005 @@ -19,18 +11,18 @@ 1X_1X_WEIGHT-NEXT: 21: 12170 1X_1X_WEIGHT-NEXT: 23: 18150 bar:19829 1X_1X_WEIGHT-NEXT: 25: 36666 +1X_1X_WEIGHT-NEXT: foo:1763288:35327 +1X_1X_WEIGHT-NEXT: 7: 35327 +1X_1X_WEIGHT-NEXT: 8: 35327 +1X_1X_WEIGHT-NEXT: 9: 6930 +1X_1X_WEIGHT-NEXT: 10: 29341 +1X_1X_WEIGHT-NEXT: 11: 11906 +1X_1X_WEIGHT-NEXT: 13: 18185 foo:19531 +1X_1X_WEIGHT-NEXT: 15: 36458 2- Merge the foo and bar profiles with weight 3x and 5x respectively and verify the combined output RUN: llvm-profdata merge -sample -text -weighted-input=3,%p/Inputs/weight-sample-bar.proftext -weighted-input=5,%p/Inputs/weight-sample-foo.proftext -o - | FileCheck %s -check-prefix=3X_5X_WEIGHT -3X_5X_WEIGHT: foo:8816440:176635 -3X_5X_WEIGHT-NEXT: 7: 176635 -3X_5X_WEIGHT-NEXT: 8: 176635 -3X_5X_WEIGHT-NEXT: 9: 34650 -3X_5X_WEIGHT-NEXT: 10: 146705 -3X_5X_WEIGHT-NEXT: 11: 59530 -3X_5X_WEIGHT-NEXT: 13: 90925 foo:97655 -3X_5X_WEIGHT-NEXT: 15: 182290 -3X_5X_WEIGHT-NEXT: bar:5316111:106110 +3X_5X_WEIGHT: bar:5316111:106110 3X_5X_WEIGHT-NEXT: 17: 106110 3X_5X_WEIGHT-NEXT: 18: 106110 3X_5X_WEIGHT-NEXT: 19: 21015 @@ -38,6 +30,14 @@ 3X_5X_WEIGHT-NEXT: 21: 36510 3X_5X_WEIGHT-NEXT: 23: 54450 bar:59487 3X_5X_WEIGHT-NEXT: 25: 109998 +3X_5X_WEIGHT-NEXT: foo:8816440:176635 +3X_5X_WEIGHT-NEXT: 7: 176635 +3X_5X_WEIGHT-NEXT: 8: 176635 +3X_5X_WEIGHT-NEXT: 9: 34650 +3X_5X_WEIGHT-NEXT: 10: 146705 +3X_5X_WEIGHT-NEXT: 11: 59530 +3X_5X_WEIGHT-NEXT: 13: 90925 foo:97655 +3X_5X_WEIGHT-NEXT: 15: 182290 3- Bad merge: invalid weight RUN: not llvm-profdata merge -sample -weighted-input=3,%p/Inputs/weight-sample-bar.proftext -weighted-input=0,%p/Inputs/weight-sample-foo.proftext -o %t.out 2>&1 | FileCheck %s -check-prefix=INVALID_WEIGHT