This is an archive of the discontinued LLVM Phabricator instance.

CodeView: extract the OMF Directory Header
ClosedPublic

Authored by compnerd on Aug 7 2016, 10:30 PM.

Details

Reviewers
majnemer
zturner
Summary

The DebugDirectory contains a pointer to the CodeView info structure which is a
derivative of the OMF debug directory. The structure has evolved a bit over
time, and PDB 2.0 used a slightly different definition from PDB 7.0. Both of
these are specific to CodeView and not COFF. Reflect this by moving the
structure definitions into the DebugInfo/CodeView headers. Define a generic
DebugInfo union type that can be used to pass around a reference to the
DebugInfo irrespective of the versioning. NFC.

Diff Detail

Event Timeline

compnerd updated this revision to Diff 67121.Aug 7 2016, 10:30 PM
compnerd retitled this revision from to CodeView: extract the OMF Directory Header.
compnerd updated this object.
compnerd added a reviewer: zturner.
compnerd set the repository for this revision to rL LLVM.
compnerd added a subscriber: llvm-commits.
majnemer added inline comments.
lib/DebugInfo/CodeView/CVDebugRecord.cpp
14–21 ↗(On Diff #67121)

This is pretty irregular, we usually have the constant have a normal type. I would expect this to be an enum.

compnerd planned changes to this revision.Aug 8 2016, 1:25 PM
compnerd added inline comments.
lib/DebugInfo/CodeView/CVDebugRecord.cpp
14–21 ↗(On Diff #67121)

I didnt consider making that an enum. I like that better. Ill change this.

compnerd updated this revision to Diff 67220.Aug 8 2016, 1:48 PM
compnerd removed rL LLVM as the repository for this revision.

Use an enum as suggested by @majnemer

compnerd set the repository for this revision to rL LLVM.Aug 8 2016, 1:48 PM
majnemer added inline comments.Aug 8 2016, 1:57 PM
include/llvm/DebugInfo/CodeView/CVDebugRecord.h
18

I'd give the enum an underlying type of uint32_t.

majnemer accepted this revision.Aug 8 2016, 3:19 PM
majnemer added a reviewer: majnemer.

LGTM

This revision is now accepted and ready to land.Aug 8 2016, 3:19 PM
compnerd closed this revision.Aug 10 2016, 9:14 PM