summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2015-07-28 04:05:45 +0000
committerBob Wilson <bob.wilson@apple.com>2015-07-28 04:05:45 +0000
commit043ee65ef3c27191db3ca6618e1ee6497ade094d (patch)
tree4311d7396af2b1a4b83ec1f45ef87ed5c58471d5 /llvm/lib/Bitcode
parent6c7a18659979f0d7205fae1bf4767066d2474a8e (diff)
downloadbcm5719-llvm-043ee65ef3c27191db3ca6618e1ee6497ade094d.tar.gz
bcm5719-llvm-043ee65ef3c27191db3ca6618e1ee6497ade094d.zip
Reserve some constant values for the Swift calling convention.
Swift has a custom calling convention that also requires some new flags on arguments and one new attribute on alloca instructions. This patch does not include the implementation of that calling convention - that will be provided as part of the open-source release of Swift; this only reserves the bitcode constant values so that they are not used for other purposes. llvm-svn: 243379
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index c04e8b9f1f3..de91150c424 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4081,6 +4081,8 @@ std::error_code BitcodeReader::parseFunctionBody(Function *F) {
uint64_t AlignRecord = Record[3];
const uint64_t InAllocaMask = uint64_t(1) << 5;
const uint64_t ExplicitTypeMask = uint64_t(1) << 6;
+ // Reserve bit 7 for SwiftError flag.
+ // const uint64_t SwiftErrorMask = uint64_t(1) << 7;
const uint64_t FlagMask = InAllocaMask | ExplicitTypeMask;
bool InAlloca = AlignRecord & InAllocaMask;
Type *Ty = getTypeByID(Record[0]);
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 1a70ba5ac12..31ae0141ef8 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1902,6 +1902,8 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
assert(AlignRecord < 1 << 5 && "alignment greater than 1 << 64");
AlignRecord |= AI.isUsedWithInAlloca() << 5;
AlignRecord |= 1 << 6;
+ // Reserve bit 7 for SwiftError flag.
+ // AlignRecord |= AI.isSwiftError() << 7;
Vals.push_back(AlignRecord);
break;
}
OpenPOWER on IntegriCloud