summaryrefslogtreecommitdiff
path: root/willow/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'willow/lib/IR/Verifier.cpp')
-rw-r--r--willow/lib/IR/Verifier.cpp10
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