Skip to content

Conversation

@jsji
Copy link
Member

@jsji jsji commented Oct 18, 2024

This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11.

Fix warning:

In file included from llvm-project/llvm/lib/BinaryFormat/Minidump.cpp:9:
llvm-project/llvm/include/llvm/BinaryFormat/Minidump.h:250:37: error: multi-character character constant [-Werror=multichar]
250 | static const uint32_t LLDB_FLAG = 'LLDB';

This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11.

Fix warning:

In file included from llvm-project/llvm/lib/BinaryFormat/Minidump.cpp:9:
llvm-project/llvm/include/llvm/BinaryFormat/Minidump.h:250:37: error: multi-character character constant [-Werror=multichar]
  250 |   static const uint32_t LLDB_FLAG = 'LLDB';
@llvmbot
Copy link
Member

llvmbot commented Oct 18, 2024

@llvm/pr-subscribers-llvm-binary-utilities

Author: Jinsong Ji (jsji)

Changes

This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on. Built by GCC 11.

Fix warning:

In file included from llvm-project/llvm/lib/BinaryFormat/Minidump.cpp:9:
llvm-project/llvm/include/llvm/BinaryFormat/Minidump.h:250:37: error: multi-character character constant [-Werror=multichar]
250 | static const uint32_t LLDB_FLAG = 'LLDB';


Full diff: https://github.com/llvm/llvm-project/pull/112809.diff

1 Files Affected:

  • (modified) llvm/include/llvm/BinaryFormat/Minidump.h (+1-1)
diff --git a/llvm/include/llvm/BinaryFormat/Minidump.h b/llvm/include/llvm/BinaryFormat/Minidump.h
index addff42982352f..03497d4c5fa66f 100644
--- a/llvm/include/llvm/BinaryFormat/Minidump.h
+++ b/llvm/include/llvm/BinaryFormat/Minidump.h
@@ -247,7 +247,7 @@ static_assert(sizeof(Thread) == 48);
 struct Exception {
   static constexpr size_t MaxParameters = 15;
   static constexpr size_t MaxParameterBytes = MaxParameters * sizeof(uint64_t);
-  static const uint32_t LLDB_FLAG = 'LLDB';
+  static const uint32_t LLDB_FLAG = 0x4C4C4442; // ASCII for 'LLDB'
 
   support::ulittle32_t ExceptionCode;
   support::ulittle32_t ExceptionFlags;

@jsji jsji requested a review from Jlalond October 18, 2024 02:21
@jsji jsji self-assigned this Oct 18, 2024
@jsji jsji merged commit c742a5d into llvm:main Oct 18, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants