From 1d0089fa5c9e121ccdf6ba2a4ac1ec6690361e55 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Thu, 3 Jul 2014 00:49:08 +0000 Subject: [PATCH] Add enumerations for additional languages from DWARF spec updates. llvm-svn: 212246 --- lldb/include/lldb/lldb-enumerations.h | 9 +++++++++ lldb/source/Commands/CommandObjectBreakpoint.cpp | 3 +++ .../CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp | 4 +++- lldb/source/Target/LanguageRuntime.cpp | 9 +++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h index 12c3952..ab7faa4 100644 --- a/lldb/include/lldb/lldb-enumerations.h +++ b/lldb/include/lldb/lldb-enumerations.h @@ -369,6 +369,15 @@ namespace lldb { eLanguageTypeUPC = 0x0012, ///< Unified Parallel C. eLanguageTypeD = 0x0013, ///< D. eLanguageTypePython = 0x0014, ///< Python. + eLanguageTypeOpenCL = 0x0015, ///< OpenCL. + eLanguageTypeGo = 0x0016, ///< Go. + eLanguageTypeModula3 = 0x0017, ///< Modula 3. + eLanguageTypeHaskell = 0x0018, ///< Haskell. + eLanguageTypeC_plus_plus_03 = 0x0019, ///< ISO C++:2003. + eLanguageTypeC_plus_plus_11 = 0x001a, ///< ISO C++:2011. + eLanguageTypeOCaml = 0x001b, ///< OCaml. + eLanguageTypeRust = 0x001c, ///< Rust. + eLanguageTypeC11 = 0x001d, ///< ISO C:2011. eNumLanguageTypes } LanguageType; diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index e521041..739aac3 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -154,9 +154,12 @@ public: case eLanguageTypeC89: case eLanguageTypeC: case eLanguageTypeC99: + case eLanguageTypeC11: m_language = eLanguageTypeC; break; case eLanguageTypeC_plus_plus: + case eLanguageTypeC_plus_plus_03: + case eLanguageTypeC_plus_plus_11: m_language = eLanguageTypeC_plus_plus; break; case eLanguageTypeObjC: diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index d22e660..a6c74f3 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -289,7 +289,9 @@ ItaniumABILanguageRuntime::CreateInstance (Process *process, lldb::LanguageType { // FIXME: We have to check the process and make sure we actually know that this process supports // the Itanium ABI. - if (language == eLanguageTypeC_plus_plus) + if (language == eLanguageTypeC_plus_plus || + language == eLanguageTypeC_plus_plus_03 || + language == eLanguageTypeC_plus_plus_11) return new ItaniumABILanguageRuntime (process); else return NULL; diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index a2b7f1d..e8bd76c 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -307,6 +307,15 @@ struct language_name_pair language_names[] = { "upc", eLanguageTypeUPC }, { "d", eLanguageTypeD }, { "python", eLanguageTypePython }, + { "opencl", eLanguageTypeOpenCL }, + { "go", eLanguageTypeGo }, + { "modula3", eLanguageTypeModula3 }, + { "haskell", eLanguageTypeHaskell }, + { "c++03", eLanguageTypeC_plus_plus_03 }, + { "c++11", eLanguageTypeC_plus_plus_11 }, + { "ocaml", eLanguageTypeOCaml }, + { "rust", eLanguageTypeRust }, + { "c11", eLanguageTypeC11 }, // Now synonyms, in arbitrary order { "objc", eLanguageTypeObjC }, { "objc++", eLanguageTypeObjC_plus_plus } -- 2.7.4