[llvm] [NFC][LLVM] Fix a couple of build warnings (PR #116490)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 16 08:12:11 PST 2024
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/116490
- Fix `HANDLE_EXTENSION` macro redefinition warning in LTOBackend.cpp
- Fix "unnecessary brackets" around rf/df variable definitions warning.
>From 3418597061079566033e4cef60432adca339704a Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Sat, 16 Nov 2024 08:08:04 -0800
Subject: [PATCH] [NFC][LLVM] Fix a couple of build warnings
---
llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp | 4 ++--
llvm/lib/LTO/LTOBackend.cpp | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
index fd11450b635b48..71036f33cf9291 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
@@ -42,7 +42,7 @@ extern "C" void __deregister_frame(void *);
// but using the MingW runtime.
static void __register_frame(void *p) {
static bool Searched = false;
- static void((*rf)(void *)) = 0;
+ static void (*rf)(void *) = 0;
if (!Searched) {
Searched = true;
@@ -55,7 +55,7 @@ static void __register_frame(void *p) {
static void __deregister_frame(void *p) {
static bool Searched = false;
- static void((*df)(void *)) = 0;
+ static void (*df)(void *) = 0;
if (!Searched) {
Searched = true;
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index ad332d25d9c082..bdf4ff8960bc82 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -182,12 +182,14 @@ Error Config::addSaveTemps(std::string OutputFileName, bool UseInputModulePath,
#define HANDLE_EXTENSION(Ext) \
llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
#include "llvm/Support/Extension.def"
+#undef HANDLE_EXTENSION
static void RegisterPassPlugins(ArrayRef<std::string> PassPlugins,
PassBuilder &PB) {
#define HANDLE_EXTENSION(Ext) \
get##Ext##PluginInfo().RegisterPassBuilderCallbacks(PB);
#include "llvm/Support/Extension.def"
+#undef HANDLE_EXTENSION
// Load requested pass plugins and let them register pass builder callbacks
for (auto &PluginFN : PassPlugins) {
More information about the llvm-commits
mailing list