summaryrefslogtreecommitdiff
path: root/lib/IR/TypeFinder.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2015-12-19 08:52:49 +0000
committerVedant Kumar <vsk@apple.com>2015-12-19 08:52:49 +0000
commitef112d46b98642b59c657f1560f7e1c21b13a0da (patch)
treef929d6c04f77fecadf40f7f39f76de330fcbad21 /lib/IR/TypeFinder.cpp
parentd3d7d026d3fdf198e8970a522aec11e5e2a5d683 (diff)
Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff operands of Function. This is based on the email thread "[RFC] Clean up the way we store optional Function data" on llvm-dev. Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback! Includes a fix to scrub value subclass data in dropAllReferences. Does not use binary literals. Differential Revision: http://reviews.llvm.org/D13829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/TypeFinder.cpp')
-rw-r--r--lib/IR/TypeFinder.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/IR/TypeFinder.cpp b/lib/IR/TypeFinder.cpp
index 2ea0550ba45..b5bdab0865b 100644
--- a/lib/IR/TypeFinder.cpp
+++ b/lib/IR/TypeFinder.cpp
@@ -44,14 +44,8 @@ void TypeFinder::run(const Module &M, bool onlyNamed) {
for (Module::const_iterator FI = M.begin(), E = M.end(); FI != E; ++FI) {
incorporateType(FI->getType());
- if (FI->hasPrefixData())
- incorporateValue(FI->getPrefixData());
-
- if (FI->hasPrologueData())
- incorporateValue(FI->getPrologueData());
-
- if (FI->hasPersonalityFn())
- incorporateValue(FI->getPersonalityFn());
+ for (const Use &U : FI->operands())
+ incorporateValue(U.get());
// First incorporate the arguments.
for (Function::const_arg_iterator AI = FI->arg_begin(),