]> granicus.if.org Git - llvm/commitdiff
SymbolRef::Type is not a bitfield and must be compared directly
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Oct 2016 17:11:23 +0000 (17:11 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Oct 2016 17:11:23 +0000 (17:11 +0000)
Found by PVS-Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285597 91177308-0d34-0410-b5e6-96231b3b80d8

tools/dsymutil/MachODebugMapParser.cpp

index e5a0535949d4d993a7e8e82532addf47fa6d51a6..051c1e941ef00f85a8169c993025a87c82292e55 100644 (file)
@@ -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