From e3f908a557d3e463353aad6b41a6fcd77d049c71 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 6 Dec 2022 22:54:22 +0300 Subject: [PATCH] [exegesis] Attempt to workaround GCC7 compiler bug https://lab.llvm.org/staging/#/builders/235/builds/731/steps/5/logs/FAIL__Building_CXX_object_tools_llvm-exegesis_lib_ --- llvm/tools/llvm-exegesis/lib/CodeTemplate.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/tools/llvm-exegesis/lib/CodeTemplate.h b/llvm/tools/llvm-exegesis/lib/CodeTemplate.h index 9235217..16982f9 100644 --- a/llvm/tools/llvm-exegesis/lib/CodeTemplate.h +++ b/llvm/tools/llvm-exegesis/lib/CodeTemplate.h @@ -133,7 +133,10 @@ struct CodeTemplate { // the pointer to this memory is passed in to the function. unsigned ScratchSpacePointerInReg = 0; +#if defined(__GNUC__) && (defined(__clang__) || LLVM_GNUC_PREREQ(8, 0, 0)) + // FIXME: GCC7 bug workaround. Drop #if after GCC7 no longer supported. private: +#endif CodeTemplate(const CodeTemplate &); // default CodeTemplate &operator=(const CodeTemplate &); // default }; -- 2.7.4