diff options
author | Eric Christopher <echristo@gmail.com> | 2013-11-11 18:52:31 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-11-11 18:52:31 +0000 |
commit | 883ed6bd9544e7fac36a66711132bf151fb734ad (patch) | |
tree | 293d1159efed25509bc4f6e06944b835eee73bd1 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | 30b2a19f3be840da1bc4aefcaabcbddd2e0130fc (diff) | |
download | external_llvm-883ed6bd9544e7fac36a66711132bf151fb734ad.tar.gz external_llvm-883ed6bd9544e7fac36a66711132bf151fb734ad.tar.bz2 external_llvm-883ed6bd9544e7fac36a66711132bf151fb734ad.zip |
Just pass the DIComposite type by value instead of by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 37eef4111e..282b69cd6a 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1133,7 +1133,7 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) { switch (Tag) { case dwarf::DW_TAG_array_type: - constructArrayTypeDIE(Buffer, &CTy); + constructArrayTypeDIE(Buffer, CTy); break; case dwarf::DW_TAG_enumeration_type: { DIArray Elements = CTy.getTypeArray(); @@ -1687,12 +1687,12 @@ void CompileUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR, } /// constructArrayTypeDIE - Construct array type DIE from DICompositeType. -void CompileUnit::constructArrayTypeDIE(DIE &Buffer, DICompositeType *CTy) { - if (CTy->isVector()) +void CompileUnit::constructArrayTypeDIE(DIE &Buffer, DICompositeType CTy) { + if (CTy.isVector()) addFlag(&Buffer, dwarf::DW_AT_GNU_vector); // Emit the element type. - addType(&Buffer, resolve(CTy->getTypeDerivedFrom())); + addType(&Buffer, resolve(CTy.getTypeDerivedFrom())); // Get an anonymous type for index type. // FIXME: This type should be passed down from the front end @@ -1709,7 +1709,7 @@ void CompileUnit::constructArrayTypeDIE(DIE &Buffer, DICompositeType *CTy) { } // Add subranges to array type. - DIArray Elements = CTy->getTypeArray(); + DIArray Elements = CTy.getTypeArray(); for (unsigned i = 0, N = Elements.getNumElements(); i < N; ++i) { DIDescriptor Element = Elements.getElement(i); if (Element.getTag() == dwarf::DW_TAG_subrange_type) |