Author: Raphael Isemann Date: 2021-09-10T13:10:19+02:00 New Revision: 0c8444bd3462a3d05c8ac637a554e1a368dee0ac
URL: https://github.com/llvm/llvm-project/commit/0c8444bd3462a3d05c8ac637a554e1a368dee0ac DIFF: https://github.com/llvm/llvm-project/commit/0c8444bd3462a3d05c8ac637a554e1a368dee0ac.diff LOG: [lldb] Fix Clang modules build after D101329 D101329 introduces the Process:SaveCore function returning a `llvm::Expected<bool>`. That function causes that Clang with -fmodules crashes while compiling LLDB's PythonDataObjects.cpp. With enabled asserts Clang fails because of: Assertion failed: (CachedFieldIndex && "failed to find field in parent") Crash can be reproduced by building via -DLLVM_ENABLE_MODULES=On with Clang 12.0.1 and then building PythonDataObjects.cpp.o . Clang bug is tracked at rdar://82901462 Added: Modified: lldb/include/lldb/Target/Process.h lldb/source/Target/Process.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index eb7ad99d5adf3..741c9e1021cc6 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -695,9 +695,7 @@ class Process : public std::enable_shared_from_this<Process>, /// \return /// true if saved successfully, false if saving the core dump /// is not supported by the plugin, error otherwise. - virtual llvm::Expected<bool> SaveCore(llvm::StringRef outfile) { - return false; - } + virtual llvm::Expected<bool> SaveCore(llvm::StringRef outfile); protected: virtual JITLoaderList &GetJITLoaders(); diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 5ae37d062581d..540f58d2ebc9e 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2650,6 +2650,10 @@ DynamicLoader *Process::GetDynamicLoader() { DataExtractor Process::GetAuxvData() { return DataExtractor(); } +llvm::Expected<bool> Process::SaveCore(llvm::StringRef outfile) { + return false; +} + JITLoaderList &Process::GetJITLoaders() { if (!m_jit_loaders_up) { m_jit_loaders_up = std::make_unique<JITLoaderList>(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits