Skip to content

Commit

Permalink
[LLDB] Add minimal support for the new Mojo language
Browse files Browse the repository at this point in the history
Modular just announced a new language called Mojo. This patch adds an entry in the language list in LLDB for minimal support (e.g. being able to create a TypeSystem for this language). We will later add debug info entries when the language matures.
  • Loading branch information
walter-erquinigo committed May 6, 2023
1 parent a28261c commit 9f5ef42
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lldb/docs/python_api_enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ LanguageType
.. py:data:: eLanguageTypeFortran03
.. py:data:: eLanguageTypeFortran08
.. py:data:: eLanguageTypeMipsAssembler
.. py:data:: eLanguageTypeMojo
.. py:data:: eLanguageTypeExtRenderScript
.. py:data:: eNumLanguageTypes
Expand Down
3 changes: 3 additions & 0 deletions lldb/include/lldb/lldb-enumerations.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ enum LanguageType {
// Language::SetLanguageFromCString and Language::AsCString assume these can
// be used as indexes into array g_languages.
eLanguageTypeMipsAssembler, ///< Mips_Assembler.
// Mojo will move to the common list of languages once the DWARF committee
// creates a language code for it.
eLanguageTypeMojo,
eNumLanguageTypes
};

Expand Down
1 change: 1 addition & 0 deletions lldb/source/Target/Language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ struct language_name_pair language_names[] = {
{"ada2012", eLanguageTypeAda2012},
// Vendor Extensions
{"assembler", eLanguageTypeMipsAssembler},
{"mojo", eLanguageTypeMojo},
// Now synonyms, in arbitrary order
{"objc", eLanguageTypeObjC},
{"objc++", eLanguageTypeObjC_plus_plus},
Expand Down

0 comments on commit 9f5ef42

Please sign in to comment.