<div dir="ltr"><div>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</div><div>
<br></div><div><div> ; WIN32: /EXPORT:weak_alias</div><div>+; WIN32: /EXPORT:blob_alias"</div></div><div><br></div><div>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.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 24, 2014 at 4:46 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I found this while looking at the idea of support a larger subset of<br>
ConstantExprs in GlobalAlias, but it looks like and independent<br>
improvement.<br>
<br>
Currently we look at the Aliasee to decide what type of export<br>
directive to use. It seems better to use the type of the alias<br>
directly. This is similar to how we handle with the alias having the<br>
same address but other attributes (linkage, visibility) from the<br>
aliasee.<br>
<br>
With this patch it is now possible to do things like<br>
<br>
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"<br>
target triple = "x86_64-pc-windows-msvc"<br>
@foo = global [6 x i8] c"\B8*\00\00\00\C3", section ".text", align 16<br>
@f = dllexport alias i32 (), [6 x i8]* @foo<br>
!llvm.module.flags = !{!0}<br>
!0 = metadata !{i32 6, metadata !"Linker Options", metadata !1}<br>
!1 = metadata !{metadata !2, metadata !3}<br>
!2 = metadata !{metadata !"/DEFAULTLIB:libcmt.lib"}<br>
!3 = metadata !{metadata !"/DEFAULTLIB:oldnames.lib"}<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>