blob: e39f6b7f644569e01c58245cc4cfa662b4035260 [file] [log] [blame]
Ted Kremenek19a95bc2007-10-25 16:02:43 +00001//==--- SourceLocation.cpp - Compact identifier for Source Files -*- C++ -*-==//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Ted Kremenek and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines serialization methods for the SourceLocation class.
11//
12//===----------------------------------------------------------------------===//
13
14#include "clang/Basic/SourceLocation.h"
15#include "llvm/Bitcode/Serialize.h"
16#include "llvm/Bitcode/Deserialize.h"
17
18using llvm::Serializer;
19using llvm::Deserializer;
20using llvm::SerializeTrait;
21using namespace clang;
22
23void SerializeTrait<SourceLocation>::Emit(Serializer& S, SourceLocation L) {
24 // FIXME: Add code for abbreviation.
25 S.EmitInt(L.getRawEncoding());
26}
27
28SourceLocation SerializeTrait<SourceLocation>::ReadVal(Deserializer& D) {
29 return SourceLocation::getFromRawEncoding(D.ReadInt());
30}