forked from OSchip/llvm-project
Sort handler names to ensure deterministic behavior.
llvm-svn: 84878
This commit is contained in:
parent
a96b72a4ca
commit
09c319e269
|
@ -285,9 +285,9 @@ public:
|
|||
/// the same metadata to In2.
|
||||
void copyMD(Instruction *In1, Instruction *In2);
|
||||
|
||||
/// getHandlerNames - Get handler names. This is used by bitcode
|
||||
/// writer.
|
||||
void getHandlerNames(SmallVectorImpl<std::pair<unsigned, StringRef> >&N) const;
|
||||
/// getHandlerNames - Populate client supplied smallvector using custome
|
||||
/// metadata name and ID.
|
||||
void getHandlerNames(SmallVectorImpl<std::pair<unsigned, StringRef> >&) const;
|
||||
|
||||
/// ValueIsDeleted - This handler is used to update metadata store
|
||||
/// when a value is deleted.
|
||||
|
|
|
@ -304,13 +304,14 @@ MetadataContext::getMDs(const Instruction *Inst) {
|
|||
return &I->second;
|
||||
}
|
||||
|
||||
/// getHandlerNames - Get handler names. This is used by bitcode
|
||||
/// writer and aswm writer.
|
||||
/// getHandlerNames - Populate client supplied smallvector using custome
|
||||
/// metadata name and ID.
|
||||
void MetadataContext::
|
||||
getHandlerNames(SmallVectorImpl<std::pair<unsigned, StringRef> >&Names) const {
|
||||
for (StringMap<unsigned>::const_iterator I = MDHandlerNames.begin(),
|
||||
E = MDHandlerNames.end(); I != E; ++I)
|
||||
Names.push_back(std::make_pair(I->second, I->first()));
|
||||
std::sort(Names.begin(), Names.end());
|
||||
}
|
||||
|
||||
/// ValueIsCloned - This handler is used to update metadata store
|
||||
|
|
Loading…
Reference in New Issue