Anastasia created this revision. Anastasia added reviewers: lebedev.ri, sylvestre.ledru, riccibruno. Herald added subscribers: ebevhan, JDevlieghere, yaxunl.
As discussed in https://reviews.llvm.org/D60379 let's use std::map to store OpenCL extensions data structure. Not sure how to test this though? I guess we can trust that `std::map` is always sorted just as it says in its description. https://reviews.llvm.org/D60778 Files: include/clang/Sema/Sema.h include/clang/Serialization/ASTReader.h Index: include/clang/Serialization/ASTReader.h =================================================================== --- include/clang/Serialization/ASTReader.h +++ include/clang/Serialization/ASTReader.h @@ -879,10 +879,10 @@ OpenCLOptions OpenCLExtensions; /// Extensions required by an OpenCL type. - llvm::DenseMap<const Type *, std::set<std::string>> OpenCLTypeExtMap; + std::map<const Type *, std::set<std::string>> OpenCLTypeExtMap; /// Extensions required by an OpenCL declaration. - llvm::DenseMap<const Decl *, std::set<std::string>> OpenCLDeclExtMap; + std::map<const Decl *, std::set<std::string>> OpenCLDeclExtMap; /// A list of the namespaces we've seen. SmallVector<uint64_t, 4> KnownNamespaces; Index: include/clang/Sema/Sema.h =================================================================== --- include/clang/Sema/Sema.h +++ include/clang/Sema/Sema.h @@ -8730,9 +8730,9 @@ private: std::string CurrOpenCLExtension; /// Extensions required by an OpenCL type. - llvm::DenseMap<const Type*, std::set<std::string>> OpenCLTypeExtMap; + std::map<const Type*, std::set<std::string>> OpenCLTypeExtMap; /// Extensions required by an OpenCL declaration. - llvm::DenseMap<const Decl*, std::set<std::string>> OpenCLDeclExtMap; + std::map<const Decl*, std::set<std::string>> OpenCLDeclExtMap; public: llvm::StringRef getCurrentOpenCLExtension() const { return CurrOpenCLExtension;
Index: include/clang/Serialization/ASTReader.h =================================================================== --- include/clang/Serialization/ASTReader.h +++ include/clang/Serialization/ASTReader.h @@ -879,10 +879,10 @@ OpenCLOptions OpenCLExtensions; /// Extensions required by an OpenCL type. - llvm::DenseMap<const Type *, std::set<std::string>> OpenCLTypeExtMap; + std::map<const Type *, std::set<std::string>> OpenCLTypeExtMap; /// Extensions required by an OpenCL declaration. - llvm::DenseMap<const Decl *, std::set<std::string>> OpenCLDeclExtMap; + std::map<const Decl *, std::set<std::string>> OpenCLDeclExtMap; /// A list of the namespaces we've seen. SmallVector<uint64_t, 4> KnownNamespaces; Index: include/clang/Sema/Sema.h =================================================================== --- include/clang/Sema/Sema.h +++ include/clang/Sema/Sema.h @@ -8730,9 +8730,9 @@ private: std::string CurrOpenCLExtension; /// Extensions required by an OpenCL type. - llvm::DenseMap<const Type*, std::set<std::string>> OpenCLTypeExtMap; + std::map<const Type*, std::set<std::string>> OpenCLTypeExtMap; /// Extensions required by an OpenCL declaration. - llvm::DenseMap<const Decl*, std::set<std::string>> OpenCLDeclExtMap; + std::map<const Decl*, std::set<std::string>> OpenCLDeclExtMap; public: llvm::StringRef getCurrentOpenCLExtension() const { return CurrOpenCLExtension;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits