aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-03 22:34:03 +0000
committerChris Lattner <sabre@nondot.org>2007-05-03 22:34:03 +0000
commit76520191abf157dfa2bcb473406193ab362480b6 (patch)
tree701a5c412b8ca8d65e90a9e3a4b9e8fcde9783f3 /lib/Bitcode/Writer
parentc9c55a9d2fc63ee87cf00e80736f6508507f2444 (diff)
downloadexternal_llvm-76520191abf157dfa2bcb473406193ab362480b6.zip
external_llvm-76520191abf157dfa2bcb473406193ab362480b6.tar.gz
external_llvm-76520191abf157dfa2bcb473406193ab362480b6.tar.bz2
Encoding calling conv info in call/invoke instrs, tree add now round trips completely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 270ded5..6dcc372 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -571,7 +571,7 @@ static void WriteInstruction(const Instruction &I, ValueEnumerator &VE,
break;
case Instruction::Invoke: {
Code = bitc::FUNC_CODE_INST_INVOKE;
- // FIXME: param attrs
+ Vals.push_back(cast<InvokeInst>(I).getCallingConv());
Vals.push_back(VE.getTypeID(I.getOperand(0)->getType()));
Vals.push_back(VE.getValueID(I.getOperand(0))); // callee
Vals.push_back(VE.getValueID(I.getOperand(1))); // normal
@@ -647,7 +647,8 @@ static void WriteInstruction(const Instruction &I, ValueEnumerator &VE,
break;
case Instruction::Call: {
Code = bitc::FUNC_CODE_INST_CALL;
- // FIXME: param attrs
+ Vals.push_back((cast<CallInst>(I).getCallingConv() << 1) |
+ cast<CallInst>(I).isTailCall());
Vals.push_back(VE.getTypeID(I.getOperand(0)->getType()));
Vals.push_back(VE.getValueID(I.getOperand(0))); // callee