Kill off <TARGET>MachineModule variables, and <TARGETASMPRINTER>ForceLink
[oota-llvm.git] / lib / Target / DarwinTargetAsmInfo.cpp
index 609497638a04ef59e9f0a1f4d6fdd32a44e4631d..7ab3967c0d1bf2bd0c006d223ce927ac402a78ee 100644 (file)
@@ -58,7 +58,6 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
   GlobalPrefix = "_";
   PrivateGlobalPrefix = "L";
   LessPrivateGlobalPrefix = "l";  // Marker for some ObjC metadata
-  StringConstantPrefix = "\1LC";
   NeedsSet = true;
   NeedsIndirectEncoding = true;
   AllowQuotesInName = true;
@@ -103,18 +102,21 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
 /// emitUsedDirectiveFor - On Darwin, internally linked data beginning with
 /// the PrivateGlobalPrefix or the LessPrivateGlobalPrefix does not have the
 /// directive emitted (this occurs in ObjC metadata).
-
 bool
 DarwinTargetAsmInfo::emitUsedDirectiveFor(const GlobalValue* GV,
                                           Mangler *Mang) const {
   if (GV==0)
     return false;
+  
+  /// FIXME: WHAT IS THIS?
+  
   if (GV->hasLocalLinkage() && !isa<Function>(GV) &&
       ((strlen(getPrivateGlobalPrefix()) != 0 &&
-        Mang->getValueName(GV).substr(0,strlen(getPrivateGlobalPrefix())) ==
+        Mang->getMangledName(GV).substr(0,strlen(getPrivateGlobalPrefix())) ==
           getPrivateGlobalPrefix()) ||
        (strlen(getLessPrivateGlobalPrefix()) != 0 &&
-        Mang->getValueName(GV).substr(0,strlen(getLessPrivateGlobalPrefix())) ==
+        Mang->getMangledName(GV).substr(0,
+                                        strlen(getLessPrivateGlobalPrefix())) ==
           getLessPrivateGlobalPrefix())))
     return false;
   return true;
@@ -152,7 +154,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
             ConstDataCoalSection:
             MergeableConstSection(cast<GlobalVariable>(GV)));
    default:
-    LLVM_UNREACHABLE("Unsuported section kind for global");
+    llvm_unreachable("Unsuported section kind for global");
   }
 
   // FIXME: Do we have any extra special weird cases?
@@ -212,6 +214,6 @@ DarwinTargetAsmInfo::SelectSectionForMachineConst(const Type *Ty) const {
 std::string
 DarwinTargetAsmInfo::UniqueSectionForGlobal(const GlobalValue* GV,
                                                SectionKind::Kind kind) const {
-  LLVM_UNREACHABLE("Darwin does not use unique sections");
+  llvm_unreachable("Darwin does not use unique sections");
   return "";
 }