Make SymbolContexts iterable with the C++11 for (a : b) syntax using Sean’s AdaptedIterable.

llvm-svn: 198968
This commit is contained in:
Jim Ingham 2014-01-10 22:57:01 +00:00
parent ea3ac27029
commit c46e479d12
1 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include "lldb/Core/Address.h"
#include "lldb/Core/Mangled.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Utility/Iterable.h"
namespace lldb_private {
@ -552,6 +553,14 @@ protected:
// Member variables.
//------------------------------------------------------------------
collection m_symbol_contexts; ///< The list of symbol contexts.
public:
typedef AdaptedIterable<collection, SymbolContext, vector_adapter> SymbolContextIterable;
SymbolContextIterable
SymbolContexts()
{
return SymbolContextIterable(m_symbol_contexts);
}
};
bool operator== (const SymbolContext& lhs, const SymbolContext& rhs);