[PATCH] D60778: Make precompiled headers reproducible by switching OpenCL extension to std::map
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 16 08:51:12 PDT 2019
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60778.195393.patch
Type: text/x-patch
Size: 1435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190416/b6a2ea13/attachment.bin>
More information about the cfe-commits
mailing list