From 9bf5d91361655eaaea20006dc9a4a92d212323d2 Mon Sep 17 00:00:00 2001 From: Mikael Holmen Date: Thu, 7 Oct 2021 07:18:04 +0200 Subject: [PATCH] [GlobalISel] Silence gcc warning about unused variable --- llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index f33eac4..711006d 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -3184,6 +3184,9 @@ bool IRTranslator::emitSPDescriptorParent(StackProtectorDescriptor &SPD, // This path is currently untestable on GlobalISel, since the only platform // that needs this seems to be Windows, and we fall back on that currently. // The code still lives here in case that changes. + // Silence warning about unused variable until the code below that uses + // 'GuardCheckFn' is enabled. + (void)GuardCheckFn; return false; #if 0 // The target provides a guard check function to validate the guard value. -- 2.7.4