mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user