Metadata *Subprograms;
Metadata *GlobalVariables;
Metadata *ImportedEntities;
+ uint64_t DWOId;
MDNodeKeyImpl(unsigned SourceLanguage, Metadata *File, StringRef Producer,
bool IsOptimized, StringRef Flags, unsigned RuntimeVersion,
StringRef SplitDebugFilename, unsigned EmissionKind,
Metadata *EnumTypes, Metadata *RetainedTypes,
Metadata *Subprograms, Metadata *GlobalVariables,
- Metadata *ImportedEntities)
+ Metadata *ImportedEntities, uint64_t DWOId)
: SourceLanguage(SourceLanguage), File(File), Producer(Producer),
IsOptimized(IsOptimized), Flags(Flags), RuntimeVersion(RuntimeVersion),
SplitDebugFilename(SplitDebugFilename), EmissionKind(EmissionKind),
EnumTypes(EnumTypes), RetainedTypes(RetainedTypes),
Subprograms(Subprograms), GlobalVariables(GlobalVariables),
- ImportedEntities(ImportedEntities) {}
+ ImportedEntities(ImportedEntities), DWOId(DWOId) {}
MDNodeKeyImpl(const DICompileUnit *N)
: SourceLanguage(N->getSourceLanguage()), File(N->getRawFile()),
Producer(N->getProducer()), IsOptimized(N->isOptimized()),
RetainedTypes(N->getRawRetainedTypes()),
Subprograms(N->getRawSubprograms()),
GlobalVariables(N->getRawGlobalVariables()),
- ImportedEntities(N->getRawImportedEntities()) {}
+ ImportedEntities(N->getRawImportedEntities()), DWOId(N->getDWOId()) {}
bool isKeyOf(const DICompileUnit *RHS) const {
return SourceLanguage == RHS->getSourceLanguage() &&
RetainedTypes == RHS->getRawRetainedTypes() &&
Subprograms == RHS->getRawSubprograms() &&
GlobalVariables == RHS->getRawGlobalVariables() &&
- ImportedEntities == RHS->getRawImportedEntities();
+ ImportedEntities == RHS->getRawImportedEntities() &&
+ DWOId == RHS->getDWOId();
}
unsigned getHashValue() const {
return hash_combine(SourceLanguage, File, Producer, IsOptimized, Flags,
RuntimeVersion, SplitDebugFilename, EmissionKind,
EnumTypes, RetainedTypes, Subprograms, GlobalVariables,
- ImportedEntities);
+ ImportedEntities, DWOId);
}
};
}
};
+template <> struct MDNodeKeyImpl<DIModule> {
+ Metadata *Scope;
+ StringRef Name;
+ StringRef ConfigurationMacros;
+ StringRef IncludePath;
+ StringRef ISysRoot;
+ MDNodeKeyImpl(Metadata *Scope, StringRef Name,
+ StringRef ConfigurationMacros,
+ StringRef IncludePath,
+ StringRef ISysRoot)
+ : Scope(Scope), Name(Name), ConfigurationMacros(ConfigurationMacros),
+ IncludePath(IncludePath), ISysRoot(ISysRoot) {}
+ MDNodeKeyImpl(const DIModule *N)
+ : Scope(N->getRawScope()), Name(N->getName()),
+ ConfigurationMacros(N->getConfigurationMacros()),
+ IncludePath(N->getIncludePath()), ISysRoot(N->getISysRoot()) {}
+
+ bool isKeyOf(const DIModule *RHS) const {
+ return Scope == RHS->getRawScope() && Name == RHS->getName() &&
+ ConfigurationMacros == RHS->getConfigurationMacros() &&
+ IncludePath == RHS->getIncludePath() &&
+ ISysRoot == RHS->getISysRoot();
+ }
+ unsigned getHashValue() const {
+ return hash_combine(Scope, Name,
+ ConfigurationMacros, IncludePath, ISysRoot);
+ }
+};
+
template <> struct MDNodeKeyImpl<DITemplateTypeParameter> {
StringRef Name;
Metadata *Type;
DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
DenseMap<Metadata *, MetadataAsValue *> MetadataAsValues;
+ DenseMap<const Value*, ValueName*> ValueNames;
+
#define HANDLE_MDNODE_LEAF(CLASS) DenseSet<CLASS *, CLASS##Info> CLASS##s;
#include "llvm/IR/Metadata.def"
/// instructions in different blocks at the same location.
DenseMap<std::pair<const char *, unsigned>, unsigned> DiscriminatorTable;
- /// IntrinsicIDCache - Cache of intrinsic name (string) to numeric ID mappings
- /// requested in this context
- typedef DenseMap<const Function*, unsigned> IntrinsicIDCacheTy;
- IntrinsicIDCacheTy IntrinsicIDCache;
-
/// \brief Mapping from a function to its prefix data, which is stored as the
/// operand of an unparented ReturnInst so that the prefix data has a Use.
typedef DenseMap<const Function *, ReturnInst *> PrefixDataMapTy;