summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Target/Language.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp
index 30a0492a39a..e41d7b864ab 100644
--- a/lldb/source/Target/Language.cpp
+++ b/lldb/source/Target/Language.cpp
@@ -179,6 +179,16 @@ Language::PrintAllLanguages (Stream &s, const char *prefix, const char *suffix)
}
}
+void
+Language::ForAllLanguages (std::function<bool(lldb::LanguageType)> callback)
+{
+ for (uint32_t i = 1; i < num_languages; i++)
+ {
+ if (!callback(language_names[i].type))
+ break;
+ }
+}
+
bool
Language::LanguageIsCPlusPlus (LanguageType language)
{
OpenPOWER on IntegriCloud