Skip to content
Snippets Groups Projects
Commit d19e91e5 authored by Anton Korobeynikov's avatar Anton Korobeynikov
Browse files

SmallPtrSet will be better

llvm-svn: 56583
parent 8e7b9393
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringExtras.h"
...@@ -262,7 +261,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) { ...@@ -262,7 +261,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
std::multimap<const Section*, std::multimap<const Section*,
std::pair<MachineConstantPoolEntry, unsigned> > CPMap; std::pair<MachineConstantPoolEntry, unsigned> > CPMap;
CPMap CPs; CPMap CPs;
DenseSet<const Section*> Sections; SmallPtrSet<const Section*, 5> Sections;
for (unsigned i = 0, e = CP.size(); i != e; ++i) { for (unsigned i = 0, e = CP.size(); i != e; ++i) {
MachineConstantPoolEntry CPE = CP[i]; MachineConstantPoolEntry CPE = CP[i];
...@@ -272,7 +271,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) { ...@@ -272,7 +271,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
} }
// Now print stuff into the calculated sections. // Now print stuff into the calculated sections.
for (DenseSet<const Section*>::iterator IS = Sections.begin(), for (SmallPtrSet<const Section*, 5>::iterator IS = Sections.begin(),
ES = Sections.end(); IS != ES; ++IS) { ES = Sections.end(); IS != ES; ++IS) {
SwitchToSection(*IS); SwitchToSection(*IS);
EmitAlignment(MCP->getConstantPoolAlignment()); EmitAlignment(MCP->getConstantPoolAlignment());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment