AsmWriter/Bitcode: MDImportedEntity

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229025 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-13 01:46:02 +00:00
parent 3bfa8d00ae
commit 6a390dc584
9 changed files with 91 additions and 10 deletions

View File

@@ -1827,12 +1827,25 @@ static void writeMDObjCProperty(raw_ostream &Out, const MDObjCProperty *N,
Out << ")";
}
static void writeMDImportedEntity(raw_ostream &, const MDImportedEntity *,
TypePrinting *, SlotTracker *,
const Module *) {
llvm_unreachable("write not implemented");
static void writeMDImportedEntity(raw_ostream &Out, const MDImportedEntity *N,
TypePrinting *TypePrinter,
SlotTracker *Machine, const Module *Context) {
Out << "!MDImportedEntity(";
FieldSeparator FS;
writeTag(Out, FS, N);
Out << FS << "scope: ";
writeMetadataAsOperand(Out, N->getScope(), TypePrinter, Machine, Context);
if (N->getEntity()) {
Out << FS << "entity: ";
writeMetadataAsOperand(Out, N->getEntity(), TypePrinter, Machine, Context);
}
if (N->getLine())
Out << FS << "line: " << N->getLine();
Out << FS << "name: \"" << N->getName() << "\"";
Out << ")";
}
static void WriteMDNodeBodyInternal(raw_ostream &Out, const MDNode *Node,
TypePrinting *TypePrinter,
SlotTracker *Machine,