OSDN Git Service

[DebugInfo] Add calling convention support for DWARF and CodeView
authorReid Kleckner <rnk@google.com>
Wed, 8 Jun 2016 20:34:29 +0000 (20:34 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 8 Jun 2016 20:34:29 +0000 (20:34 +0000)
commit3d3aca2d9709c82c26c7d1388bb10e7c454c4411
tree54d8fc9c3a2d068437b259df8b0ea89bff1cd159
parent2ae3d2cd86abdfda2b266528b461d0703c31086d
[DebugInfo] Add calling convention support for DWARF and CodeView

Summary:
Now DISubroutineType has a 'cc' field which should be a DW_CC_ enum.  If
it is present and non-zero, the backend will emit it as a
DW_AT_calling_convention attribute. On the CodeView side, we translate
it to the appropriate enum for the LF_PROCEDURE record.

I added a new LLVM vendor specific enum to the list of DWARF calling
conventions. DWARF does not appear to attempt to standardize these, so I
assume it's OK to do this until we coordinate with GCC on how to emit
vectorcall convention functions.

Reviewers: dexonsmith, majnemer, aaboud, amccarth

Subscribers: mehdi_amini, llvm-commits

Differential Revision: http://reviews.llvm.org/D21114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272197 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/IR/DIBuilder.h
include/llvm/IR/DebugInfoMetadata.h
include/llvm/Support/Dwarf.def
include/llvm/Support/Dwarf.h
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/IR/AsmWriter.cpp
lib/IR/DIBuilder.cpp
lib/IR/DebugInfoMetadata.cpp
lib/IR/LLVMContextImpl.h
lib/Support/Dwarf.cpp
test/Assembler/disubroutinetype.ll
test/DebugInfo/COFF/types-calling-conv.ll [new file with mode: 0644]
test/DebugInfo/X86/DW_AT_calling-convention.ll [new file with mode: 0644]
unittests/IR/MetadataTest.cpp