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 | eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3 (patch) | |
tree | efbc5bfeac285eb237b31c4e26eb36bbffd008f0 /lib/Analysis/IPA/FindUsedTypes.cpp | |
parent | 7be3a60617004638513e1db5d5bc435773967afd (diff) | |
download | external_llvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.zip external_llvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.tar.gz external_llvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.tar.bz2 |
Fix a source of non determinism in FindUsedTypes, use a SetVector instead of a
set.
rdar://9423996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/FindUsedTypes.cpp')
-rw-r--r-- | lib/Analysis/IPA/FindUsedTypes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp index 06ae34c..dde2556 100644 --- a/lib/Analysis/IPA/FindUsedTypes.cpp +++ b/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); |