init the function name for this cfg builder.
(&mut self, ast: &ast::Node)
| 533 | impl CFGBuilder { |
| 534 | /// init the function name for this cfg builder. |
| 535 | pub fn init_from_ast(&mut self, ast: &ast::Node) -> Result<()> { |
| 536 | if let ast::Clang::FunctionDecl(fd) = &ast.kind { |
| 537 | self.name = Some(fd.get_name()); |
| 538 | return Ok(()); |
| 539 | } |
| 540 | eyre::bail!("expect FunctionDecl, receive: {ast:?}"); |
| 541 | } |
| 542 | |
| 543 | /// get a builder starts with block_id. |
| 544 | pub fn from_block_id(block_id: usize) -> Self { |