fix a llvm14 compilation error
authorYonghong Song <yhs@fb.com>
Thu, 14 Oct 2021 23:00:27 +0000 (16:00 -0700)
committerYonghong Song <yhs@fb.com>
Thu, 14 Oct 2021 23:01:36 +0000 (16:01 -0700)
Upstream commit https://reviews.llvm.org/D111454
moved header file llvm/Support/TargetRegistry.h to
llvm/MC/TargetRegistry.h. Let us adjust accordingly
to avoid compilation error.

Signed-off-by: Yonghong Song <yhs@fb.com>
src/cc/bcc_debug.cc

index 97d6d95b9c0163ee4db3fbda9abb0e727b5f635c..52b6571ed6c319d6d237df29fbfb6002f28f1c60 100644 (file)
 #include <llvm/MC/MCInstrInfo.h>
 #include <llvm/MC/MCObjectFileInfo.h>
 #include <llvm/MC/MCRegisterInfo.h>
+#if LLVM_MAJOR_VERSION >= 14
+#include <llvm/MC/TargetRegistry.h>
+#else
 #include <llvm/Support/TargetRegistry.h>
+#endif
 
 #include "bcc_debug.h"