blob: 75b4a99d45bb342462dc739a0f44017cd91e5738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
//==--- SourceLocation.cpp - Compact identifier for Source Files -*- C++ -*-==//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by Ted Kremenek and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines serialization methods for the SourceLocation class.
//
//===----------------------------------------------------------------------===//
#include "clang/Basic/SourceLocation.h"
#include "llvm/Bitcode/Serialize.h"
#include "llvm/Bitcode/Deserialize.h"
using namespace clang;
void SourceLocation::Emit(llvm::Serializer& S) const {
S.EmitInt(getRawEncoding());
}
SourceLocation SourceLocation::ReadVal(llvm::Deserializer& D) {
return SourceLocation::getFromRawEncoding(D.ReadInt());
}
void SourceRange::Emit(llvm::Serializer& S) const {
B.Emit(S);
E.Emit(S);
}
SourceRange SourceRange::ReadVal(llvm::Deserializer& D) {
SourceLocation A = SourceLocation::ReadVal(D);
SourceLocation B = SourceLocation::ReadVal(D);
return SourceRange(A,B);
}
|