diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:36:23 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-08 15:46:02 -0500 |
commit | c583a2520616c2736cffc389c89a48b159366e6c (patch) | |
tree | b4925f26506fcee96c16119431c01760f05db95d /gdb/macroscope.c | |
parent | ca7f92c2f15b86b09c4a8ad14806bef666308d31 (diff) | |
download | binutils-users/simark/clang-format.zip binutils-users/simark/clang-format.tar.gz binutils-users/simark/clang-format.tar.bz2 |
Run clang-format.shusers/simark/clang-format
Change-Id: Ia948cc26d534b0dd02702244d52434b1a2093968
Diffstat (limited to 'gdb/macroscope.c')
-rw-r--r-- | gdb/macroscope.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gdb/macroscope.c b/gdb/macroscope.c index 1b542ee..84a3a78 100644 --- a/gdb/macroscope.c +++ b/gdb/macroscope.c @@ -34,7 +34,6 @@ things. */ struct macro_table *macro_user_macros; - gdb::unique_xmalloc_ptr<struct macro_scope> sal_macro_scope (struct symtab_and_line sal) { @@ -77,15 +76,15 @@ sal_macro_scope (struct symtab_and_line sal) ms->file = main_file; ms->line = -1; - complaint (_("symtab found for `%s', but that file\n" - "is not covered in the compilation unit's macro information"), - symtab_to_filename_for_display (sal.symtab)); + complaint ( + _ ("symtab found for `%s', but that file\n" + "is not covered in the compilation unit's macro information"), + symtab_to_filename_for_display (sal.symtab)); } return ms; } - gdb::unique_xmalloc_ptr<struct macro_scope> user_macro_scope (void) { @@ -122,21 +121,19 @@ default_macro_scope (void) symbol files loaded, then get_current_or_default would raise an error. But `set width' shouldn't raise an error just because it can't decide which scope to macro-expand its argument in. */ - struct symtab_and_line cursal - = get_current_source_symtab_and_line (); - + struct symtab_and_line cursal = get_current_source_symtab_and_line (); + sal.symtab = cursal.symtab; sal.line = cursal.line; } ms = sal_macro_scope (sal); - if (! ms) + if (!ms) ms = user_macro_scope (); return ms; } - /* Look up the definition of the macro named NAME in scope at the source location given by BATON, which must be a pointer to a `struct macro_scope' structure. */ @@ -154,6 +151,7 @@ standard_macro_lookup (const char *name, const macro_scope &ms) } void _initialize_macroscope (); + void _initialize_macroscope () { |