Skip to content

Commit 36cb29c

Browse files
committed
Work around a module build failure on the bots.
This patch works around what looks like a bug in Clang itself. The error on the bot is: https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/40466/consoleText In module 'LLVM_Utils' imported from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h:18: /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Support/Error.h:720:3: error: 'llvm::Expected<bool>::(anonymous)' from module 'LLVM_Utils.Support.Error' is not present in definition of 'llvm::Expected<bool>' in module 'LLVM_Utils.Support.Error' union { ^ /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Support/Error.h:720:3: note: declaration of '' does not match /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/Support/Error.h:720:3: note: declaration of '' does not match 1 error generated. The intention is to revert this as soon as a proper fix has been identified! rdar://87845391
1 parent 4af1127 commit 36cb29c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
1010
#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
1111

12+
// BEGIN FIXME
13+
// This declaration works around a clang module build failure.
14+
// It should be deleted ASAP.
15+
#include "llvm/Support/Error.h"
16+
static llvm::Expected<bool> *g_fcxx_modules_workaround;
17+
// END
18+
1219
#include "lldb/Host/Config.h"
1320

1421
// Python.h needs to be included before any system headers in order to avoid

0 commit comments

Comments
 (0)