Go to the documentation of this file.
47 ::memset(&Layout, 0,
sizeof(Layout));
48 Layout.
Mod = ModIndex;
58 ObjFileName = std::string(
Name);
78 if (BulkSymbols.
empty())
85 "Invalid Symbol alignment!");
86 SymbolByteSize += BulkSymbols.
size();
97 "Invalid Symbol alignment!");
98 SymbolByteSize += SymLength;
101 void DbiModuleDescriptorBuilder::addSourceFile(
StringRef Path) {
102 SourceFiles.push_back(std::string(Path));
105 uint32_t DbiModuleDescriptorBuilder::calculateC13DebugInfoSize()
const {
107 for (
const auto &
Builder : C13Builders) {
108 Result +=
Builder.calculateSerializedLength();
124 Layout.
C13Bytes = calculateC13DebugInfoSize();
127 Layout.
NumFiles = SourceFiles.size();
139 uint32_t C13Size = calculateC13DebugInfoSize();
140 if (!C13Size && !SymbolByteSize)
145 return ExpectedSN.takeError();
169 auto NS = WritableMappedBlockStream::createIndexedStream(
177 if (Sym.NeedsToBeMerged) {
178 assert(MergeSymsCallback);
179 if (
auto EC = MergeSymsCallback(MergeSymsCtx, Sym.SymPtr, SymbolWriter))
188 auto SavedOffset = SymbolWriter.
getOffset();
197 "Invalid debug section alignment!");
199 for (
const auto &
Builder : C13Builders) {
200 if (
auto EC =
Builder.commit(SymbolWriter, CodeViewContainer::Pdb))
214 std::shared_ptr<DebugSubsection> Subsection) {
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
This is an optimization pass for GlobalISel generic memory operations.
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
void addSymbolsInBulk(ArrayRef< uint8_t > BulkSymbols)
void addUnmergedSymbols(void *SymSrc, uint32_t SymLength)
Provides write only access to a subclass of WritableBinaryStream.
static ErrorSuccess success()
Create a success value.
const uint16_t kInvalidStreamIndex
uint32_t calculateSerializedLength() const
void setOffset(uint64_t Off)
Error commit(BinaryStreamWriter &ModiWriter)
Commit the DBI descriptor to the DBI stream.
Expected< uint32_t > addStream(uint32_t Size, ArrayRef< uint32_t > Blocks)
Add a stream to the MSF file with the given size, occupying the given list of blocks.
bool empty() const
empty - Check if the array is empty.
@ SC
CHAIN = SC CHAIN, Imm128 - System call.
@ Ref
The access may reference the value stored in memory.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void setFirstSectionContrib(const SectionContrib &SC)
void setObjFileName(StringRef Name)
void addDebugSubsection(std::shared_ptr< codeview::DebugSubsection > Subsection)
uint32_t alignOf(CodeViewContainer Container)
Error commitSymbolStream(const msf::MSFLayout &MsfLayout, WritableBinaryStreamRef MsfBuffer)
Commit the accumulated symbols to the module symbol stream.
uint64_t bytesRemaining() const
uint32_t getNextSymbolOffset() const
Return the offset within the module symbol stream of the next symbol record passed to addSymbol.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint64_t getOffset() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Error writeCString(StringRef Str)
Write the string Str to the underlying stream followed by a null terminator.
void addSymbol(codeview::CVSymbol Symbol)
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
Error writeBytes(ArrayRef< uint8_t > Buffer)
Write the bytes specified in Buffer to the underlying stream.
PowerPC TLS Dynamic Call Fixup
StringRef - Represent a constant reference to a string, i.e.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
uint16_t getStreamIndex() const
BumpPtrAllocator & getAllocator()
Represents a string table reference at some offset in the module symbol stream.
Error padToAlignment(uint32_t Align)
Lightweight error class with error context and mandatory checking.
static uint32_t calculateDiSymbolStreamSize(uint32_t SymbolByteSize, uint32_t C13Size)
size_t size() const
size - Get the array size.
Error finalizeMsfLayout()
void setPdbFilePathNI(uint32_t NI)
~DbiModuleDescriptorBuilder()