blob: 61098c0fe7ed74aac9a059b0817aaeead3380c2b [file] [log] [blame]
Brian Silverman4e662aa2022-05-11 23:10:19 -07001// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use std::panic::UnwindSafe;
10
11use crate::RebuildDependencyRecorder;
12use autocxx_bindgen::callbacks::ParseCallbacks;
13
14#[derive(Debug)]
15pub(crate) struct AutocxxParseCallbacks(pub(crate) Box<dyn RebuildDependencyRecorder>);
16
17impl UnwindSafe for AutocxxParseCallbacks {}
18
19impl ParseCallbacks for AutocxxParseCallbacks {
20 fn include_file(&self, filename: &str) {
21 self.0.record_header_file_dependency(filename);
22 }
23}