These methods are inlined
[oota-llvm.git] / lib / VMCore / AsmWriter.cpp
index 0cca2a7882445b90e4cd1e9134b270ed9c33893b..0b10218ca40e2bfda5dd3e5a597b801d04032dfd 100644 (file)
@@ -518,6 +518,9 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV,
   } else if (isa<ConstantPointerNull>(CV)) {
     Out << "null";
 
+  } else if (isa<UndefValue>(CV)) {
+    Out << "undef";
+
   } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
     Out << CE->getOpcodeName() << " (";
     
@@ -668,7 +671,7 @@ public:
 
   const Module* getModule() { return TheModule; }
 
-private :
+private:
   void printModule(const Module *M);
   void printSymbolTable(const SymbolTable &ST);
   void printConstant(const Constant *CPV);
@@ -778,20 +781,6 @@ void AssemblyWriter::printModule(const Module *M) {
     Out << " ]\n";
   }
 
-  // Loop over the link time pass list and emit them.
-  Module::pass_iterator PI = M->pass_begin();
-  Module::pass_iterator PE = M->pass_end();
-  if (LI != LE) {
-    Out << "passes = [ ";
-    while (LI != LE) {
-      Out << '"' << *LI << '"';
-      ++LI;
-      if (LI != LE)
-        Out << ", ";
-    }
-    Out << " ]\n";
-  }
-  
   // Loop over the symbol table, emitting all named constants.
   printSymbolTable(M->getSymbolTable());
   
@@ -817,6 +806,9 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
     case GlobalValue::WeakLinkage:      Out << "weak "; break;
     case GlobalValue::AppendingLinkage: Out << "appending "; break;
     case GlobalValue::ExternalLinkage: break;
+    case GlobalValue::GhostLinkage:
+      std::cerr << "GhostLinkage not allowed in AsmWriter!\n";
+      abort();
     }
 
   Out << (GV->isConstant() ? "constant " : "global ");
@@ -898,6 +890,9 @@ void AssemblyWriter::printFunction(const Function *F) {
     case GlobalValue::WeakLinkage:      Out << "weak "; break;
     case GlobalValue::AppendingLinkage: Out << "appending "; break;
     case GlobalValue::ExternalLinkage: break;
+    case GlobalValue::GhostLinkage:
+      std::cerr << "GhostLinkage not allowed in AsmWriter!\n";
+      abort();
     }
 
   printType(F->getReturnType()) << ' ';