NFC: use enum SymbolData as flags

To make it easier to add flags when adding new options in SymbolData.

Example:
I want to add a flag to disable inline record for https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2915828.
Change-Id: Ifc5da27c01efa0b0bc21cfcf769d4e6d604a63c6
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2984198
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Zequan Wu 2021-06-30 12:27:45 -07:00 committed by Joshua Peraza
parent 04a9ffbe59
commit 68735f74e7
9 changed files with 35 additions and 16 deletions

View file

@ -680,7 +680,8 @@ bool LoadSymbols(const string& obj_file,
bool found_debug_info_section = false;
bool found_usable_info = false;
if (options.symbol_data != ONLY_CFI) {
if ((options.symbol_data & SYMBOLS_AND_FILES) ||
(options.symbol_data & INLINES)) {
#ifndef NO_STABS_SUPPORT
// Look for STABS debugging information, and load it if present.
const Shdr* stab_section =
@ -789,7 +790,7 @@ bool LoadSymbols(const string& obj_file,
}
}
if (options.symbol_data != NO_CFI) {
if (options.symbol_data & CFI) {
// Dwarf Call Frame Information (CFI) is actually independent from
// the other DWARF debugging information, and can be used alone.
const Shdr* dwarf_cfi_section =