[PATCH] D42418: IRMover: remove unused (?) code
    Eugene Leviant via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jan 23 05:39:02 PST 2018
    
    
  
evgeny777 created this revision.
evgeny777 added reviewers: tejohnson, rafael.
Herald added a subscriber: mehdi_amini.
I've come across this strange piece of code while trying to teach ThinLTO to import external constant objects. It looks like no test is dependent on it. What's the purpose of it?
https://reviews.llvm.org/D42418
Files:
  lib/Linker/IRMover.cpp
Index: lib/Linker/IRMover.cpp
===================================================================
--- lib/Linker/IRMover.cpp
+++ lib/Linker/IRMover.cpp
@@ -94,11 +94,6 @@
                                    SpeculativeDstOpaqueTypes.size());
     for (StructType *Ty : SpeculativeDstOpaqueTypes)
       DstResolvedOpaqueTypes.erase(Ty);
-  } else {
-    for (Type *Ty : SpeculativeTypes)
-      if (auto *STy = dyn_cast<StructType>(Ty))
-        if (STy->hasName())
-          STy->setName("");
   }
   SpeculativeTypes.clear();
   SpeculativeDstOpaqueTypes.clear();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42418.131050.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/56cc4b16/attachment.bin>
    
    
More information about the llvm-commits
mailing list