Mesa (master): aco: fix disassembly with LLVM 11
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 19 14:37:32 UTC 2020
Module: Mesa
Branch: master
Commit: bcb0038c8399f7050eb49cfdb227d3d91c1e8804
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bcb0038c8399f7050eb49cfdb227d3d91c1e8804
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Fri May 15 21:31:35 2020 +0100
aco: fix disassembly with LLVM 11
SymbolInfoTy was modified in LLVM 11. It is also in MCDisassembler.h now
and we don't have to duplicate it anymore.
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5060>
---
src/amd/compiler/aco_print_asm.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp
index 1c152e5b73e..0c69b8c7de3 100644
--- a/src/amd/compiler/aco_print_asm.cpp
+++ b/src/amd/compiler/aco_print_asm.cpp
@@ -5,6 +5,9 @@
#include "ac_llvm_util.h"
#include <llvm/ADT/StringRef.h>
+#if LLVM_VERSION_MAJOR >= 11
+#include <llvm/MC/MCDisassembler/MCDisassembler.h>
+#endif
namespace aco {
@@ -92,7 +95,11 @@ void print_asm(Program *program, std::vector<uint32_t>& binary,
referenced_blocks[succ] = true;
}
+ #if LLVM_VERSION_MAJOR >= 11
+ std::vector<llvm::SymbolInfoTy> symbols;
+ #else
std::vector<std::tuple<uint64_t, llvm::StringRef, uint8_t>> symbols;
+ #endif
std::vector<std::array<char,16>> block_names;
block_names.reserve(program->blocks.size());
for (Block& block : program->blocks) {
More information about the mesa-commit
mailing list