Skip to content

Commit

Permalink
Revert an unintentional API ABI break
Browse files Browse the repository at this point in the history
lldb::LanguageType is used as a parameter in
SBExpressionOptions::SetLanguage(), which actually makes this type API
too. Commit 6eaedbb added a
`: uint16_t` to it, which broke binary compatibility for the SBAPI. This
patch reverts to the original enum.

I tried moving the entire enum into include/API, but that created a
cyclic module dependency between API and Utility. To keep things
simple, this just reverts to the original code and adds a warning.

rdar://103415402

Differential Revision: https://reviews.llvm.org/D141087
  • Loading branch information
adrian-prantl committed Jan 5, 2023
1 parent 8184949 commit 69f2b5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lldb/include/lldb/lldb-enumerations.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,10 @@ FLAGS_ENUM(WatchpointEventType){
/// specification for ease of use and consistency.
/// The enum -> string code is in Language.cpp, don't change this
/// table without updating that code as well.
enum LanguageType : uint16_t {
///
/// This datatype is used in SBExpressionOptions::SetLanguage() which
/// makes this type API. Do not change its underlying storage type!
enum LanguageType {
eLanguageTypeUnknown = 0x0000, ///< Unknown or invalid language value.
eLanguageTypeC89 = 0x0001, ///< ISO C:1989.
eLanguageTypeC = 0x0002, ///< Non-standardized C, such as K&R.
Expand Down

0 comments on commit 69f2b5f

Please sign in to comment.