From d45ce96c3878a410d812f1f0825d9c6173da92a4 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 13 Feb 2015 01:43:22 +0000 Subject: AsmWriter/Bitcode: MDObjCProperty llvm-svn: 229024 --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') 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 &, - unsigned) { - llvm_unreachable("write not implemented"); +static void WriteMDObjCProperty(const MDObjCProperty *N, + const ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl &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 &, unsigned) { -- cgit v1.1