diff options
author | Reid Kleckner <rnk@google.com> | 2016-06-08 20:34:29 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-06-08 20:34:29 +0000 |
commit | de3d8b500f536bf091844a3fa5afa0848981f8ee (patch) | |
tree | c523ec40adfa362f0d1cdd6f4da60702180d4263 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 384d0f219d92b327a3a38ca613257dbf5e0911f1 (diff) | |
download | llvm-de3d8b500f536bf091844a3fa5afa0848981f8ee.zip llvm-de3d8b500f536bf091844a3fa5afa0848981f8ee.tar.gz llvm-de3d8b500f536bf091844a3fa5afa0848981f8ee.tar.bz2 |
[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
llvm-svn: 272197
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index d65e924..06a4ef1 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1467,6 +1467,7 @@ void ModuleBitcodeWriter::writeDISubroutineType( Record.push_back(HasNoOldTypeRefs | (unsigned)N->isDistinct()); Record.push_back(N->getFlags()); Record.push_back(VE.getMetadataOrNullID(N->getTypeArray().get())); + Record.push_back(N->getCC()); Stream.EmitRecord(bitc::METADATA_SUBROUTINE_TYPE, Record, Abbrev); Record.clear(); |