blob: 6119afc79061baf484c04eb9521886bec0b08fd4 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//===--- LangOptions.cpp - Language feature info --------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements the methods for LangOptions.
//
//===----------------------------------------------------------------------===//
#include "clang/Basic/LangOptions.h"
#include "llvm/Bitcode/Serialize.h"
#include "llvm/Bitcode/Deserialize.h"
using namespace clang;
void LangOptions::Emit(llvm::Serializer& S) const {
S.EmitBool((bool) Trigraphs);
S.EmitBool((bool) BCPLComment);
S.EmitBool((bool) DollarIdents);
S.EmitBool((bool) Digraphs);
S.EmitBool((bool) HexFloats);
S.EmitBool((bool) C99);
S.EmitBool((bool) Microsoft);
S.EmitBool((bool) CPlusPlus);
S.EmitBool((bool) CPlusPlus0x);
S.EmitBool((bool) NoExtensions);
S.EmitBool((bool) CXXOperatorNames);
S.EmitBool((bool) ObjC1);
S.EmitBool((bool) ObjC2);
S.EmitBool((unsigned) GC);
S.EmitBool((bool) PascalStrings);
S.EmitBool((bool) Boolean);
S.EmitBool((bool) WritableStrings);
S.EmitBool((bool) LaxVectorConversions);
}
void LangOptions::Read(llvm::Deserializer& D) {
Trigraphs = D.ReadBool() ? 1 : 0;
BCPLComment = D.ReadBool() ? 1 : 0;
DollarIdents = D.ReadBool() ? 1 : 0;
Digraphs = D.ReadBool() ? 1 : 0;
HexFloats = D.ReadBool() ? 1 : 0;
C99 = D.ReadBool() ? 1 : 0;
Microsoft = D.ReadBool() ? 1 : 0;
CPlusPlus = D.ReadBool() ? 1 : 0;
CPlusPlus0x = D.ReadBool() ? 1 : 0;
NoExtensions = D.ReadBool() ? 1 : 0;
CXXOperatorNames = D.ReadBool() ? 1 : 0;
ObjC1 = D.ReadBool() ? 1 : 0;
ObjC2 = D.ReadBool() ? 1 : 0;
GC = D.ReadInt();
PascalStrings = D.ReadBool() ? 1 : 0;
Boolean = D.ReadBool() ? 1 : 0;
WritableStrings = D.ReadBool() ? 1 : 0;
LaxVectorConversions = D.ReadBool() ? 1 : 0;
}
|