aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2024-11-17 07:54:41 -0800
committerGitHub <noreply@github.com>2024-11-17 07:54:41 -0800
commit5c8c90d8212d8720fd8630aecc634bdff6261ad6 (patch)
tree83b8e6bf7daa2d87fd34bcde1649ab30ff98266a /llvm/lib
parent63aa8cf6becbeb4983e3d1a7fa3cd8a7c7147118 (diff)
downloadllvm-5c8c90d8212d8720fd8630aecc634bdff6261ad6.zip
llvm-5c8c90d8212d8720fd8630aecc634bdff6261ad6.tar.gz
llvm-5c8c90d8212d8720fd8630aecc634bdff6261ad6.tar.bz2
[NFC][LLVM] Fix a couple of build warnings (#116490)
- Fix `HANDLE_EXTENSION` macro redefinition warning in LTOBackend.cpp - Fix "unnecessary brackets" around rf/df variable definitions warning.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp4
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp
index fd11450..71036f3 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 ad332d2..bdf4ff8 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) {