summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-11-07 02:48:49 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-11-07 02:48:49 +0000
commit97cb397132722645750b1bdb5c48ca5a7e8cfb3f (patch)
tree6c4d4cc3858164a02781c646020b15cf8da544a0 /llvm/lib/Bitcode/Writer
parent00406472e8763041fe1dc4d439776d75cccbed90 (diff)
downloadbcm5719-llvm-97cb397132722645750b1bdb5c48ca5a7e8cfb3f.tar.gz
bcm5719-llvm-97cb397132722645750b1bdb5c48ca5a7e8cfb3f.zip
[Bitcode] Add enums for call instruction markers and flags. NFC.
This commit adds enums in LLVMBitCodes.h to improve readability and maintainability. This is a follow-up to r252368 which was discussed here: http://reviews.llvm.org/D12923 llvm-svn: 252395
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 7497535d561..b5b79b26873 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -2130,9 +2130,11 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
Code = bitc::FUNC_CODE_INST_CALL;
Vals.push_back(VE.getAttributeID(CI.getAttributes()));
- Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()) |
- unsigned(CI.isMustTailCall()) << 14 | 1 << 15 |
- unsigned(CI.isNoTailCall()) << 16);
+ Vals.push_back(CI.getCallingConv() << bitc::CALL_CCONV |
+ unsigned(CI.isTailCall()) << bitc::CALL_TAIL |
+ unsigned(CI.isMustTailCall()) << bitc::CALL_MUSTTAIL |
+ 1 << bitc::CALL_EXPLICIT_TYPE |
+ unsigned(CI.isNoTailCall()) << bitc::CALL_NOTAIL);
Vals.push_back(VE.getTypeID(FTy));
PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee
OpenPOWER on IntegriCloud