Introduce a new technique for merging BasicBlock with Instruction sentinel by superpo...
[oota-llvm.git] / lib / CodeGen / MachOWriter.cpp
index ae1f0d4b045695843071598581ae29a04c750d7f..22c21578ec0cb45b7c858e051fad483e48accd09 100644 (file)
@@ -147,6 +147,11 @@ namespace llvm {
       assert(0 && "JIT specific function called!");
       abort();
     }
+    virtual void startGVStub(const GlobalValue* F, void *Buffer, 
+                             unsigned StubSize) {
+      assert(0 && "JIT specific function called!");
+      abort();
+    }
     virtual void *finishGVStub(const GlobalValue* F) {
       assert(0 && "JIT specific function called!");
       abort();
@@ -371,7 +376,7 @@ void MachOWriter::AddSymbolToSection(MachOSection *Sec, GlobalVariable *GV) {
       SecDataOut.outbyte(0);
   }
   // Globals without external linkage apparently do not go in the symbol table.
-  if (GV->getLinkage() != GlobalValue::InternalLinkage) {
+  if (!GV->hasLocalLinkage()) {
     MachOSym Sym(GV, Mang->getValueName(GV), Sec->Index, TM);
     Sym.n_value = Sec->size;
     SymbolTable.push_back(Sym);
@@ -959,6 +964,9 @@ MachOSym::MachOSym(const GlobalValue *gv, std::string name, uint8_t sect,
     GVName = TAI->getGlobalPrefix() + name;
     n_type |= GV->hasHiddenVisibility() ? N_PEXT : N_EXT;
     break;
+  case GlobalValue::PrivateLinkage:
+    GVName = TAI->getPrivateGlobalPrefix() + name;
+    break;
   case GlobalValue::InternalLinkage:
     GVName = TAI->getGlobalPrefix() + name;
     break;