Constify a few things with DotDebugLocEntry.
[oota-llvm.git] / lib / CodeGen / TargetLoweringBase.cpp
index a0ea3b3ba3b9dba15e0304b6222c9f2d4ec55a84..f1b796919134d7ceb51fe9332caf8fe2e81776bf 100644 (file)
@@ -1145,7 +1145,7 @@ void TargetLoweringBase::computeRegisterProperties() {
   for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) {
     const TargetRegisterClass* RRC;
     uint8_t Cost;
-    tie(RRC, Cost) =  findRepresentativeClass((MVT::SimpleValueType)i);
+    std::tie(RRC, Cost) = findRepresentativeClass((MVT::SimpleValueType)i);
     RepRegClassForVT[i] = RRC;
     RepRegClassCostForVT[i] = Cost;
   }
@@ -1428,29 +1428,3 @@ bool TargetLoweringBase::isLegalAddressingMode(const AddrMode &AM,
 
   return true;
 }
-
-void TargetLoweringBase::getNameWithPrefix(SmallVectorImpl<char> &Name,
-                                           const GlobalValue *GV,
-                                           Mangler &Mang) const {
-  if (!GV->hasPrivateLinkage()) {
-    // Simple case: If GV is not private, it is not important to find out if
-    // private labels are legal in this case or not.
-    Mang.getNameWithPrefix(Name, GV, false);
-    return;
-  }
-  SectionKind GVKind =
-    TargetLoweringObjectFile::getKindForGlobal(GV, getTargetMachine());
-  const TargetLoweringObjectFile &TLOF = getObjFileLowering();
-  const MCSection *TheSection =
-    TLOF.SectionForGlobal(GV, GVKind, Mang, getTargetMachine());
-  bool CannotUsePrivateLabel = TLOF.isSectionAtomizableBySymbols(*TheSection);
-  Mang.getNameWithPrefix(Name, GV, CannotUsePrivateLabel);
-}
-
-MCSymbol *TargetLoweringBase::getSymbol(const GlobalValue *GV,
-                                        Mangler &Mang) const {
-  SmallString<60> NameStr;
-  getNameWithPrefix(NameStr, GV, Mang);
-  const TargetLoweringObjectFile &TLOF = getObjFileLowering();
-  return TLOF.getContext().GetOrCreateSymbol(NameStr.str());
-}