Skip to content

Commit

Permalink
SymbolRef::Type is not a bitfield and must be compared directly
Browse files Browse the repository at this point in the history
Found by PVS-Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285597 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
majnemer committed Oct 31, 2016
1 parent 1a30f4b commit 8d99748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/dsymutil/MachODebugMapParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ void MachODebugMapParser::loadMainBinarySymbols(
}
SymbolRef::Type Type = *TypeOrErr;
// Skip undefined and STAB entries.
if ((Type & SymbolRef::ST_Debug) || (Type & SymbolRef::ST_Unknown))
if ((Type == SymbolRef::ST_Debug) || (Type == SymbolRef::ST_Unknown))
continue;
// The only symbols of interest are the global variables. These
// are the only ones that need to be queried because the address
Expand Down

0 comments on commit 8d99748

Please sign in to comment.