summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
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/Reader/BitcodeReader.cpp
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/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index a0029b26ff9..8920b6ed460 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4946,7 +4946,7 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) {
unsigned CCInfo = Record[OpNum++];
FunctionType *FTy = nullptr;
- if (CCInfo >> 15 & 1 &&
+ if (CCInfo >> bitc::CALL_EXPLICIT_TYPE & 1 &&
!(FTy = dyn_cast<FunctionType>(getTypeByID(Record[OpNum++]))))
return error("Explicit call type is not a function type");
@@ -4996,13 +4996,13 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) {
OperandBundles.clear();
InstructionList.push_back(I);
cast<CallInst>(I)->setCallingConv(
- static_cast<CallingConv::ID>((0x7ff & CCInfo) >> 1));
+ static_cast<CallingConv::ID>((0x7ff & CCInfo) >> bitc::CALL_CCONV));
CallInst::TailCallKind TCK = CallInst::TCK_None;
- if (CCInfo & 1)
+ if (CCInfo & 1 << bitc::CALL_TAIL)
TCK = CallInst::TCK_Tail;
- if (CCInfo & (1 << 14))
+ if (CCInfo & (1 << bitc::CALL_MUSTTAIL))
TCK = CallInst::TCK_MustTail;
- if (CCInfo & (1 << 16))
+ if (CCInfo & (1 << bitc::CALL_NOTAIL))
TCK = CallInst::TCK_NoTail;
cast<CallInst>(I)->setTailCallKind(TCK);
cast<CallInst>(I)->setAttributes(PAL);
OpenPOWER on IntegriCloud