diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2026-02-19 18:45:44 -0500 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2026-02-19 18:45:44 -0500 |
| commit | af3d0ad1926eb825f64152cf217fc9a4777f0be3 (patch) | |
| tree | 8d7f73ce6c3c89863418382d8d553a06c668bbb3 /willow/lib/IR/Verifier.cpp | |
| parent | d11fbc8268f5775ad783f8570478daad4a9e81cf (diff) | |
| download | compiler-more-tests.tar.gz | |
[willow]: more cleanup, testsmore-tests
Diffstat (limited to 'willow/lib/IR/Verifier.cpp')
| -rw-r--r-- | willow/lib/IR/Verifier.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/willow/lib/IR/Verifier.cpp b/willow/lib/IR/Verifier.cpp index b622f10..125f7bc 100644 --- a/willow/lib/IR/Verifier.cpp +++ b/willow/lib/IR/Verifier.cpp @@ -8,6 +8,7 @@ namespace willow { +namespace { /// Verify that an instruction defines an SSA result LogicalResult verifyResult(const Instruction &inst, DiagnosticEngine &diags); /// Verify that an instruction does not define an ssa result @@ -18,9 +19,9 @@ LogicalResult verifyNumOperands(const Instruction &inst, DiagnosticEngine &diags, std::size_t expected); /// Verify operand type -LogicalResult expectOperandType(const Instruction &inst, - DiagnosticEngine &diags, std::size_t opidx, - Type expected); +// LogicalResult expectOperandType(const Instruction &inst, +// DiagnosticEngine &diags, std::size_t opidx, +// Type expected); LogicalResult expectOperandType(const Instruction &inst, DiagnosticEngine &diags, const Value *operand, Type expected); @@ -31,6 +32,7 @@ LogicalResult expectResultType(const Instruction &inst, DiagnosticEngine &diags, LogicalResult verifyBinaryIntegerInst(const Instruction &, DiagnosticEngine &); LogicalResult verifyBinaryIntegerCmp(WillowContext &ctx, const Instruction &, DiagnosticEngine &); +} LogicalResult verifyModule(WillowContext &ctx, const Module &module, DiagnosticEngine &diags) { @@ -282,6 +284,7 @@ LogicalResult verifyInst(WillowContext &ctx, const Instruction &inst, return success(); } +namespace { LogicalResult verifyBinaryIntegerInst(const Instruction &inst, DiagnosticEngine &diags) { Type ty = inst.getType(); @@ -402,5 +405,6 @@ LogicalResult expectResultType(const Instruction &inst, DiagnosticEngine &diags, return emit(diags, Severity::Error) << std::format( "unexpected result type: expected '{}', found '{}'", expected, ty); } +} } // namespace willow |