[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y

Reid Spencer reid at x10sys.com
Sat Apr 7 09:10:54 PDT 2007



Changes in directory llvm/tools/llvm-upgrade:

UpgradeParser.y updated: 1.77 -> 1.78
---
Log message:

For PR1312: http://llvm.org/PR1312 :
For the short CALL/INVOKE syntax, the signedness of the result type is two
extractions away from the type argument because its a POINTER to function
type, not a function type.


---
Diffs of the changes:  (+8 -2)

 UpgradeParser.y |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


Index: llvm/tools/llvm-upgrade/UpgradeParser.y
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.77 llvm/tools/llvm-upgrade/UpgradeParser.y:1.78
--- llvm/tools/llvm-upgrade/UpgradeParser.y:1.77	Sun Apr  1 21:08:05 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y	Sat Apr  7 11:10:37 2007
@@ -3291,7 +3291,10 @@
       $$.S.copy($3.S);
     } else {
       FTySign = $3.S;
-      $$.S.copy($3.S.get(0)); // 0th element of FuncTy sign is result ty
+      // Get the signedness of the result type. $3 is the pointer to the
+      // function type so we get the 0th element to extract the function type,
+      // and then the 0th element again to get the result type.
+      $$.S.copy($3.S.get(0).get(0)); 
     }
     $4.S.makeComposite(FTySign);
     Value *V = getVal(PFTy, $4);   // Get the function we're calling...
@@ -3688,7 +3691,10 @@
       $$.S.copy($3.S);
     } else {
       FTySign = $3.S;
-      $$.S.copy($3.S.get(0)); // 0th element of FuncTy signedness is result sign
+      // Get the signedness of the result type. $3 is the pointer to the
+      // function type so we get the 0th element to extract the function type,
+      // and then the 0th element again to get the result type.
+      $$.S.copy($3.S.get(0).get(0)); 
     }
     $4.S.makeComposite(FTySign);
 






More information about the llvm-commits mailing list