summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-24 21:51:02 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-24 21:51:02 +0000
commite2510cdfe85ee79f97ee49913a16f7ffb4fa40ea (patch)
treed9f8133d67b28996e7149e38e032a764fbd57160 /llvm/lib/IR/Function.cpp
parent27d702cb8b4a47a7d0359db2ab6ab1140fef1073 (diff)
downloadbcm5719-llvm-e2510cdfe85ee79f97ee49913a16f7ffb4fa40ea.tar.gz
bcm5719-llvm-e2510cdfe85ee79f97ee49913a16f7ffb4fa40ea.zip
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
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp3
1 files changed, 3 insertions, 0 deletions
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) {
OpenPOWER on IntegriCloud