Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls.  This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll).  Hopefully
a bitcode guru (who might that be? :) ) will fix it.

llvm-svn: 44359
diff --git a/llvm/test/Assembler/2006-05-26-VarargsCallEncode.ll b/llvm/test/Assembler/2006-05-26-VarargsCallEncode.ll
index c87b19d..c36bcfa 100644
--- a/llvm/test/Assembler/2006-05-26-VarargsCallEncode.ll
+++ b/llvm/test/Assembler/2006-05-26-VarargsCallEncode.ll
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | \
-; RUN:    grep {tail call void (\{  \}\\* sret}
+; RUN:    grep {tail call void.*sret  null}
 
 declare csretcc void %foo({}*, ...)
 
diff --git a/llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll b/llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
index 745c499..da6faa6 100644
--- a/llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
+++ b/llvm/test/Assembler/2007-02-07-UpgradeCSRETCC.ll
@@ -1,7 +1,5 @@
-; For PR1187
 ; RUN: llvm-upgrade < %s > /dev/null
-; XFAIL: *
-; Un-XFAIL this when PR1146 is fixed.
+; PR1187
 
 %mystruct = type { int, double }
 %glob = global %mystruct { int 3, double 42.0 }
diff --git a/llvm/test/Assembler/2007-11-26-AttributeOverload.ll b/llvm/test/Assembler/2007-11-26-AttributeOverload.ll
new file mode 100644
index 0000000..9aec8d9
--- /dev/null
+++ b/llvm/test/Assembler/2007-11-26-AttributeOverload.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as < %s
+
+declare i32 @atoi(i8*) nounwind readonly
+declare i32 @atoi(i8*)
diff --git a/llvm/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll b/llvm/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll
new file mode 100644
index 0000000..ee260ea
--- /dev/null
+++ b/llvm/test/Assembler/2007-11-27-AutoUpgradeAttributes.ll
@@ -0,0 +1,3 @@
+; RUN: llvm-as < %s
+
+@FP = weak global i8 (...) signext * null
diff --git a/llvm/test/Feature/paramattrs.ll b/llvm/test/Feature/paramattrs.ll
index 24c46dc..3bee617 100644
--- a/llvm/test/Feature/paramattrs.ll
+++ b/llvm/test/Feature/paramattrs.ll
@@ -14,7 +14,7 @@
 
 define i32 @main(i32 inreg %argc, i8 ** inreg %argv) nounwind {
     %val = trunc i32 %argc to i16
-    %res1 = call i16 (i16 signext) signext *@test(i16 %val)
+    %res1 = call i16 (i16 signext) signext *@test(i16 signext %val) signext
     %two = add i16 %res1, %res1
     %res2 = call i8 @test2(i16 %two zeroext) zeroext 
     %retVal = sext i16 %two to i32
diff --git a/llvm/test/Integer/paramattrs_bt.ll b/llvm/test/Integer/paramattrs_bt.ll
index e5b6a3e..47ef753 100644
--- a/llvm/test/Integer/paramattrs_bt.ll
+++ b/llvm/test/Integer/paramattrs_bt.ll
@@ -11,7 +11,7 @@
 
 define i33 @main(i33 %argc, i8 **%argv) {
     %val = trunc i33 %argc to i16
-    %res = call i16 (i16 signext) signext *@test(i16 %val)
+    %res = call i16 (i16 signext) signext *@test(i16 signext %val) signext
     %two = add i16 %res, %res
     %res2 = call i8 @test2(i16 %two zeroext) zeroext 
     %retVal = sext i16 %two to i33
diff --git a/llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll b/llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll
index 48a1458..d067ac0 100644
--- a/llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll
+++ b/llvm/test/Transforms/SimplifyCFG/2006-10-29-InvokeCrash.ll
@@ -1,6 +1,4 @@
 ; RUN: llvm-upgrade < %s | llvm-as | opt -simplifycfg -disable-output
-; XFAIL: *
-; Un-XFAIL this when PR1146 is finished.
 
 	%struct..4._102 = type { %struct.QVectorData* }
 	%struct..5._125 = type { %struct.QMapData* }