class SourceLocationSequence

Declaration

class SourceLocationSequence { /* full declaration omitted */ };

Description

Serialized encoding of a sequence of SourceLocations. Optimized to produce small values when locations with the sequence are similar. Each element can be delta-encoded against the last nonzero element. Sequences should be started by creating a SourceLocationSequence::State, and then passed around as SourceLocationSequence*. Example: // establishes a sequence void EmitTopLevelThing() { SourceLocationSequence::State Seq; EmitContainedThing(Seq); EmitRecursiveThing(Seq); } // optionally part of a sequence void EmitContainedThing(SourceLocationSequence *Seq = nullptr) { Record.push_back(SourceLocationEncoding::encode(SomeLoc, Seq)); } // establishes a sequence if there isn't one already void EmitRecursiveThing(SourceLocationSequence *ParentSeq = nullptr) { SourceLocationSequence::State Seq(ParentSeq); Record.push_back(SourceLocationEncoding::encode(SomeLoc, Seq)); EmitRecursiveThing(Seq); }

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:87

Member Variables

private clang::SourceLocationSequence::UIntTy& Prev
private static const unsigned int UIntBits = SourceLocationEncoding::UIntBits

Method Overview

  • private SourceLocationSequence(clang::SourceLocationSequence::UIntTy & Prev)
  • public clang::SourceLocation decode(clang::SourceLocationSequence::EncodedTy Encoded)
  • private clang::SourceLocationSequence::UIntTy decodeRaw(clang::SourceLocationSequence::EncodedTy Encoded)
  • public clang::SourceLocationSequence::EncodedTy encode(clang::SourceLocation Loc)
  • private clang::SourceLocationSequence::EncodedTy encodeRaw(clang::SourceLocationSequence::UIntTy Raw)
  • private static clang::SourceLocationSequence::UIntTy zagZig(clang::SourceLocationSequence::UIntTy V)
  • private static clang::SourceLocationSequence::UIntTy zigZag(clang::SourceLocationSequence::UIntTy V)

Methods

SourceLocationSequence(
    clang::SourceLocationSequence::UIntTy& Prev)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:104

Parameters

clang::SourceLocationSequence::UIntTy& Prev

clang::SourceLocation decode(
    clang::SourceLocationSequence::EncodedTy
        Encoded)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:127

Parameters

clang::SourceLocationSequence::EncodedTy Encoded

clang::SourceLocationSequence::UIntTy decodeRaw(
    clang::SourceLocationSequence::EncodedTy
        Encoded)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:118

Parameters

clang::SourceLocationSequence::EncodedTy Encoded

clang::SourceLocationSequence::EncodedTy encode(
    clang::SourceLocation Loc)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:130

Parameters

clang::SourceLocation Loc

clang::SourceLocationSequence::EncodedTy
encodeRaw(
    clang::SourceLocationSequence::UIntTy Raw)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:106

Parameters

clang::SourceLocationSequence::UIntTy Raw

static clang::SourceLocationSequence::UIntTy
zagZig(clang::SourceLocationSequence::UIntTy V)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:102

Parameters

clang::SourceLocationSequence::UIntTy V

static clang::SourceLocationSequence::UIntTy
zigZag(clang::SourceLocationSequence::UIntTy V)

Declared at: clang/include/clang/Serialization/SourceLocationEncoding.h:98

Parameters

clang::SourceLocationSequence::UIntTy V