File tree Expand file tree Collapse file tree 17 files changed +53
-47
lines changed
Plugins/ExpressionParser/Clang
llvm/utils/gn/secondary/lldb/include/lldb
utils/bazel/llvm-project-overlay/lldb Expand file tree Collapse file tree 17 files changed +53
-47
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ file(GLOB_RECURSE SWIG_SOURCES *.swig)
33file (GLOB SWIG_HEADERS
44 ${LLDB_SOURCE_DIR} /include /lldb/API/*.h
55 ${LLDB_SOURCE_DIR} /include /lldb/*.h
6- ${LLDB_BINARY_DIR} /include /lldb/API/SBLanguages .h
6+ ${LLDB_BINARY_DIR} /include /lldb/SourceLanguageNames .h
77)
88file (GLOB SWIG_PRIVATE_HEADERS
99 ${LLDB_SOURCE_DIR} /include /lldb/lldb-private *.h
Original file line number Diff line number Diff line change 3939#include " lldb/API/SBHostOS.h"
4040#include " lldb/API/SBInstruction.h"
4141#include " lldb/API/SBInstructionList.h"
42- #include " lldb/API/SBLanguages.h"
4342#include " lldb/API/SBLanguageRuntime.h"
4443#include " lldb/API/SBLaunchInfo.h"
4544#include " lldb/API/SBLineEntry.h"
Original file line number Diff line number Diff line change 120120%include " lldb/API/SBHostOS.h"
121121%include " lldb/API/SBInstruction.h"
122122%include " lldb/API/SBInstructionList.h"
123- %include " lldb/API/SBLanguages.h"
124123%include " lldb/API/SBLanguageRuntime.h"
125124%include " lldb/API/SBLaunchInfo.h"
126125%include " lldb/API/SBLineEntry.h"
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ endif()
7171# At configuration time, collect headers for the framework bundle and copy them
7272# into a staging directory. Later we can copy over the entire folder.
7373file (GLOB public_headers ${LLDB_SOURCE_DIR} /include /lldb/API/*.h)
74- set (generated_public_headers ${LLDB_OBJ_DIR} /include /lldb/API/SBLanguages .h)
74+ set (generated_public_headers ${LLDB_OBJ_DIR} /include /lldb/SourceLanguageNames .h)
7575file (GLOB root_public_headers ${LLDB_SOURCE_DIR} /include /lldb/lldb-*.h)
7676file (GLOB root_private_headers ${LLDB_SOURCE_DIR} /include /lldb/lldb-private *.h)
7777list (REMOVE_ITEM root_public_headers ${root_private_headers} )
Original file line number Diff line number Diff line change 4242#include " lldb/API/SBInstruction.h"
4343#include " lldb/API/SBInstructionList.h"
4444#include " lldb/API/SBLanguageRuntime.h"
45- #include " lldb/API/SBLanguages.h"
4645#include " lldb/API/SBLaunchInfo.h"
4746#include " lldb/API/SBLineEntry.h"
4847#include " lldb/API/SBListener.h"
Original file line number Diff line number Diff line change 1010#define LLDB_API_SBEXPRESSIONOPTIONS_H
1111
1212#include " lldb/API/SBDefines.h"
13- #include " lldb/API/SBLanguages.h"
1413
1514#include < vector>
1615
@@ -71,7 +70,7 @@ class LLDB_API SBExpressionOptions {
7170 // / Set the language using a pair of language code and version as
7271 // / defined by the DWARF 6 specification.
7372 // / WARNING: These codes may change until DWARF 6 is finalized.
74- void SetLanguage (lldb::SBSourceLanguageName name, uint32_t version);
73+ void SetLanguage (lldb::SourceLanguageName name, uint32_t version);
7574
7675#ifndef SWIG
7776 void SetCancelCallback (lldb::ExpressionCancelCallback callback, void *baton);
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ class EvaluateExpressionOptions {
324324 // / Set the language using a pair of language code and version as
325325 // / defined by the DWARF 6 specification.
326326 // / WARNING: These codes may change until DWARF 6 is finalized.
327- void SetLanguage (uint16_t name, uint32_t version) {
327+ void SetLanguage (lldb::SourceLanguageName name, uint32_t version) {
328328 m_language = SourceLanguage (name, version);
329329 }
330330
Original file line number Diff line number Diff line change 1212#include < cstdint>
1313#include < type_traits>
1414
15+ #include " lldb/SourceLanguageNames.h"
16+
1517#ifndef SWIG
1618// Macro to enable bitmask operations on an enum. Without this, Enum | Enum
1719// gets promoted to an int, so you have to say Enum a = Enum(eFoo | eBar). If
Original file line number Diff line number Diff line change @@ -103,18 +103,19 @@ struct RegisterSet {
103103struct SourceLanguage {
104104 SourceLanguage () = default ;
105105 SourceLanguage (lldb::LanguageType language_type);
106- SourceLanguage (uint16_t name, uint32_t version)
106+ SourceLanguage (lldb::SourceLanguageName name, uint32_t version)
107107 : name(name), version(version) {}
108- SourceLanguage (std::optional<std::pair<uint16_t , uint32_t >> name_vers)
109- : name(name_vers ? name_vers->first : 0 ),
108+ SourceLanguage (
109+ std::optional<std::pair<lldb::SourceLanguageName, uint32_t >> name_vers)
110+ : name(name_vers ? std::optional(name_vers->first) : std::nullopt ),
110111 version (name_vers ? name_vers->second : 0 ) {}
111- operator bool () const { return name > 0 ; }
112+ operator bool () const { return name. has_value () ; }
112113 lldb::LanguageType AsLanguageType () const ;
113114 llvm::StringRef GetDescription () const ;
114115 bool IsC () const ;
115116 bool IsObjC () const ;
116117 bool IsCPlusPlus () const ;
117- uint16_t name = 0 ;
118+ std::optional<lldb::SourceLanguageName> name;
118119 uint32_t version = 0 ;
119120};
120121
Original file line number Diff line number Diff line change 55import os
66
77HEADER = """\
8- //===-- SBLanguages .h ------ -----------------------------------*- C++ -*-===//
8+ //===-- SourceLanguageNames .h -----------------------------------*- C++ -*-===//
99//
1010// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1111// See https://llvm.org/LICENSE.txt for license information.
1212// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1313//
1414//===----------------------------------------------------------------------===//
1515
16- #ifndef LLDB_API_SBLANGUAGE_H
17- #define LLDB_API_SBLANGUAGE_H
16+ #ifndef LLDB_SOURCELANGUAGENAMES_H
17+ #define LLDB_SOURCELANGUAGENAMES_H
1818
1919namespace lldb {
20- /// Used by \\ ref SBExpressionOptions.
2120/// These enumerations use the same language enumerations as the DWARF
2221/// specification for ease of use and consistency.
23- enum SBSourceLanguageName : uint16_t {
22+ enum SourceLanguageName {
2423"""
2524
2625FOOTER = """\
You can’t perform that action at this time.
0 commit comments