diff options
author | Hans Wennborg <hans@hanshq.net> | 2016-06-22 21:22:13 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2016-06-22 21:22:13 +0000 |
commit | 9a519a099e232c618dd290c8b845bad28fda69df (patch) | |
tree | f145c35b956d09ca5ef901a2cdc14d8640a5f90b /llvm/lib/CodeGen/AsmPrinter | |
parent | f4437e9b488d3340e0c01642e925ca6c54f5c426 (diff) | |
download | bcm5719-llvm-9a519a099e232c618dd290c8b845bad28fda69df.tar.gz bcm5719-llvm-9a519a099e232c618dd290c8b845bad28fda69df.zip |
[codeview] Write LF_UDT_SRC_LINE records (PR28251)
Differential Revision: http://reviews.llvm.org/D21621
llvm-svn: 273495
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 3e4563947a1..4edc6aece16 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1406,10 +1406,17 @@ TypeIndex CodeViewDebug::lowerCompleteTypeClass(const DICompositeType *Ty) { getFullyQualifiedName(Ty->getScope().resolve(), Ty->getName()); uint64_t SizeInBytes = Ty->getSizeInBits() / 8; - return TypeTable.writeClass(ClassRecord( + + TypeIndex ClassTI = TypeTable.writeClass(ClassRecord( Kind, FieldCount, CO, HfaKind::None, WindowsRTClassKind::None, FieldTI, TypeIndex(), VShapeTI, SizeInBytes, FullName, Ty->getIdentifier())); - // FIXME: Make an LF_UDT_SRC_LINE record. + + TypeTable.writeUdtSourceLine(UdtSourceLineRecord( + ClassTI, TypeTable.writeStringId(StringIdRecord( + TypeIndex(0x0), getFullFilepath(Ty->getFile()))), + Ty->getLine())); + + return ClassTI; } TypeIndex CodeViewDebug::lowerTypeUnion(const DICompositeType *Ty) { @@ -1433,10 +1440,17 @@ TypeIndex CodeViewDebug::lowerCompleteTypeUnion(const DICompositeType *Ty) { uint64_t SizeInBytes = Ty->getSizeInBits() / 8; std::string FullName = getFullyQualifiedName(Ty->getScope().resolve(), Ty->getName()); - return TypeTable.writeUnion(UnionRecord(FieldCount, CO, HfaKind::None, - FieldTI, SizeInBytes, FullName, - Ty->getIdentifier())); - // FIXME: Make an LF_UDT_SRC_LINE record. + + TypeIndex UnionTI = TypeTable.writeUnion( + UnionRecord(FieldCount, CO, HfaKind::None, FieldTI, SizeInBytes, FullName, + Ty->getIdentifier())); + + TypeTable.writeUdtSourceLine(UdtSourceLineRecord( + UnionTI, TypeTable.writeStringId(StringIdRecord( + TypeIndex(0x0), getFullFilepath(Ty->getFile()))), + Ty->getLine())); + + return UnionTI; } std::tuple<TypeIndex, TypeIndex, unsigned> |