[patch] Emit data or code export directives based on the type

Reid Kleckner rnk at google.com
Tue May 27 14:11:52 PDT 2014


Even once David adds sections to the IL, I think this is still reasonable.
 I'm imagining someone with an RWX section that contains both exported data
and functions in the same section.  LGTM

 ; WIN32: /EXPORT:weak_alias
+; WIN32: /EXPORT:blob_alias"

I agree with Nico, all the export checks should be quoted.  That's what we
do for clang's driver tests for the same reason.


On Sat, May 24, 2014 at 4:46 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> I found this while looking at the idea of support a larger subset of
> ConstantExprs in GlobalAlias, but it looks like and independent
> improvement.
>
> Currently we look at the Aliasee to decide what type of export
> directive to use. It seems better to use the type of the alias
> directly. This is similar to how we handle with the alias having the
> same address but other attributes (linkage, visibility) from the
> aliasee.
>
> With this patch it is now possible to do things like
>
> target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-pc-windows-msvc"
> @foo = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16
> @f = dllexport alias i32 (), [6 x i8]* @foo
> !llvm.module.flags = !{!0}
> !0 = metadata !{i32 6, metadata !"Linker Options", metadata !1}
> !1 = metadata !{metadata !2, metadata !3}
> !2 = metadata !{metadata !"/DEFAULTLIB:libcmt.lib"}
> !3 = metadata !{metadata !"/DEFAULTLIB:oldnames.lib"}
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140527/342000d5/attachment.html>


More information about the llvm-commits mailing list