summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-06-15 21:25:29 +0000
committerRui Ueyama <ruiu@google.com>2016-06-15 21:25:29 +0000
commit5dbea9db1073796d4e5fc3e1b80eed2215c21c9a (patch)
tree0142bccbbd380dd3c466d37c784075a0bb7db5ab /llvm/lib
parent63af1aa0c20689801e6d88d8cae7b76225b6ff5e (diff)
downloadbcm5719-llvm-5dbea9db1073796d4e5fc3e1b80eed2215c21c9a.tar.gz
bcm5719-llvm-5dbea9db1073796d4e5fc3e1b80eed2215c21c9a.zip
[Codeview] Add a class for LF_UDT_MOD_SRC_LINE.
Differential Revision: http://reviews.llvm.org/D21406 llvm-svn: 272843
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeDumper.cpp8
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeRecord.cpp7
-rw-r--r--llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp11
3 files changed, 25 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp
index 42cb0aa1fd2..3aba50efb87 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp
@@ -514,6 +514,14 @@ void CVTypeDumperImpl::visitUdtSourceLine(TypeLeafKind Leaf,
W.printNumber("LineNumber", Line.getLineNumber());
}
+void CVTypeDumperImpl::visitUdtModSourceLine(TypeLeafKind Leaf,
+ UdtModSourceLineRecord &Line) {
+ printTypeIndex("UDT", Line.getUDT());
+ printTypeIndex("SourceFile", Line.getSourceFile());
+ W.printNumber("LineNumber", Line.getLineNumber());
+ W.printNumber("Module", Line.getModule());
+}
+
void CVTypeDumperImpl::visitBuildInfo(TypeLeafKind Leaf,
BuildInfoRecord &Args) {
W.printNumber("NumArgs", static_cast<uint32_t>(Args.getArgs().size()));
diff --git a/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp b/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp
index bce6ebc337e..cc09abcd988 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp
@@ -491,6 +491,13 @@ bool UdtSourceLineRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) {
return Success;
}
+bool UdtModSourceLineRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) {
+ bool Success = true;
+ Success &= remapIndex(IndexMap, UDT);
+ Success &= remapIndex(IndexMap, SourceFile);
+ return Success;
+}
+
bool BuildInfoRecord::remapTypeIndices(ArrayRef<TypeIndex> IndexMap) {
bool Success = true;
for (TypeIndex &Arg : ArgIndices)
diff --git a/llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp b/llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp
index 13d1ae50069..7ac9581db3f 100644
--- a/llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp
+++ b/llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp
@@ -226,7 +226,16 @@ TypeTableBuilder::writeUdtSourceLine(const UdtSourceLineRecord &Record) {
}
TypeIndex
-TypeTableBuilder::writeFuncId(const FuncIdRecord &Record) {
+TypeTableBuilder::writeUdtModSourceLine(const UdtModSourceLineRecord &Record) {
+ TypeRecordBuilder Builder(Record.getKind());
+ Builder.writeTypeIndex(Record.getUDT());
+ Builder.writeTypeIndex(Record.getSourceFile());
+ Builder.writeUInt32(Record.getLineNumber());
+ Builder.writeUInt16(Record.getModule());
+ return writeRecord(Builder);
+}
+
+TypeIndex TypeTableBuilder::writeFuncId(const FuncIdRecord &Record) {
TypeRecordBuilder Builder(Record.getKind());
Builder.writeTypeIndex(Record.getParentScope());
Builder.writeTypeIndex(Record.getFunctionType());
OpenPOWER on IntegriCloud