File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
test/Analysis/StructuralHash Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 14
14
#include " llvm/Analysis/StructuralHash.h"
15
15
#include " llvm/IR/Module.h"
16
16
#include " llvm/IR/StructuralHash.h"
17
- #include " llvm/Support/CommandLine .h"
17
+ #include " llvm/Support/Format .h"
18
18
19
19
using namespace llvm ;
20
20
21
21
PreservedAnalyses StructuralHashPrinterPass::run (Module &M,
22
22
ModuleAnalysisManager &MAM) {
23
23
OS << " Module Hash: "
24
- << Twine::utohexstr ( StructuralHash (M, EnableDetailedStructuralHash))
24
+ << format ( " %016 " PRIx64, StructuralHash (M, EnableDetailedStructuralHash))
25
25
<< " \n " ;
26
26
for (Function &F : M) {
27
27
if (F.isDeclaration ())
28
28
continue ;
29
29
OS << " Function " << F.getName () << " Hash: "
30
- << Twine::utohexstr ( StructuralHash (F, EnableDetailedStructuralHash))
30
+ << format ( " %016 " PRIx64, StructuralHash (F, EnableDetailedStructuralHash))
31
31
<< " \n " ;
32
32
}
33
33
return PreservedAnalyses::all ();
Original file line number Diff line number Diff line change @@ -14,12 +14,11 @@ define i32 @f2(i32 %a) {
14
14
ret i32 %b
15
15
}
16
16
17
- ; CHECK: Module Hash: {{([a-z0 -9]{14 ,})}}
18
- ; CHECK-NEXT: Function f1 Hash: [[F1H:([a-z0 -9]{14 ,})]]
17
+ ; CHECK: Module Hash: {{([a-f0 -9]{16 ,})}}
18
+ ; CHECK-NEXT: Function f1 Hash: [[F1H:([a-f0 -9]{16 ,})]]
19
19
; CHECK-NEXT: Function f2 Hash: [[F1H]]
20
20
21
- ; DETAILED-HASH: Module Hash: {{([a-z0 -9]{14 ,})}}
22
- ; DETAILED-HASH-NEXT: Function f1 Hash: [[DF1H:([a-z0 -9]{14 ,})]]
21
+ ; DETAILED-HASH: Module Hash: {{([a-f0 -9]{16 ,})}}
22
+ ; DETAILED-HASH-NEXT: Function f1 Hash: [[DF1H:([a-f0 -9]{16 ,})]]
23
23
; DETAILED-HASH-NOT: [[DF1H]]
24
- ; DETAILED-HASH-NEXT: Function f2 Hash: {{([a-z0-9]{14,})}}
25
-
24
+ ; DETAILED-HASH-NEXT: Function f2 Hash: {{([a-f0-9]{16,})}}
You can’t perform that action at this time.
0 commit comments