- const Type *Ty = CPE.getType();
- if (TAI->getFourByteConstantSection() &&
- TM.getTargetData()->getABITypeSize(Ty) == 4)
- FourByteCPs.push_back(std::make_pair(CPE, i));
- else if (TAI->getEightByteConstantSection() &&
- TM.getTargetData()->getABITypeSize(Ty) == 8)
- EightByteCPs.push_back(std::make_pair(CPE, i));
- else if (TAI->getSixteenByteConstantSection() &&
- TM.getTargetData()->getABITypeSize(Ty) == 16)
- SixteenByteCPs.push_back(std::make_pair(CPE, i));
- else
- OtherCPs.push_back(std::make_pair(CPE, i));
+ const Section* S = TAI->SelectSectionForMachineConst(CPE.getType());
+ CPs.insert(std::make_pair(S, std::make_pair(CPE, i)));
+ Sections.insert(S);