diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-19 04:42:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-19 04:42:37 +0000 |
commit | 2c69184fd6c982349b1a7a7a06596418ea7702f2 (patch) | |
tree | 1ee6eb7f764c7ce10756df65fccff63294537e75 /lib/Analysis/IPA/FindUsedTypes.cpp | |
parent | 6ab910b946b6af54384662fb404d6e9b22fa5727 (diff) | |
download | llvm-2c69184fd6c982349b1a7a7a06596418ea7702f2.tar.gz llvm-2c69184fd6c982349b1a7a7a06596418ea7702f2.tar.bz2 llvm-2c69184fd6c982349b1a7a7a06596418ea7702f2.tar.xz |
Don't use the result of WriteAsOperand or WriteTypeSymbolic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/FindUsedTypes.cpp')
-rw-r--r-- | lib/Analysis/IPA/FindUsedTypes.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index 0a28cd5153..c3b08debe6 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/lib/Analysis/IPA/FindUsedTypes.cpp @@ -59,7 +59,8 @@ bool FindUsedTypes::runOnModule(Module &m) { UsedTypes.clear(); // reset if run multiple times... // Loop over global variables, incorporating their types - for (Module::const_global_iterator I = m.global_begin(), E = m.global_end(); I != E; ++I) { + for (Module::const_global_iterator I = m.global_begin(), E = m.global_end(); + I != E; ++I) { IncorporateType(I->getType()); if (I->hasInitializer()) IncorporateValue(I->getInitializer()); @@ -93,6 +94,8 @@ bool FindUsedTypes::runOnModule(Module &m) { void FindUsedTypes::print(std::ostream &o, const Module *M) const { o << "Types in use by this module:\n"; for (std::set<const Type *>::const_iterator I = UsedTypes.begin(), - E = UsedTypes.end(); I != E; ++I) - WriteTypeSymbolic(o << " ", *I, M) << "\n"; + E = UsedTypes.end(); I != E; ++I) { + WriteTypeSymbolic(o << " ", *I, M); + o << "\n"; + } } |