summaryrefslogtreecommitdiff
path: root/tools/llvm-upgrade/UpgradeParser.y
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-07 16:10:37 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-07 16:10:37 +0000
commitb289f19eaecec831302e93e450ac27a151585199 (patch)
treefd3c48af72a25c218335a0c75a79eb18110698b3 /tools/llvm-upgrade/UpgradeParser.y
parentac4d664d45a09055bb64dbe4bb78fd7668d3ed80 (diff)
downloadllvm-b289f19eaecec831302e93e450ac27a151585199.tar.gz
llvm-b289f19eaecec831302e93e450ac27a151585199.tar.bz2
llvm-b289f19eaecec831302e93e450ac27a151585199.tar.xz
For 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeParser.y')
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index 9cc29fb61b..c344a5ada8 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -3291,7 +3291,10 @@ BBTerminatorInst
$$.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 @@ InstVal
$$.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);