Start using the new function cloning header
[oota-llvm.git] / lib / VMCore / AsmWriter.cpp
index 8c7b06ba0f17f264409a724303051e88e1dc959f..e27bd26ba27e7e621547245dffbf27ee7edb1071 100644 (file)
@@ -541,7 +541,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
   if (GV->hasName()) Out << "%" << GV->getName() << " = ";
 
   if (GV->hasInternalLinkage()) Out << "internal ";
-  if (!GV->hasInitializer()) Out << "uninitialized ";
+  if (!GV->hasInitializer()) Out << "external ";
 
   Out << (GV->isConstant() ? "constant " : "global ");
   printType(GV->getType()->getElementType());
@@ -607,17 +607,8 @@ void AssemblyWriter::printFunction(const Function *F) {
   // Loop over the arguments, printing them...
   const FunctionType *FT = F->getFunctionType();
 
-  if (!F->isExternal()) {
-    for(Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
-      printArgument(I);
-  } else {
-    // Loop over the arguments, printing them...
-    for (FunctionType::ParamTypes::const_iterator I = FT->getParamTypes().begin(),
-          E = FT->getParamTypes().end(); I != E; ++I) {
-      if (I != FT->getParamTypes().begin()) Out << ", ";
-      printType(*I);
-    }
-  }
+  for(Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
+    printArgument(I);
 
   // Finish printing arguments...
   if (FT->isVarArg()) {