This is an archive of the discontinued LLVM Phabricator instance.

Fix the build errors when enabling -DLLVM_ENABLE_MODULES=On and change e53e6ec6ef74
ClosedPublic

Authored by rastogishubham on Feb 10 2022, 12:40 PM.

Details

Summary

With change e53e6ec6ef74 we see errors like

/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: error: expected identifier
#include "ELFRelocs/LoongArch.def"
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: error: expected '}'
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:6: note: to match this '{'
enum {

^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:7: error: expected ';' after enum
enum {

^
;
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:876:1: warning: declaration does not declare anything [-Wmissing-declarations]
enum {
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:877:1: fatal error: import of module 'LLVM_BinaryFormat.ELFRelocs.LoongArch' appears within namespace 'llvm::ELF'
#include "ELFRelocs/LoongArch.def"
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:27:1: note: namespace 'llvm::ELF' begins here
namespace ELF {
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/llvm/lib/BinaryFormat/AMDGPUMetadataVerifier.cpp:14:10: fatal error: could not build module 'LLVM_BinaryFormat'
#include "llvm/BinaryFormat/AMDGPUMetadataVerifier.h"
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On the lldb bots. This patch fixes it

Diff Detail

Event Timeline

rastogishubham requested review of this revision.Feb 10 2022, 12:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2022, 12:40 PM
aprantl accepted this revision.Feb 10 2022, 1:36 PM
This revision is now accepted and ready to land.Feb 10 2022, 1:36 PM
This revision was landed with ongoing or failed builds.Feb 10 2022, 1:37 PM
This revision was automatically updated to reflect the committed changes.