File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 99#ifndef  LLVM_MC_MCOBJECTSTREAMER_H
1010#define  LLVM_MC_MCOBJECTSTREAMER_H 
1111
12+ #include  " llvm/ADT/SetVector.h" 
1213#include  " llvm/ADT/SmallVector.h" 
1314#include  " llvm/MC/MCAssembler.h" 
1415#include  " llvm/MC/MCSection.h" 
@@ -38,7 +39,7 @@ class MCObjectStreamer : public MCStreamer {
3839  bool  EmitEHFrame;
3940  bool  EmitDebugFrame;
4041  SmallVector<MCSymbol *, 2 > PendingLabels;
41-   SmallVector <MCSection*, 2 > PendingLabelSections;
42+   SmallSetVector <MCSection  *, 4 > PendingLabelSections;
4243  unsigned  CurSubsectionIdx;
4344  struct  PendingMCFixup  {
4445    const  MCSymbol *Sym;
Original file line number Diff line number Diff line change @@ -59,12 +59,8 @@ void MCObjectStreamer::addPendingLabel(MCSymbol* S) {
5959    CurSection->addPendingLabel (S, CurSubsectionIdx);
6060
6161    //  Add this Section to the list of PendingLabelSections.
62-     auto  SecIt = std::find (PendingLabelSections.begin (),
63-                            PendingLabelSections.end (), CurSection);
64-     if  (SecIt == PendingLabelSections.end ())
65-       PendingLabelSections.push_back (CurSection);
66-   }
67-   else 
62+     PendingLabelSections.insert (CurSection);
63+   } else 
6864    //  There is no Section / Subsection for this label yet.
6965    PendingLabels.push_back (S);
7066}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments