summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
authorJulien Lerouge <jlerouge@apple.com>2011-05-13 05:20:42 +0000
committerJulien Lerouge <jlerouge@apple.com>2011-05-13 05:20:42 +0000
commiteea6c95d5d9f202ccb4e90995dc8a4a4c439cec3 (patch)
treeefbc5bfeac285eb237b31c4e26eb36bbffd008f0 /lib/Analysis/IPA
parent7be3a60617004638513e1db5d5bc435773967afd (diff)
downloadllvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.tar.gz
llvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.tar.bz2
llvm-eea6c95d5d9f202ccb4e90995dc8a4a4c439cec3.tar.xz
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')
-rw-r--r--lib/Analysis/IPA/FindUsedTypes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/IPA/FindUsedTypes.cpp b/lib/Analysis/IPA/FindUsedTypes.cpp
index 06ae34cfd9..dde25565ad 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);