[lld] d5682e5 - [ELF] checkDynamicRelocsDefault: invert the condition

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 22:25:14 PDT 2023


Author: Fangrui Song
Date: 2023-09-15T22:25:09-07:00
New Revision: d5682e5777cd62ac9526e3c2eb2f131f63a8db10

URL: https://github.com/llvm/llvm-project/commit/d5682e5777cd62ac9526e3c2eb2f131f63a8db10
DIFF: https://github.com/llvm/llvm-project/commit/d5682e5777cd62ac9526e3c2eb2f131f63a8db10.diff

LOG: [ELF] checkDynamicRelocsDefault: invert the condition

Fixes: 64c9dbbf4e82224a64dc878e2dc8f7d7541746eb

Added: 
    

Modified: 
    lld/ELF/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index ebed8221a039b1f..24ffc70d74a8085 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1714,7 +1714,7 @@ static void setConfigs(opt::InputArgList &args) {
   // have support for reading Elf_Rel addends, so we only enable for a subset.
 #ifndef NDEBUG
   bool checkDynamicRelocsDefault =
-      llvm::is_contained({EM_AMDGPU, EM_HEXAGON, EM_PPC, EM_PPC64}, m);
+      !llvm::is_contained({EM_AMDGPU, EM_HEXAGON, EM_PPC, EM_PPC64}, m);
 #else
   bool checkDynamicRelocsDefault = false;
 #endif


        


More information about the llvm-commits mailing list