summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-07-07 22:29:43 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-07-15 18:04:26 +0200
commitc191035f421b5dc69873cba8885fee41e984cc5d (patch)
treea005ea28a289f84bc40a272c5001a8cfae98e4d5 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent1fd23a065bf729836dd52ef1ad3c84c449735a56 (diff)
[IR] Add elementtype attribute
This implements the elementtype attribute specified in D105407. It just adds the attribute and the specified verifier rules, but doesn't yet make use of it anywhere. Differential Revision: https://reviews.llvm.org/D106008
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index bdb973e8e421..da3158bcdfa4 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -630,6 +630,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
return bitc::ATTR_KIND_COLD;
case Attribute::Hot:
return bitc::ATTR_KIND_HOT;
+ case Attribute::ElementType:
+ return bitc::ATTR_KIND_ELEMENTTYPE;
case Attribute::InaccessibleMemOnly:
return bitc::ATTR_KIND_INACCESSIBLEMEM_ONLY;
case Attribute::InaccessibleMemOrArgMemOnly: