diff options
author | Manman Ren <mren@apple.com> | 2013-07-02 23:40:10 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-07-02 23:40:10 +0000 |
commit | 0e6783feed2f0f572a002bda38707fcd3267916d (patch) | |
tree | 3bf69ef6cb0a003d98ce98ad023d5cb60c9cbafc /lib/CodeGen/AsmPrinter/DIE.h | |
parent | d3b98530c55ab695ab02426a804ee0ca09f890b6 (diff) | |
download | llvm-0e6783feed2f0f572a002bda38707fcd3267916d.tar.gz llvm-0e6783feed2f0f572a002bda38707fcd3267916d.tar.bz2 llvm-0e6783feed2f0f572a002bda38707fcd3267916d.tar.xz |
Debug Info: use module flag to set up Dwarf version.
Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with
version from module flag.
TODO: turn on/off features depending on the Dwarf version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIE.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIE.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h index 412c09c6c8..3b04e20625 100644 --- a/lib/CodeGen/AsmPrinter/DIE.h +++ b/lib/CodeGen/AsmPrinter/DIE.h @@ -365,9 +365,13 @@ namespace llvm { /// SizeOf - Determine size of debug information entry in bytes. /// virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const { - return sizeof(int32_t); + return Form == dwarf::DW_FORM_ref_addr ? getRefAddrSize(AP) : + sizeof(int32_t); } + /// Returns size of a ref_addr entry. + static unsigned getRefAddrSize(AsmPrinter *AP); + // Implement isa/cast/dyncast. static bool classof(const DIEValue *E) { return E->getType() == isEntry; } |