[llvm] r222034 - COFF: Add support for Dwarf accelerator tables.
David Blaikie
dblaikie at gmail.com
Fri Nov 14 12:40:30 PST 2014
On Fri, Nov 14, 2014 at 12:33 PM, Frederic Riss <friss at apple.com> wrote:
> Author: friss
> Date: Fri Nov 14 14:33:40 2014
> New Revision: 222034
>
> URL: http://llvm.org/viewvc/llvm-project?rev=222034&view=rev
> Log:
> COFF: Add support for Dwarf accelerator tables.
>
> This allows COFF targets to emit accelerator tables
> when requested by -dwarf-accel-tables=Enable instead
> of aborting. The test DebugInfo/cross-cu-inlining.ll
> covers this on COFF platforms.
>
Usually if I find/fix actual bugs in platform-specific support for an
otherwise platform-neutral test, I'll add explicit-triple tests for each of
the platforms to demonstrate the fix. (in this instance, potentially
leaving the .ll file in test/DebugInfo, but adding foo.test files in
test/DebugInfo/X86, etc, with specified triples that exercise the
interesting codepaths (ELF relocations, COFF sections, etc))
This way, the fix is demonstrated in a portable manner in the regression
suite so that you or anyone else working on this won't break these
unknowingly only to have the buildbots complain about it, etc...
Just a thought - opinions differ on this, certainly,
- David
>
> Modified:
> llvm/trunk/lib/MC/MCObjectFileInfo.cpp
>
> Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=222034&r1=222033&r2=222034&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
> +++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Fri Nov 14 14:33:40 2014
> @@ -781,6 +781,27 @@ void MCObjectFileInfo::InitCOFFMCObjectF
> COFF::IMAGE_SCN_MEM_READ,
> SectionKind::getMetadata());
>
> + DwarfAccelNamesSection =
> + Ctx->getCOFFSection(".apple_names",
> + COFF::IMAGE_SCN_MEM_DISCARDABLE |
> + COFF::IMAGE_SCN_MEM_READ,
> + SectionKind::getMetadata());
> + DwarfAccelNamespaceSection =
> + Ctx->getCOFFSection(".apple_namespaces",
> + COFF::IMAGE_SCN_MEM_DISCARDABLE |
> + COFF::IMAGE_SCN_MEM_READ,
> + SectionKind::getMetadata());
> + DwarfAccelTypesSection =
> + Ctx->getCOFFSection(".apple_types",
> + COFF::IMAGE_SCN_MEM_DISCARDABLE |
> + COFF::IMAGE_SCN_MEM_READ,
> + SectionKind::getMetadata());
> + DwarfAccelObjCSection =
> + Ctx->getCOFFSection(".apple_objc",
> + COFF::IMAGE_SCN_MEM_DISCARDABLE |
> + COFF::IMAGE_SCN_MEM_READ,
> + SectionKind::getMetadata());
> +
> DrectveSection =
> Ctx->getCOFFSection(".drectve",
> COFF::IMAGE_SCN_LNK_INFO |
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141114/bbece6d2/attachment.html>
More information about the llvm-commits
mailing list