diff options
author | Julien Lerouge <jlerouge@apple.com> | 2011-05-13 05:20:42 +0000 |
---|---|---|
committer | Julien Lerouge <jlerouge@apple.com> | 2011-05-13 05:20:42 +0000 |
commit | 7e11f9e26d635df98e6318c5ada2523159f6b34b (patch) | |
tree | 631ce21ee11b83824d593c8f35069de1c96e3fbb /llvm/lib/Analysis | |
parent | d12d712c84e52298eba2642fc62ac376dc5c0a39 (diff) | |
download | bcm5719-llvm-7e11f9e26d635df98e6318c5ada2523159f6b34b.tar.gz bcm5719-llvm-7e11f9e26d635df98e6318c5ada2523159f6b34b.zip |
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
set.
rdar://9423996
llvm-svn: 131283
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/IPA/FindUsedTypes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/FindUsedTypes.cpp b/llvm/lib/Analysis/IPA/FindUsedTypes.cpp index 06ae34cfd98..dde25565ad8 100644 --- a/llvm/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/llvm/lib/Analysis/IPA/FindUsedTypes.cpp @@ -32,7 +32,7 @@ INITIALIZE_PASS(FindUsedTypes, "print-used-types", void FindUsedTypes::IncorporateType(const Type *Ty) { // If ty doesn't already exist in the used types map, add it now, otherwise // return. - if (!UsedTypes.insert(Ty).second) return; // Already contain Ty. + if (!UsedTypes.insert(Ty)) return; // Already contain Ty. // Make sure to add any types this type references now. // @@ -94,7 +94,7 @@ bool FindUsedTypes::runOnModule(Module &m) { // void FindUsedTypes::print(raw_ostream &OS, const Module *M) const { OS << "Types in use by this module:\n"; - for (std::set<const Type *>::const_iterator I = UsedTypes.begin(), + for (SetVector<const Type *>::const_iterator I = UsedTypes.begin(), E = UsedTypes.end(); I != E; ++I) { OS << " "; WriteTypeSymbolic(OS, *I, M); |