[PATCH] D21114: [DebugInfo] Add calling convention support for DWARF and CodeView
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 11:43:47 PDT 2016
rnk marked 4 inline comments as done.
================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:2412
@@ -2411,3 +2411,3 @@
case bitc::METADATA_SUBROUTINE_TYPE: {
- if (Record.size() != 3)
+ if (Record.size() != 3 && Record.size() != 4)
return error("Invalid record");
----------------
aaboud wrote:
> Consider emitting the CC as last field in the bitcode, i.e. Record[3].
> Notice that the order in bitcode and text does not have to be the same.
Yeah, that's better.
================
Comment at: lib/Support/Dwarf.cpp:392
@@ -391,3 @@
- case DW_CC_nocall: return "DW_CC_nocall";
- case DW_CC_lo_user: return "DW_CC_lo_user";
- case DW_CC_hi_user: return "DW_CC_hi_user";
----------------
aaboud wrote:
> Notice that we had the DW_CC_lo_user and SW_CC_hi_user before, and now we do not.
> Is that intentional?
I don't think it makes sense to stringify calling convention 0x40 as DW_CC_lo_user, given that GCC uses it for a real value:
https://github.com/gcc-mirror/gcc/blob/8b066242809973ce7ae3d24712f430a9a2bd786a/include/dwarf2.h#L181
================
Comment at: test/DebugInfo/X86/DW_AT_calling-convention.ll:1
@@ +1,2 @@
+; RUN: llc < %s -filetype=obj -o %t
+; RUN: llvm-dwarfdump %t | FileCheck %s
----------------
aaboud wrote:
> Do you have the original source of this test?
> Can you add it as a comment into the LIT test?
Yeah, it's the same as the codeview case.
http://reviews.llvm.org/D21114
More information about the llvm-commits
mailing list