pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
[llvm/avr.git] / lib / Bitcode / Writer / SerializeAPInt.cpp
blob47792c7d089430dbf9b950d30b9fd737afcc6df7
1 //===-- SerializeAPInt.cpp - Serialization for APInts ----------*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements serialization of APInts.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/ADT/APInt.h"
15 #include "llvm/Bitcode/Serialize.h"
16 #include <cassert>
18 using namespace llvm;
20 void APInt::Emit(Serializer& S) const {
21 S.EmitInt(BitWidth);
23 if (isSingleWord())
24 S.EmitInt(VAL);
25 else {
26 uint32_t NumWords = getNumWords();
27 S.EmitInt(NumWords);
28 for (unsigned i = 0; i < NumWords; ++i)
29 S.EmitInt(pVal[i]);