From e2510cdfe85ee79f97ee49913a16f7ffb4fa40ea Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 24 Apr 2015 21:51:02 +0000 Subject: 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. llvm-svn: 235783 --- llvm/lib/IR/Function.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/IR/Function.cpp') diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 227dfef9e98..ced989ab11d 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -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) { -- cgit v1.2.3