File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ Fingerprint Fingerprint::fromString(StringRef value) {
41
41
std::istringstream s (value.drop_front (Fingerprint::DIGEST_LENGTH/2 ).str ());
42
42
s >> std::hex >> fp.core .second ;
43
43
}
44
+ if (value != fp.getRawValue ()) {
45
+ llvm::errs () << " Fingerprint conversion failed; perhaps '" << value << " ' is not a hex number" ;
46
+ llvm::errs ().flush ();
47
+ exit (1 );
48
+ }
44
49
return fp;
45
50
}
46
51
@@ -49,6 +54,5 @@ llvm::SmallString<Fingerprint::DIGEST_LENGTH> Fingerprint::getRawValue() const {
49
54
llvm::raw_svector_ostream Res (Str);
50
55
Res << llvm::format_hex_no_prefix (core.first , 16 );
51
56
Res << llvm::format_hex_no_prefix (core.second , 16 );
52
- assert (*this == Fingerprint::fromString (Str));
53
57
return Str;
54
58
}
You can’t perform that action at this time.
0 commit comments