diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp --- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp +++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp @@ -231,7 +231,8 @@ static bool UseTestResultOverride = false; static int64_t TestResultOverride = 0; -extern "C" void llvm_jitlink_setTestResultOverride(int64_t Value) { +extern "C" LLVM_ATTRIBUTE_USED void +llvm_jitlink_setTestResultOverride(int64_t Value) { TestResultOverride = Value; UseTestResultOverride = true; }