aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:43:22 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:43:22 +0000
commitd45ce96c3878a410d812f1f0825d9c6173da92a4 (patch)
treeda3fd321b822e2d07d06e1af1ffcc271b9303b1c /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent0c5c0124acc84754fdf81bf5a98a807ee33c9bae (diff)
downloadllvm-d45ce96c3878a410d812f1f0825d9c6173da92a4.zip
llvm-d45ce96c3878a410d812f1f0825d9c6173da92a4.tar.gz
llvm-d45ce96c3878a410d812f1f0825d9c6173da92a4.tar.bz2
AsmWriter/Bitcode: MDObjCProperty
llvm-svn: 229024
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 6683e3e..ee522c4 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1106,11 +1106,24 @@ static void WriteMDExpression(const MDExpression *N, const ValueEnumerator &,
Record.clear();
}
-static void WriteMDObjCProperty(const MDObjCProperty *, const ValueEnumerator &,
- BitstreamWriter &, SmallVectorImpl<uint64_t> &,
- unsigned) {
- llvm_unreachable("write not implemented");
+static void WriteMDObjCProperty(const MDObjCProperty *N,
+ const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record,
+ unsigned Abbrev) {
+ Record.push_back(N->isDistinct());
+ Record.push_back(VE.getMetadataOrNullID(N->getRawName()));
+ Record.push_back(VE.getMetadataOrNullID(N->getFile()));
+ Record.push_back(N->getLine());
+ Record.push_back(VE.getMetadataOrNullID(N->getRawSetterName()));
+ Record.push_back(VE.getMetadataOrNullID(N->getRawGetterName()));
+ Record.push_back(N->getAttributes());
+ Record.push_back(VE.getMetadataOrNullID(N->getType()));
+
+ Stream.EmitRecord(bitc::METADATA_OBJC_PROPERTY, Record, Abbrev);
+ Record.clear();
}
+
static void WriteMDImportedEntity(const MDImportedEntity *,
const ValueEnumerator &, BitstreamWriter &,
SmallVectorImpl<uint64_t> &, unsigned) {