Add public_headers to the IR
These will be needed by the generated C++ code.
PiperOrigin-RevId: 391729880
diff --git a/rs_bindings_from_cc/ir_test.cc b/rs_bindings_from_cc/ir_test.cc
index e6649ea..81209ef 100644
--- a/rs_bindings_from_cc/ir_test.cc
+++ b/rs_bindings_from_cc/ir_test.cc
@@ -22,6 +22,7 @@
TEST(IrTest, TestIR) {
nlohmann::json expected = nlohmann::json::parse(
R"j({
+ "used_headers": [{ "name": "foo/bar.h" }],
"functions": [{
"identifier": { "identifier": "hello_world" },
"mangled_name": "#$mangled_name$#",
@@ -34,7 +35,8 @@
]
}]
})j");
- EXPECT_EQ(IR({Func(Identifier(absl::Cord("hello_world")),
+ EXPECT_EQ(IR({HeaderName(absl::Cord("foo/bar.h"))},
+ {Func(Identifier(absl::Cord("hello_world")),
absl::Cord("#$mangled_name$#"), Type(absl::Cord("i32")),
{FuncParam(Type(absl::Cord("i32")),
Identifier(absl::Cord("arg")))})})