From ae3882a19a9b8341c707fd3c56f245d77068d269 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 11 May 2016 17:47:35 +0000 Subject: Refactor CodeView type records to use common code. Differential Revision: http://reviews.llvm.org/D20138 Reviewed By: rnk llvm-svn: 269216 --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 4c4809f50e3..3590d937643 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -263,7 +263,7 @@ void CodeViewDebug::emitTypeInformation() { // type here. unsigned ArgListIndex = getNextTypeIndex(); OS.AddComment("Type record length"); - OS.EmitIntValue(2 + sizeof(ArgList), 2); + OS.EmitIntValue(StringListRecord::getLayoutSize(), 2); OS.AddComment("Leaf type: LF_ARGLIST"); OS.EmitIntValue(LF_ARGLIST, 2); OS.AddComment("Number of arguments"); @@ -271,7 +271,7 @@ void CodeViewDebug::emitTypeInformation() { unsigned VoidFnTyIdx = getNextTypeIndex(); OS.AddComment("Type record length"); - OS.EmitIntValue(2 + sizeof(ProcedureType), 2); + OS.EmitIntValue(ProcedureRecord::getLayoutSize(), 2); OS.AddComment("Leaf type: LF_PROCEDURE"); OS.EmitIntValue(LF_PROCEDURE, 2); OS.AddComment("Return type index"); -- cgit v1.2.3