[Lldb-commits] [lldb] r324730 - Fix some warnings in SymbolFilePDB.cpp

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 9 03:37:01 PST 2018


Author: labath
Date: Fri Feb  9 03:37:01 2018
New Revision: 324730

URL: http://llvm.org/viewvc/llvm-project?rev=324730&view=rev
Log:
Fix some warnings in SymbolFilePDB.cpp

Modified:
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=324730&r1=324729&r2=324730&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Fri Feb  9 03:37:01 2018
@@ -535,10 +535,10 @@ SymbolFilePDB::ResolveSymbolContext(cons
                                     uint32_t resolve_scope,
                                     lldb_private::SymbolContext &sc) {
   uint32_t resolved_flags = 0;
-  if (resolve_scope & eSymbolContextCompUnit |
-      resolve_scope & eSymbolContextVariable |
-      resolve_scope & eSymbolContextFunction |
-      resolve_scope & eSymbolContextBlock |
+  if (resolve_scope & eSymbolContextCompUnit ||
+      resolve_scope & eSymbolContextVariable ||
+      resolve_scope & eSymbolContextFunction ||
+      resolve_scope & eSymbolContextBlock ||
       resolve_scope & eSymbolContextLineEntry) {
     addr_t file_vm_addr = so_addr.GetFileAddress();
     auto symbol_up =
@@ -904,7 +904,6 @@ void SymbolFilePDB::CacheFunctionNames()
       if (CPlusPlusLanguage::IsCPPMangledName(name.c_str())) {
         auto demangled_name = pub_sym_up->getUndecoratedName();
         std::vector<uint32_t> ids;
-        auto cstr_name = ConstString(demangled_name);
         auto vm_addr = pub_sym_up->getVirtualAddress();
 
         // PDB public symbol has mangled name for its associated function.
@@ -941,8 +940,8 @@ uint32_t SymbolFilePDB::FindFunctions(
     return 0;
 
   auto old_size = sc_list.GetSize();
-  if (name_type_mask & eFunctionNameTypeFull |
-      name_type_mask & eFunctionNameTypeBase |
+  if (name_type_mask & eFunctionNameTypeFull ||
+      name_type_mask & eFunctionNameTypeBase ||
       name_type_mask & eFunctionNameTypeMethod) {
     CacheFunctionNames();
 




More information about the lldb-commits mailing list