Skip to content

Commit ddd087b

Browse files
bors[bot]philberty
andauthored
Merge #1003
1003: Add more intrinsics and refactor how we implement them r=philberty a=philberty This patch series implements: 1. offset 2. size_of 3. unreachable 4. abort It removes the GCC wrapper mappings to make them much easier to implement. It also demonstrates in single commits the implementation of each of these intrinsic to make it easy to follow in how we implement them. Addresses #658 #849 Co-authored-by: Philip Herron <[email protected]>
2 parents 1f4e2de + f057445 commit ddd087b

13 files changed

+439
-172
lines changed

gcc/rust/backend/rust-compile-fnparam.h

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ class CompileFnParam : public HIRCompileBase, public HIR::HIRPatternVisitor
3636
return compiler.compiled_param;
3737
}
3838

39+
static Bvariable *compile (Context *ctx, tree fndecl, HIR::Pattern *param,
40+
tree decl_type, Location locus)
41+
{
42+
CompileFnParam compiler (ctx, fndecl, decl_type, locus);
43+
param->accept_vis (compiler);
44+
return compiler.compiled_param;
45+
}
46+
3947
void visit (HIR::IdentifierPattern &pattern) override
4048
{
4149
if (!pattern.is_mut ())

0 commit comments

Comments
 (0)