[Lldb-commits] [PATCH] D71316: [FormatManager] Upstream and test swift bits for GetCandidateLanguages().
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 10 16:36:57 PST 2019
davide created this revision.
davide added reviewers: teemperor, aprantl, labath, friss, jingham.
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D71316
Files:
lldb/source/DataFormatters/FormatManager.cpp
lldb/unittests/DataFormatter/FormatManagerTests.cpp
Index: lldb/unittests/DataFormatter/FormatManagerTests.cpp
===================================================================
--- lldb/unittests/DataFormatter/FormatManagerTests.cpp
+++ lldb/unittests/DataFormatter/FormatManagerTests.cpp
@@ -43,7 +43,11 @@
EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_14),
candidates);
- candidates = {eLanguageTypeObjC};
+ candidates = {eLanguageTypeObjC, eLanguageTypeSwift};
EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeObjC),
candidates);
+
+ candidates = {eLanguageTypeSwift, eLanguageTypeObjC};
+ EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeSwift),
+ candidates);
}
Index: lldb/source/DataFormatters/FormatManager.cpp
===================================================================
--- lldb/source/DataFormatters/FormatManager.cpp
+++ lldb/source/DataFormatters/FormatManager.cpp
@@ -582,6 +582,10 @@
std::vector<lldb::LanguageType>
FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) {
switch (lang_type) {
+ case lldb::eLanguageTypeSwift:
+ return {lldb::eLanguageTypeSwift, lldb::eLanguageTypeObjC};
+ case lldb::eLanguageTypeObjC:
+ return {lldb::eLanguageTypeObjC, lldb::eLanguageTypeSwift};
case lldb::eLanguageTypeC:
case lldb::eLanguageTypeC89:
case lldb::eLanguageTypeC99:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71316.233226.patch
Type: text/x-patch
Size: 1372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191211/ef7cd132/attachment.bin>
More information about the lldb-commits
mailing list