This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -850,9 +850,9 @@ void DwarfDebug::endModule() {
850
850
Asm->OutStreamer .EmitLabel (Asm->GetTempSymbol (" data_end" ));
851
851
852
852
// End text sections.
853
- for (unsigned i = 1 , N = SectionMap.size (); i <= N ; ++i ) {
854
- Asm->OutStreamer .SwitchSection (SectionMap[i ]);
855
- Asm->OutStreamer .EmitLabel (Asm->GetTempSymbol (" section_end" , i ));
853
+ for (unsigned I = 0 , E = SectionMap.size (); I != E ; ++I ) {
854
+ Asm->OutStreamer .SwitchSection (SectionMap[I ]);
855
+ Asm->OutStreamer .EmitLabel (Asm->GetTempSymbol (" section_end" , I+ 1 ));
856
856
}
857
857
858
858
// Compute DIE offsets and sizes.
Original file line number Diff line number Diff line change 21
21
#include " llvm/MC/MachineLocation.h"
22
22
#include " llvm/ADT/DenseMap.h"
23
23
#include " llvm/ADT/FoldingSet.h"
24
+ #include " llvm/ADT/SetVector.h"
24
25
#include " llvm/ADT/SmallPtrSet.h"
25
26
#include " llvm/ADT/StringMap.h"
26
- #include " llvm/ADT/UniqueVector.h"
27
27
#include " llvm/Support/Allocator.h"
28
28
#include " llvm/Support/DebugLoc.h"
29
29
@@ -231,7 +231,7 @@ class DwarfDebug {
231
231
232
232
// / SectionMap - Provides a unique id per text section.
233
233
// /
234
- UniqueVector <const MCSection*> SectionMap;
234
+ SetVector <const MCSection*> SectionMap;
235
235
236
236
// / CurrentFnArguments - List of Arguments (DbgValues) for current function.
237
237
SmallVector<DbgVariable *, 8 > CurrentFnArguments;
Original file line number Diff line number Diff line change 28
28
#include " llvm/Analysis/CallGraph.h"
29
29
#include " llvm/Analysis/CaptureTracking.h"
30
30
#include " llvm/ADT/SCCIterator.h"
31
+ #include " llvm/ADT/SetVector.h"
31
32
#include " llvm/ADT/SmallSet.h"
32
33
#include " llvm/ADT/Statistic.h"
33
- #include " llvm/ADT/UniqueVector.h"
34
34
#include " llvm/Support/InstIterator.h"
35
35
using namespace llvm ;
36
36
@@ -486,13 +486,13 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
486
486
// / or a pointer that doesn't alias any other pointer visible to the caller.
487
487
bool FunctionAttrs::IsFunctionMallocLike (Function *F,
488
488
SmallPtrSet<Function*, 8 > &SCCNodes) const {
489
- UniqueVector <Value *> FlowsToReturn;
489
+ SmallSetVector <Value *, 8 > FlowsToReturn;
490
490
for (Function::iterator I = F->begin (), E = F->end (); I != E; ++I)
491
491
if (ReturnInst *Ret = dyn_cast<ReturnInst>(I->getTerminator ()))
492
492
FlowsToReturn.insert (Ret->getReturnValue ());
493
493
494
494
for (unsigned i = 0 ; i != FlowsToReturn.size (); ++i) {
495
- Value *RetVal = FlowsToReturn[i+ 1 ]; // UniqueVector[0] is reserved.
495
+ Value *RetVal = FlowsToReturn[i];
496
496
497
497
if (Constant *C = dyn_cast<Constant>(RetVal)) {
498
498
if (!C->isNullValue () && !isa<UndefValue>(C))
You can’t perform that action at this time.
0 commit comments