Move unnamed_addr after the function arguments on Sabre's request.
[oota-llvm.git] / lib / VMCore / AsmWriter.cpp
index 3fefbbcafb955d4a840639c36d9d70eb318636b0..1a11d9c7980be1346636b07d07b1ae6f8c6eee2c 100644 (file)
@@ -1590,8 +1590,6 @@ void AssemblyWriter::printFunction(const Function *F) {
   Attributes RetAttrs = Attrs.getRetAttributes();
   if (RetAttrs != Attribute::None)
     Out <<  Attribute::getAsString(Attrs.getRetAttributes()) << ' ';
-  if (F->hasUnnamedAddr())
-    Out << "unnamed_addr ";
   TypePrinter.print(F->getReturnType(), Out);
   Out << ' ';
   WriteAsOperandInternal(Out, F, &TypePrinter, &Machine, F->getParent());
@@ -1631,6 +1629,8 @@ void AssemblyWriter::printFunction(const Function *F) {
     Out << "...";  // Output varargs portion of signature!
   }
   Out << ')';
+  if (F->hasUnnamedAddr())
+    Out << " unnamed_addr";
   Attributes FnAttrs = Attrs.getFnAttributes();
   if (FnAttrs != Attribute::None)
     Out << ' ' << Attribute::getAsString(Attrs.getFnAttributes());