[Lldb-commits] [lldb] r345313 - Don't type-erase the SymbolContextItem enumeration.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 25 13:45:19 PDT 2018


Author: zturner
Date: Thu Oct 25 13:45:19 2018
New Revision: 345313

URL: http://llvm.org/viewvc/llvm-project?rev=345313&view=rev
Log:
Don't type-erase the SymbolContextItem enumeration.

When we get the `resolve_scope` parameter from the SB API, it's a
`uint32_t`.  We then pass it through all of LLDB this way, as a uint32.
This is unfortunate, because it means the user of an API never actually
knows what they're dealing with.  We can call it something like
`resolve_scope` and have comments saying "this is a value from the
`SymbolContextItem` enumeration, but it makes more sense to just have it
actually *be* the correct type in the actual C++ type system to begin
with.  This way the person reading the code just knows what it is.

The reason to use integers instead of enumerations for flags is because
when you do bitwise operations on enumerations they get promoted to
integers, so it makes it tedious to constantly be casting them back
to the enumeration types, so I've introduced a macro to make this
happen magically.  By writing LLDB_MARK_AS_BITMASK_ENUM after defining
an enumeration, it will define overloaded operators so that the
returned type will be the original enum.  This should address all
the mechanical issues surrounding using rich enum types directly.

This way, we get a better debugger experience, and new users to
the codebase can get more easily acquainted with the codebase because
their IDE features can help them understand what the types mean.

Differential Revision: https://reviews.llvm.org/D53597

Modified:
    lldb/trunk/include/lldb/Core/Address.h
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Core/ModuleList.h
    lldb/trunk/include/lldb/Symbol/CompileUnit.h
    lldb/trunk/include/lldb/Symbol/SymbolFile.h
    lldb/trunk/include/lldb/Symbol/SymbolVendor.h
    lldb/trunk/include/lldb/Target/StackFrame.h
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/source/API/SBAddress.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Commands/CommandObjectSource.cpp
    lldb/trunk/source/Core/Address.cpp
    lldb/trunk/source/Core/Disassembler.cpp
    lldb/trunk/source/Core/Module.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/SourceManager.cpp
    lldb/trunk/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
    lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
    lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
    lldb/trunk/source/Symbol/CompileUnit.cpp
    lldb/trunk/source/Symbol/SymbolFile.cpp
    lldb/trunk/source/Symbol/SymbolVendor.cpp
    lldb/trunk/source/Target/StackFrame.cpp

Modified: lldb/trunk/include/lldb/Core/Address.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Address.h (original)
+++ lldb/trunk/include/lldb/Core/Address.h Thu Oct 25 13:45:19 2018
@@ -508,9 +508,9 @@ public:
   ///
   /// @see SymbolContextScope::CalculateSymbolContext(SymbolContext*)
   //------------------------------------------------------------------
-  uint32_t CalculateSymbolContext(
-      SymbolContext *sc,
-      uint32_t resolve_scope = lldb::eSymbolContextEverything) const;
+  uint32_t CalculateSymbolContext(SymbolContext *sc,
+                                  lldb::SymbolContextItem resolve_scope =
+                                      lldb::eSymbolContextEverything) const;
 
   lldb::ModuleSP CalculateSymbolContextModule() const;
 

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Thu Oct 25 13:45:19 2018
@@ -816,10 +816,9 @@ public:
   ///
   /// @see SymbolContext::Scope
   //------------------------------------------------------------------
-  uint32_t
-  ResolveSymbolContextForAddress(const Address &so_addr, uint32_t resolve_scope,
-                                 SymbolContext &sc,
-                                 bool resolve_tail_call_address = false);
+  uint32_t ResolveSymbolContextForAddress(
+      const Address &so_addr, lldb::SymbolContextItem resolve_scope,
+      SymbolContext &sc, bool resolve_tail_call_address = false);
 
   //------------------------------------------------------------------
   /// Resolve items in the symbol context for a given file and line.
@@ -862,10 +861,9 @@ public:
   ///
   /// @see SymbolContext::Scope
   //------------------------------------------------------------------
-  uint32_t ResolveSymbolContextForFilePath(const char *file_path, uint32_t line,
-                                           bool check_inlines,
-                                           uint32_t resolve_scope,
-                                           SymbolContextList &sc_list);
+  uint32_t ResolveSymbolContextForFilePath(
+      const char *file_path, uint32_t line, bool check_inlines,
+      lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list);
 
   //------------------------------------------------------------------
   /// Resolve items in the symbol context for a given file and line.
@@ -909,10 +907,9 @@ public:
   ///
   /// @see SymbolContext::Scope
   //------------------------------------------------------------------
-  uint32_t ResolveSymbolContextsForFileSpec(const FileSpec &file_spec,
-                                            uint32_t line, bool check_inlines,
-                                            uint32_t resolve_scope,
-                                            SymbolContextList &sc_list);
+  uint32_t ResolveSymbolContextsForFileSpec(
+      const FileSpec &file_spec, uint32_t line, bool check_inlines,
+      lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list);
 
   void SetFileSpecAndObjectName(const FileSpec &file,
                                 const ConstString &object_name);
@@ -1155,7 +1152,7 @@ protected:
   //------------------------------------------------------------------
   uint32_t ResolveSymbolContextForAddress(lldb::addr_t vm_addr,
                                           bool vm_addr_is_file_addr,
-                                          uint32_t resolve_scope,
+                                          lldb::SymbolContextItem resolve_scope,
                                           Address &so_addr, SymbolContext &sc);
 
   void SymbolIndicesToSymbolContextList(Symtab *symtab,

Modified: lldb/trunk/include/lldb/Core/ModuleList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleList.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleList.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleList.h Thu Oct 25 13:45:19 2018
@@ -495,26 +495,24 @@ public:
   /// &,uint32_t,SymbolContext&)
   //------------------------------------------------------------------
   uint32_t ResolveSymbolContextForAddress(const Address &so_addr,
-                                          uint32_t resolve_scope,
+                                          lldb::SymbolContextItem resolve_scope,
                                           SymbolContext &sc) const;
 
   //------------------------------------------------------------------
   /// @copydoc Module::ResolveSymbolContextForFilePath (const char
   /// *,uint32_t,bool,uint32_t,SymbolContextList&)
   //------------------------------------------------------------------
-  uint32_t ResolveSymbolContextForFilePath(const char *file_path, uint32_t line,
-                                           bool check_inlines,
-                                           uint32_t resolve_scope,
-                                           SymbolContextList &sc_list) const;
+  uint32_t ResolveSymbolContextForFilePath(
+      const char *file_path, uint32_t line, bool check_inlines,
+      lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const;
 
   //------------------------------------------------------------------
   /// @copydoc Module::ResolveSymbolContextsForFileSpec (const FileSpec
   /// &,uint32_t,bool,uint32_t,SymbolContextList&)
   //------------------------------------------------------------------
-  uint32_t ResolveSymbolContextsForFileSpec(const FileSpec &file_spec,
-                                            uint32_t line, bool check_inlines,
-                                            uint32_t resolve_scope,
-                                            SymbolContextList &sc_list) const;
+  uint32_t ResolveSymbolContextsForFileSpec(
+      const FileSpec &file_spec, uint32_t line, bool check_inlines,
+      lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) const;
 
   //------------------------------------------------------------------
   /// Gets the size of the module list.

Modified: lldb/trunk/include/lldb/Symbol/CompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/CompileUnit.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/CompileUnit.h (original)
+++ lldb/trunk/include/lldb/Symbol/CompileUnit.h Thu Oct 25 13:45:19 2018
@@ -391,7 +391,7 @@ public:
   //------------------------------------------------------------------
   uint32_t ResolveSymbolContext(const FileSpec &file_spec, uint32_t line,
                                 bool check_inlines, bool exact,
-                                uint32_t resolve_scope,
+                                lldb::SymbolContextItem resolve_scope,
                                 SymbolContextList &sc_list);
 
   //------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/Symbol/SymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolFile.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolFile.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolFile.h Thu Oct 25 13:45:19 2018
@@ -155,11 +155,11 @@ public:
     return CompilerDeclContext();
   }
   virtual uint32_t ResolveSymbolContext(const Address &so_addr,
-                                        uint32_t resolve_scope,
+                                        lldb::SymbolContextItem resolve_scope,
                                         SymbolContext &sc) = 0;
   virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec,
                                         uint32_t line, bool check_inlines,
-                                        uint32_t resolve_scope,
+                                        lldb::SymbolContextItem resolve_scope,
                                         SymbolContextList &sc_list);
   virtual uint32_t
   FindGlobalVariables(const ConstString &name,

Modified: lldb/trunk/include/lldb/Symbol/SymbolVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolVendor.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolVendor.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolVendor.h Thu Oct 25 13:45:19 2018
@@ -71,12 +71,12 @@ public:
   virtual Type *ResolveTypeUID(lldb::user_id_t type_uid);
 
   virtual uint32_t ResolveSymbolContext(const Address &so_addr,
-                                        uint32_t resolve_scope,
+                                        lldb::SymbolContextItem resolve_scope,
                                         SymbolContext &sc);
 
   virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec,
                                         uint32_t line, bool check_inlines,
-                                        uint32_t resolve_scope,
+                                        lldb::SymbolContextItem resolve_scope,
                                         SymbolContextList &sc_list);
 
   virtual size_t FindGlobalVariables(const ConstString &name,

Modified: lldb/trunk/include/lldb/Target/StackFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/StackFrame.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/StackFrame.h (original)
+++ lldb/trunk/include/lldb/Target/StackFrame.h Thu Oct 25 13:45:19 2018
@@ -173,7 +173,7 @@ public:
   ///   A SymbolContext reference which includes the types of information
   ///   requested by resolve_scope, if they are available.
   //------------------------------------------------------------------
-  const SymbolContext &GetSymbolContext(uint32_t resolve_scope);
+  const SymbolContext &GetSymbolContext(lldb::SymbolContextItem resolve_scope);
 
   //------------------------------------------------------------------
   /// Return the Canonical Frame Address (DWARF term) for this frame.

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Thu Oct 25 13:45:19 2018
@@ -10,6 +10,36 @@
 #ifndef LLDB_lldb_enumerations_h_
 #define LLDB_lldb_enumerations_h_
 
+#include <type_traits>
+
+// Macro to enable bitmask operations on an enum.  Without this, Enum | Enum
+// gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar).  If
+// you mark Enum with LLDB_MARK_AS_BITMASK_ENUM(Enum), however, you can simply
+// write Enum a = eFoo | eBar.
+#define LLDB_MARK_AS_BITMASK_ENUM(Enum)                                        \
+  inline Enum operator|(Enum a, Enum b) {                                      \
+    return static_cast<Enum>(                                                  \
+        static_cast<std::underlying_type<Enum>::type>(a) |                     \
+        static_cast<std::underlying_type<Enum>::type>(b));                     \
+  }                                                                            \
+  inline Enum operator&(Enum a, Enum b) {                                      \
+    return static_cast<Enum>(                                                  \
+        static_cast<std::underlying_type<Enum>::type>(a) &                     \
+        static_cast<std::underlying_type<Enum>::type>(b));                     \
+  }                                                                            \
+  inline Enum operator~(Enum a) {                                              \
+    return static_cast<Enum>(                                                  \
+        ~static_cast<std::underlying_type<Enum>::type>(a));                    \
+  }                                                                            \
+  inline Enum &operator|=(Enum &a, Enum b) {                                   \
+    a = a | b;                                                                 \
+    return a;                                                                  \
+  }                                                                            \
+  inline Enum &operator&=(Enum &a, Enum b) {                                   \
+    a = a & b;                                                                 \
+    return a;                                                                  \
+  }
+
 #ifndef SWIG
 // With MSVC, the default type of an enum is always signed, even if one of the
 // enumerator values is too large to fit into a signed integer but would
@@ -327,39 +357,40 @@ enum InputReaderGranularity {
 //------------------------------------------------------------------
 FLAGS_ENUM(SymbolContextItem){
     eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from
-                                      ///a query, or was located in query
-                                      ///results
+                                      /// a query, or was located in query
+                                      /// results
     eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from
-                                      ///a query, or was located in query
-                                      ///results
+                                      /// a query, or was located in query
+                                      /// results
     eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested
-                                        ///from a query, or was located in query
-                                        ///results
+                                        /// from a query, or was located in
+                                        /// query results
     eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested
-                                        ///from a query, or was located in query
-                                        ///results
+                                        /// from a query, or was located in
+                                        /// query results
     eSymbolContextBlock = (1u << 4),    ///< Set when the deepest \a block is
-                                     ///requested from a query, or was located
-                                     ///in query results
+                                     /// requested from a query, or was located
+                                     /// in query results
     eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is
-                                         ///requested from a query, or was
-                                         ///located in query results
+                                         /// requested from a query, or was
+                                         /// located in query results
     eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from
-                                      ///a query, or was located in query
-                                      ///results
+                                      /// a query, or was located in query
+                                      /// results
     eSymbolContextEverything = ((eSymbolContextSymbol << 1) -
                                 1u), ///< Indicates to try and lookup everything
-                                     ///up during a routine symbol context
-                                     ///query.
-    eSymbolContextVariable = (1u << 7) ///< Set when \a global or static
-                                       ///variable is requested from a query, or
-                                       ///was located in query results.
+                                     /// up during a routine symbol context
+                                     /// query.
+    eSymbolContextVariable = (1u << 7), ///< Set when \a global or static
+                                        /// variable is requested from a query,
+                                        /// or was located in query results.
     ///< eSymbolContextVariable is potentially expensive to lookup so it isn't
-    ///included in
+    /// included in
     ///< eSymbolContextEverything which stops it from being used during frame PC
-    ///lookups and
+    /// lookups and
     ///< many other potential address to symbol context lookups.
 };
+LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
 
 FLAGS_ENUM(Permissions){ePermissionsWritable = (1u << 0),
                         ePermissionsReadable = (1u << 1),
@@ -1086,7 +1117,6 @@ enum TypeSummaryCapping {
   eTypeSummaryCapped = true,
   eTypeSummaryUncapped = false
 };
-
 } // namespace lldb
 
 #endif // LLDB_lldb_enumerations_h_

Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Thu Oct 25 13:45:19 2018
@@ -198,8 +198,9 @@ SBModule SBAddress::GetModule() {
 
 SBSymbolContext SBAddress::GetSymbolContext(uint32_t resolve_scope) {
   SBSymbolContext sb_sc;
+  SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
   if (m_opaque_ap->IsValid())
-    m_opaque_ap->CalculateSymbolContext(&sb_sc.ref(), resolve_scope);
+    m_opaque_ap->CalculateSymbolContext(&sb_sc.ref(), scope);
   return sb_sc;
 }
 

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Thu Oct 25 13:45:19 2018
@@ -112,7 +112,7 @@ SBSymbolContext SBFrame::GetSymbolContex
   SBSymbolContext sb_sym_ctx;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
-
+  SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
   StackFrame *frame = nullptr;
   Target *target = exe_ctx.GetTargetPtr();
   Process *process = exe_ctx.GetProcessPtr();
@@ -121,7 +121,7 @@ SBSymbolContext SBFrame::GetSymbolContex
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
       if (frame) {
-        sb_sym_ctx.SetSymbolContext(&frame->GetSymbolContext(resolve_scope));
+        sb_sym_ctx.SetSymbolContext(&frame->GetSymbolContext(scope));
       } else {
         if (log)
           log->Printf("SBFrame::GetVariables () => error: could not "

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Thu Oct 25 13:45:19 2018
@@ -217,9 +217,9 @@ SBModule::ResolveSymbolContextForAddress
                                          uint32_t resolve_scope) {
   SBSymbolContext sb_sc;
   ModuleSP module_sp(GetSP());
+  SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
   if (module_sp && addr.IsValid())
-    module_sp->ResolveSymbolContextForAddress(addr.ref(), resolve_scope,
-                                              *sb_sc);
+    module_sp->ResolveSymbolContextForAddress(addr.ref(), scope, *sb_sc);
   return sb_sc;
 }
 

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Thu Oct 25 13:45:19 2018
@@ -660,11 +660,12 @@ SBSymbolContext
 SBTarget::ResolveSymbolContextForAddress(const SBAddress &addr,
                                          uint32_t resolve_scope) {
   SBSymbolContext sc;
+  SymbolContextItem scope = static_cast<SymbolContextItem>(resolve_scope);
   if (addr.IsValid()) {
     TargetSP target_sp(GetSP());
     if (target_sp)
-      target_sp->GetImages().ResolveSymbolContextForAddress(
-          addr.ref(), resolve_scope, sc.ref());
+      target_sp->GetImages().ResolveSymbolContextForAddress(addr.ref(), scope,
+                                                            sc.ref());
   }
   return sc;
 }

Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Thu Oct 25 13:45:19 2018
@@ -1210,7 +1210,9 @@ protected:
             target->GetImages().FindModules(module_spec, matching_modules);
             num_matches += matching_modules.ResolveSymbolContextForFilePath(
                 filename, 0, check_inlines,
-                eSymbolContextModule | eSymbolContextCompUnit, sc_list);
+                SymbolContextItem(eSymbolContextModule |
+                                  eSymbolContextCompUnit),
+                sc_list);
           }
         }
       } else {

Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Thu Oct 25 13:45:19 2018
@@ -779,8 +779,9 @@ bool Address::SectionWasDeletedPrivate()
          m_section_wp.owner_before(empty_section_wp);
 }
 
-uint32_t Address::CalculateSymbolContext(SymbolContext *sc,
-                                         uint32_t resolve_scope) const {
+uint32_t
+Address::CalculateSymbolContext(SymbolContext *sc,
+                                SymbolContextItem resolve_scope) const {
   sc->Clear(false);
   // Absolute addresses don't have enough information to reconstruct even their
   // target.

Modified: lldb/trunk/source/Core/Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Disassembler.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Core/Disassembler.cpp (original)
+++ lldb/trunk/source/Core/Disassembler.cpp Thu Oct 25 13:45:19 2018
@@ -429,9 +429,9 @@ bool Disassembler::PrintInstructions(Dis
       const Address &addr = inst->GetAddress();
       ModuleSP module_sp(addr.GetModule());
       if (module_sp) {
-        const uint32_t resolve_mask = eSymbolContextFunction |
-                                      eSymbolContextSymbol |
-                                      eSymbolContextLineEntry;
+        const SymbolContextItem resolve_mask = eSymbolContextFunction |
+                                               eSymbolContextSymbol |
+                                               eSymbolContextLineEntry;
         uint32_t resolved_mask =
             module_sp->ResolveSymbolContextForAddress(addr, resolve_mask, sc);
         if (resolved_mask) {

Modified: lldb/trunk/source/Core/Module.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Module.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Core/Module.cpp (original)
+++ lldb/trunk/source/Core/Module.cpp Thu Oct 25 13:45:19 2018
@@ -433,8 +433,8 @@ bool Module::ResolveFileAddress(lldb::ad
 }
 
 uint32_t Module::ResolveSymbolContextForAddress(
-    const Address &so_addr, uint32_t resolve_scope, SymbolContext &sc,
-    bool resolve_tail_call_address) {
+    const Address &so_addr, lldb::SymbolContextItem resolve_scope,
+    SymbolContext &sc, bool resolve_tail_call_address) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   uint32_t resolved_flags = 0;
 
@@ -566,21 +566,17 @@ uint32_t Module::ResolveSymbolContextFor
   return resolved_flags;
 }
 
-uint32_t Module::ResolveSymbolContextForFilePath(const char *file_path,
-                                                 uint32_t line,
-                                                 bool check_inlines,
-                                                 uint32_t resolve_scope,
-                                                 SymbolContextList &sc_list) {
+uint32_t Module::ResolveSymbolContextForFilePath(
+    const char *file_path, uint32_t line, bool check_inlines,
+    lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
   FileSpec file_spec(file_path, false);
   return ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
                                           resolve_scope, sc_list);
 }
 
-uint32_t Module::ResolveSymbolContextsForFileSpec(const FileSpec &file_spec,
-                                                  uint32_t line,
-                                                  bool check_inlines,
-                                                  uint32_t resolve_scope,
-                                                  SymbolContextList &sc_list) {
+uint32_t Module::ResolveSymbolContextsForFileSpec(
+    const FileSpec &file_spec, uint32_t line, bool check_inlines,
+    lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Thu Oct 25 13:45:19 2018
@@ -662,9 +662,10 @@ bool ModuleList::ResolveFileAddress(lldb
   return false;
 }
 
-uint32_t ModuleList::ResolveSymbolContextForAddress(const Address &so_addr,
-                                                    uint32_t resolve_scope,
-                                                    SymbolContext &sc) const {
+uint32_t
+ModuleList::ResolveSymbolContextForAddress(const Address &so_addr,
+                                           SymbolContextItem resolve_scope,
+                                           SymbolContext &sc) const {
   // The address is already section offset so it has a module
   uint32_t resolved_flags = 0;
   ModuleSP module_sp(so_addr.GetModule());
@@ -687,7 +688,7 @@ uint32_t ModuleList::ResolveSymbolContex
 
 uint32_t ModuleList::ResolveSymbolContextForFilePath(
     const char *file_path, uint32_t line, bool check_inlines,
-    uint32_t resolve_scope, SymbolContextList &sc_list) const {
+    SymbolContextItem resolve_scope, SymbolContextList &sc_list) const {
   FileSpec file_spec(file_path, false);
   return ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
                                           resolve_scope, sc_list);
@@ -695,7 +696,7 @@ uint32_t ModuleList::ResolveSymbolContex
 
 uint32_t ModuleList::ResolveSymbolContextsForFileSpec(
     const FileSpec &file_spec, uint32_t line, bool check_inlines,
-    uint32_t resolve_scope, SymbolContextList &sc_list) const {
+    SymbolContextItem resolve_scope, SymbolContextList &sc_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {

Modified: lldb/trunk/source/Core/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SourceManager.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Core/SourceManager.cpp (original)
+++ lldb/trunk/source/Core/SourceManager.cpp Thu Oct 25 13:45:19 2018
@@ -397,7 +397,8 @@ void SourceManager::File::CommonInitiali
         size_t num_matches =
             target->GetImages().ResolveSymbolContextForFilePath(
                 file_spec.GetFilename().AsCString(), 0, check_inlines,
-                lldb::eSymbolContextModule | lldb::eSymbolContextCompUnit,
+                SymbolContextItem(eSymbolContextModule |
+                                  eSymbolContextCompUnit),
                 sc_list);
         bool got_multiple = false;
         if (num_matches != 0) {

Modified: lldb/trunk/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/Mips/ArchitectureMips.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/Mips/ArchitectureMips.cpp (original)
+++ lldb/trunk/source/Plugins/Architecture/Mips/ArchitectureMips.cpp Thu Oct 25 13:45:19 2018
@@ -96,7 +96,8 @@ lldb::addr_t ArchitectureMips::GetBreaka
   ModuleSP temp_addr_module_sp(resolved_addr.GetModule());
   if (temp_addr_module_sp) {
     SymbolContext sc;
-    uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
+    SymbolContextItem resolve_scope =
+        eSymbolContextFunction | eSymbolContextSymbol;
     temp_addr_module_sp->ResolveSymbolContextForAddress(resolved_addr,
       resolve_scope, sc);
     Address sym_addr;

Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Thu Oct 25 13:45:19 2018
@@ -1382,7 +1382,7 @@ const char *DisassemblerLLVMC::SymbolLoo
       }
 
       SymbolContext sym_ctx;
-      const uint32_t resolve_scope =
+      const SymbolContextItem resolve_scope =
           eSymbolContextFunction | eSymbolContextSymbol;
       if (pc_so_addr.IsValid() && pc_so_addr.GetModule()) {
         pc_so_addr.GetModule()->ResolveSymbolContextForAddress(

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Thu Oct 25 13:45:19 2018
@@ -3718,7 +3718,8 @@ bool RenderScriptRuntime::GetKernelCoord
       continue;
 
     // Find the function name
-    const SymbolContext sym_ctx = frame_sp->GetSymbolContext(false);
+    const SymbolContext sym_ctx =
+        frame_sp->GetSymbolContext(eSymbolContextFunction);
     const ConstString func_name = sym_ctx.GetFunctionName();
     if (!func_name)
       continue;

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Thu Oct 25 13:45:19 2018
@@ -150,7 +150,8 @@ void RegisterContextLLDB::InitializeZero
 
   // We require either a symbol or function in the symbols context to be
   // successfully filled in or this context is of no use to us.
-  const uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
+  const SymbolContextItem resolve_scope =
+      eSymbolContextFunction | eSymbolContextSymbol;
   if (pc_module_sp.get() && (pc_module_sp->ResolveSymbolContextForAddress(
                                  m_current_pc, resolve_scope, m_sym_ctx) &
                              resolve_scope)) {
@@ -436,7 +437,8 @@ void RegisterContextLLDB::InitializeNonZ
   // then we might not find the correct unwind information later. Instead, let
   // ResolveSymbolContextForAddress fail, and handle the case via
   // decr_pc_and_recompute_addr_range below.
-  const uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
+  const SymbolContextItem resolve_scope =
+      eSymbolContextFunction | eSymbolContextSymbol;
   uint32_t resolved_scope = pc_module_sp->ResolveSymbolContextForAddress(
       m_current_pc, resolve_scope, m_sym_ctx, resolve_tail_call_address);
 
@@ -494,7 +496,8 @@ void RegisterContextLLDB::InitializeNonZ
     temporary_pc.SetLoadAddress(pc - 1, &process->GetTarget());
     m_sym_ctx.Clear(false);
     m_sym_ctx_valid = false;
-    uint32_t resolve_scope = eSymbolContextFunction | eSymbolContextSymbol;
+    SymbolContextItem resolve_scope =
+        eSymbolContextFunction | eSymbolContextSymbol;
 
     ModuleSP temporary_module_sp = temporary_pc.GetModule();
     if (temporary_module_sp &&

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp Thu Oct 25 13:45:19 2018
@@ -114,7 +114,7 @@ size_t UnwindMacOSXFrameBackchain::GetSt
   if (!m_cursors.empty()) {
     lldb::addr_t first_frame_pc = m_cursors.front().pc;
     if (first_frame_pc != LLDB_INVALID_ADDRESS) {
-      const uint32_t resolve_scope =
+      const SymbolContextItem resolve_scope =
           eSymbolContextModule | eSymbolContextCompUnit |
           eSymbolContextFunction | eSymbolContextSymbol;
 
@@ -205,7 +205,7 @@ size_t UnwindMacOSXFrameBackchain::GetSt
   if (!m_cursors.empty()) {
     lldb::addr_t first_frame_pc = m_cursors.front().pc;
     if (first_frame_pc != LLDB_INVALID_ADDRESS) {
-      const uint32_t resolve_scope =
+      const SymbolContextItem resolve_scope =
           eSymbolContextModule | eSymbolContextCompUnit |
           eSymbolContextFunction | eSymbolContextSymbol;
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Oct 25 13:45:19 2018
@@ -1777,7 +1777,7 @@ SymbolFileDWARF::GlobalVariableMap &Symb
 }
 
 uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr,
-                                               uint32_t resolve_scope,
+                                               SymbolContextItem resolve_scope,
                                                SymbolContext &sc) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
@@ -1911,7 +1911,7 @@ uint32_t SymbolFileDWARF::ResolveSymbolC
 uint32_t SymbolFileDWARF::ResolveSymbolContext(const FileSpec &file_spec,
                                                uint32_t line,
                                                bool check_inlines,
-                                               uint32_t resolve_scope,
+                                               SymbolContextItem resolve_scope,
                                                SymbolContextList &sc_list) {
   const uint32_t prev_size = sc_list.GetSize();
   if (resolve_scope & eSymbolContextCompUnit) {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Thu Oct 25 13:45:19 2018
@@ -168,12 +168,13 @@ public:
   ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override;
 
   uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
-                                uint32_t resolve_scope,
+                                lldb::SymbolContextItem resolve_scope,
                                 lldb_private::SymbolContext &sc) override;
 
   uint32_t
   ResolveSymbolContext(const lldb_private::FileSpec &file_spec, uint32_t line,
-                       bool check_inlines, uint32_t resolve_scope,
+                       bool check_inlines,
+                       lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
 
   uint32_t

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Thu Oct 25 13:45:19 2018
@@ -717,8 +717,10 @@ bool SymbolFileDWARFDebugMap::CompleteTy
   return success;
 }
 
-uint32_t SymbolFileDWARFDebugMap::ResolveSymbolContext(
-    const Address &exe_so_addr, uint32_t resolve_scope, SymbolContext &sc) {
+uint32_t
+SymbolFileDWARFDebugMap::ResolveSymbolContext(const Address &exe_so_addr,
+                                              SymbolContextItem resolve_scope,
+                                              SymbolContext &sc) {
   uint32_t resolved_flags = 0;
   Symtab *symtab = m_obj_file->GetSymtab();
   if (symtab) {
@@ -760,7 +762,7 @@ uint32_t SymbolFileDWARFDebugMap::Resolv
 
 uint32_t SymbolFileDWARFDebugMap::ResolveSymbolContext(
     const FileSpec &file_spec, uint32_t line, bool check_inlines,
-    uint32_t resolve_scope, SymbolContextList &sc_list) {
+    SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
   const uint32_t initial = sc_list.GetSize();
   const uint32_t cu_count = GetNumCompileUnits();
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Thu Oct 25 13:45:19 2018
@@ -86,11 +86,12 @@ public:
 
   bool CompleteType(lldb_private::CompilerType &compiler_type) override;
   uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
-                                uint32_t resolve_scope,
+                                lldb::SymbolContextItem resolve_scope,
                                 lldb_private::SymbolContext &sc) override;
   uint32_t
   ResolveSymbolContext(const lldb_private::FileSpec &file_spec, uint32_t line,
-                       bool check_inlines, uint32_t resolve_scope,
+                       bool check_inlines,
+                       lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
   uint32_t
   FindGlobalVariables(const lldb_private::ConstString &name,

Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Thu Oct 25 13:45:19 2018
@@ -960,9 +960,8 @@ static bool NeedsResolvedCompileUnit(uin
   return (resolve_scope & flags) != 0;
 }
 
-uint32_t SymbolFileNativePDB::ResolveSymbolContext(const Address &addr,
-                                                   uint32_t resolve_scope,
-                                                   SymbolContext &sc) {
+uint32_t SymbolFileNativePDB::ResolveSymbolContext(
+    const Address &addr, SymbolContextItem resolve_scope, SymbolContext &sc) {
   uint32_t resolved_flags = 0;
   lldb::addr_t file_addr = addr.GetFileAddress();
 

Modified: lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h Thu Oct 25 13:45:19 2018
@@ -109,7 +109,8 @@ public:
   }
   Type *ResolveTypeUID(lldb::user_id_t type_uid) override;
   bool CompleteType(CompilerType &compiler_type) override;
-  uint32_t ResolveSymbolContext(const Address &so_addr, uint32_t resolve_scope,
+  uint32_t ResolveSymbolContext(const Address &so_addr,
+                                lldb::SymbolContextItem resolve_scope,
                                 SymbolContext &sc) override;
 
   size_t GetTypes(SymbolContextScope *sc_scope, uint32_t type_mask,

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=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Thu Oct 25 13:45:19 2018
@@ -684,7 +684,7 @@ void SymbolFilePDB::ParseDeclsForContext
 
 uint32_t
 SymbolFilePDB::ResolveSymbolContext(const lldb_private::Address &so_addr,
-                                    uint32_t resolve_scope,
+                                    SymbolContextItem resolve_scope,
                                     lldb_private::SymbolContext &sc) {
   uint32_t resolved_flags = 0;
   if (resolve_scope & eSymbolContextCompUnit ||
@@ -744,7 +744,7 @@ SymbolFilePDB::ResolveSymbolContext(cons
 
 uint32_t SymbolFilePDB::ResolveSymbolContext(
     const lldb_private::FileSpec &file_spec, uint32_t line, bool check_inlines,
-    uint32_t resolve_scope, lldb_private::SymbolContextList &sc_list) {
+    SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) {
   const size_t old_size = sc_list.GetSize();
   if (resolve_scope & lldb::eSymbolContextCompUnit) {
     // Locate all compilation units with line numbers referencing the specified

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h Thu Oct 25 13:45:19 2018
@@ -100,12 +100,13 @@ public:
   ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override;
 
   uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
-                                uint32_t resolve_scope,
+                                lldb::SymbolContextItem resolve_scope,
                                 lldb_private::SymbolContext &sc) override;
 
   uint32_t
   ResolveSymbolContext(const lldb_private::FileSpec &file_spec, uint32_t line,
-                       bool check_inlines, uint32_t resolve_scope,
+                       bool check_inlines,
+                       lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
 
   uint32_t

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Thu Oct 25 13:45:19 2018
@@ -244,7 +244,7 @@ bool SymbolFileSymtab::CompleteType(lldb
 }
 
 uint32_t SymbolFileSymtab::ResolveSymbolContext(const Address &so_addr,
-                                                uint32_t resolve_scope,
+                                                SymbolContextItem resolve_scope,
                                                 SymbolContext &sc) {
   if (m_obj_file->GetSymtab() == NULL)
     return 0;

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h Thu Oct 25 13:45:19 2018
@@ -84,7 +84,7 @@ public:
   bool CompleteType(lldb_private::CompilerType &compiler_type) override;
 
   uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
-                                uint32_t resolve_scope,
+                                lldb::SymbolContextItem resolve_scope,
                                 lldb_private::SymbolContext &sc) override;
 
   size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,

Modified: lldb/trunk/source/Symbol/CompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompileUnit.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompileUnit.cpp (original)
+++ lldb/trunk/source/Symbol/CompileUnit.cpp Thu Oct 25 13:45:19 2018
@@ -278,7 +278,8 @@ uint32_t CompileUnit::FindLineEntry(uint
 
 uint32_t CompileUnit::ResolveSymbolContext(const FileSpec &file_spec,
                                            uint32_t line, bool check_inlines,
-                                           bool exact, uint32_t resolve_scope,
+                                           bool exact,
+                                           SymbolContextItem resolve_scope,
                                            SymbolContextList &sc_list) {
   // First find all of the file indexes that match our "file_spec". If
   // "file_spec" has an empty directory, then only compare the basenames when

Modified: lldb/trunk/source/Symbol/SymbolFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolFile.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolFile.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolFile.cpp Thu Oct 25 13:45:19 2018
@@ -97,7 +97,7 @@ TypeSystem *SymbolFile::GetTypeSystemFor
 
 uint32_t SymbolFile::ResolveSymbolContext(const FileSpec &file_spec,
                                           uint32_t line, bool check_inlines,
-                                          uint32_t resolve_scope,
+                                          lldb::SymbolContextItem resolve_scope,
                                           SymbolContextList &sc_list) {
   return 0;
 }

Modified: lldb/trunk/source/Symbol/SymbolVendor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolVendor.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolVendor.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolVendor.cpp Thu Oct 25 13:45:19 2018
@@ -235,7 +235,7 @@ Type *SymbolVendor::ResolveTypeUID(lldb:
 }
 
 uint32_t SymbolVendor::ResolveSymbolContext(const Address &so_addr,
-                                            uint32_t resolve_scope,
+                                            SymbolContextItem resolve_scope,
                                             SymbolContext &sc) {
   ModuleSP module_sp(GetModule());
   if (module_sp) {
@@ -248,7 +248,7 @@ uint32_t SymbolVendor::ResolveSymbolCont
 
 uint32_t SymbolVendor::ResolveSymbolContext(const FileSpec &file_spec,
                                             uint32_t line, bool check_inlines,
-                                            uint32_t resolve_scope,
+                                            SymbolContextItem resolve_scope,
                                             SymbolContextList &sc_list) {
   ModuleSP module_sp(GetModule());
   if (module_sp) {

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=345313&r1=345312&r2=345313&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Thu Oct 25 13:45:19 2018
@@ -35,6 +35,8 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include "lldb/lldb-enumerations.h"
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -262,7 +264,8 @@ Block *StackFrame::GetFrameBlock() {
 // StackFrame object, everyone will have as much information as possible and no
 // one will ever have to look things up manually.
 //----------------------------------------------------------------------
-const SymbolContext &StackFrame::GetSymbolContext(uint32_t resolve_scope) {
+const SymbolContext &
+StackFrame::GetSymbolContext(SymbolContextItem resolve_scope) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   // Copy our internal symbol context into "sc".
   if ((m_flags.Get() & resolve_scope) != resolve_scope) {
@@ -314,7 +317,7 @@ const SymbolContext &StackFrame::GetSymb
       // haven't already tried to lookup one of those things. If we haven't
       // then we will do the query.
 
-      uint32_t actual_resolve_scope = 0;
+      SymbolContextItem actual_resolve_scope = SymbolContextItem(0);
 
       if (resolve_scope & eSymbolContextCompUnit) {
         if (m_flags.IsClear(eSymbolContextCompUnit)) {




More information about the lldb-commits mailing list