[llvm] 91f69b7 - [ORC] Remove redundant check from ObjectLinkingLayer.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 1 22:27:19 PST 2024


Author: Lang Hames
Date: 2024-12-02T17:27:12+11:00
New Revision: 91f69b70e075a475b550e3ef832816c47311e2bd

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

LOG: [ORC] Remove redundant check from ObjectLinkingLayer.

Non-locally scoped symbols must have names.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
index 592941752805a7..c1c55408c78584 100644
--- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
@@ -236,7 +236,7 @@ class ObjectLinkingLayerJITLinkContext final : public JITLinkContext {
 
     SymbolMap InternedResult;
     for (auto *Sym : G.defined_symbols())
-      if (Sym->hasName() && Sym->getScope() != Scope::Local) {
+      if (Sym->getScope() != Scope::Local) {
         auto InternedName = ES.intern(Sym->getName());
         auto Ptr = getJITSymbolPtrForSymbol(*Sym, G.getTargetTriple());
         auto Flags = getJITSymbolFlagsForSymbol(*Sym);
@@ -249,7 +249,7 @@ class ObjectLinkingLayerJITLinkContext final : public JITLinkContext {
       }
 
     for (auto *Sym : G.absolute_symbols())
-      if (Sym->hasName() && Sym->getScope() != Scope::Local) {
+      if (Sym->getScope() != Scope::Local) {
         auto InternedName = ES.intern(Sym->getName());
         auto Ptr = getJITSymbolPtrForSymbol(*Sym, G.getTargetTriple());
         auto Flags = getJITSymbolFlagsForSymbol(*Sym);


        


More information about the llvm-commits mailing list