IR: Add Function metadata attachments

Add IR support for `Metadata` attachments.  Assembly and bitcode support
will follow shortly, but for now we just have unit tests.  This is part
of PR23340.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235783 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-04-24 21:51:02 +00:00
parent 233c2e7216
commit eb79bb6e61
5 changed files with 230 additions and 1 deletions

View File

@@ -324,6 +324,9 @@ void Function::dropAllReferences() {
// Prefix and prologue data are stored in a side table.
setPrefixData(nullptr);
setPrologueData(nullptr);
// Metadata is stored in a side-table.
clearMetadata();
}
void Function::addAttribute(unsigned i, Attribute::AttrKind attr) {