Skip to content

Commit

Permalink
Use 'unsigned char' to get this past gcc error message:
Browse files Browse the repository at this point in the history
  error: invalid conversion from 'unsigned char' to '{anonymous}::Sequence'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196004 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Dec 1, 2013
1 parent 15c773b commit 6e59964
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Transforms/ObjCARC/ObjCARCOpts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ namespace {
bool Partial;

/// The current position in the sequence.
Sequence Seq : 8;
unsigned char Seq : 8;

/// Unidirectional information about the current sequence.
RRInfo RRI;
Expand Down Expand Up @@ -498,7 +498,7 @@ namespace {
}

Sequence GetSeq() const {
return Seq;
return static_cast<Sequence>(Seq);
}

void ClearSequenceProgress() {
Expand Down Expand Up @@ -538,7 +538,8 @@ namespace {

void
PtrState::Merge(const PtrState &Other, bool TopDown) {
Seq = MergeSeqs(Seq, Other.Seq, TopDown);
Seq = MergeSeqs(static_cast<Sequence>(Seq), static_cast<Sequence>(Other.Seq),
TopDown);
KnownPositiveRefCount &= Other.KnownPositiveRefCount;

// If we're not in a sequence (anymore), drop all associated state.
Expand Down

0 comments on commit 6e59964

Please sign in to comment.