Don't include block.h from expop.h

expop.h needs block.h for a single inline function.  However, I don't
think most of the check_objfile functions need to be defined in the
header (just the templates).  This patch moves the one offending
function and removes the include.
This commit is contained in:
Tom Tromey
2023-01-21 14:00:05 -07:00
parent b885aea1bb
commit 0671cc8b19
2 changed files with 8 additions and 6 deletions

View File

@@ -20,7 +20,6 @@
#ifndef EXPOP_H
#define EXPOP_H
#include "block.h"
#include "c-lang.h"
#include "cp-abi.h"
#include "expression.h"
@@ -229,11 +228,8 @@ check_objfile (struct symbol *sym, struct objfile *objfile)
return check_objfile (sym->objfile (), objfile);
}
static inline bool
check_objfile (const struct block *block, struct objfile *objfile)
{
return check_objfile (block_objfile (block), objfile);
}
extern bool check_objfile (const struct block *block,
struct objfile *objfile);
static inline bool
check_objfile (const block_symbol &sym, struct objfile *objfile)

View File

@@ -75,6 +75,12 @@ debug_exp (struct expression *exp)
namespace expr
{
bool
check_objfile (const struct block *block, struct objfile *objfile)
{
return check_objfile (block_objfile (block), objfile);
}
void
dump_for_expression (struct ui_file *stream, int depth, enum exp_opcode op)
{