-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Port swift/basic to Windows using MSVC #5949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,11 +337,20 @@ class EncodedSequence : public EncodedSequenceBase { | |
/// see the documentation there for information about how to use this | ||
/// data structure. | ||
template <class ValueType> class Map { | ||
// Hack: MSVC isn't able to resolve the InlineKeyCapacity part of the | ||
// template of PrefixMap, so we have to split it up and pass it manually. | ||
#if defined(_MSC_VER) | ||
static const size_t Size = (sizeof(void*) - 1) / sizeof(Chunk); | ||
static const size_t ActualSize = max<size_t>(Size, 1); | ||
|
||
using MapBase = PrefixMap<Chunk, ValueType, ActualSize>; | ||
#else | ||
using MapBase = PrefixMap<Chunk, ValueType>; | ||
#endif | ||
MapBase TheMap; | ||
|
||
public: | ||
using SequenceIterator = EncodedSequence::iterator; | ||
using SequenceIterator = typename EncodedSequence::iterator; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be a Clang deficiency rather than an MSVC deficiency There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, |
||
using KeyType = typename MapBase::KeyType; | ||
using Handle = typename MapBase::Handle; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,7 @@ template <typename T> class ImmutablePointerSet : public llvm::FoldingSetNode { | |
return *LowerBound == Ptr; | ||
} | ||
|
||
using iterator = typename decltype(Data)::iterator; | ||
using iterator = typename ArrayRef<PtrTy>::iterator; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
iterator begin() const { return Data.begin(); } | ||
iterator end() const { return Data.end(); } | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://connect.microsoft.com/VisualStudio/feedback/details/3116197/