<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yeah I fixed it almost immediately in r267104: <a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3875" class="">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3875</a><div class=""><br class=""></div><div class="">MSVC is happy with a move of the enum to create the std::pair. I have no idea why but I'm interested to understand if you know?</div><div class=""><br class=""></div><div class="">-- </div><div class="">Mehdi</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Apr 21, 2016, at 10:04 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="">chisophugis@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This seems to break VS2015: <a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3874" class="">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/3874</a><div class=""><br class=""></div><div class="">-- Sean Silva</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Apr 21, 2016 at 9:28 PM, Mehdi Amini via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mehdi_amini<br class="">
Date: Thu Apr 21 23:28:05 2016<br class="">
New Revision: 267103<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=267103&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=267103&view=rev</a><br class="">
Log:<br class="">
Refactor IRObjectFile, extract a static CollectAsmUndefinedRefs() method to parse inline assembly (NFC)<br class="">
<br class="">
I plan to call this from ThinLTOCodeGenerator.<br class="">
<br class="">
From: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" class="">mehdi.amini@apple.com</a>><br class="">
<br class="">
Modified:<br class="">
llvm/trunk/include/llvm/Object/IRObjectFile.h<br class="">
llvm/trunk/lib/Object/IRObjectFile.cpp<br class="">
<br class="">
Modified: llvm/trunk/include/llvm/Object/IRObjectFile.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/IRObjectFile.h?rev=267103&r1=267102&r2=267103&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/IRObjectFile.h?rev=267103&r1=267102&r2=267103&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/include/llvm/Object/IRObjectFile.h (original)<br class="">
+++ llvm/trunk/include/llvm/Object/IRObjectFile.h Thu Apr 21 23:28:05 2016<br class="">
@@ -59,6 +59,16 @@ public:<br class="">
/// error code if not found.<br class="">
static ErrorOr<MemoryBufferRef> findBitcodeInObject(const ObjectFile &Obj);<br class="">
<br class="">
+ /// Parse inline ASM and collect the symbols that are not defined in<br class="">
+ /// the current module.<br class="">
+ ///<br class="">
+ /// For each found symbol, call \p AsmUndefinedRefs with the name of the<br class="">
+ /// symbol found and the associated flags.<br class="">
+ static void CollectAsmUndefinedRefs(<br class="">
+ Module &TheModule,<br class="">
+ const std::function<void(StringRef, BasicSymbolRef::Flags)> &<br class="">
+ AsmUndefinedRefs);<br class="">
+<br class="">
/// \brief Finds and returns bitcode in the given memory buffer (which may<br class="">
/// be either a bitcode file or a native object file with embedded bitcode),<br class="">
/// or an error code if not found.<br class="">
<br class="">
Modified: llvm/trunk/lib/Object/IRObjectFile.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/IRObjectFile.cpp?rev=267103&r1=267102&r2=267103&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/IRObjectFile.cpp?rev=267103&r1=267102&r2=267103&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/Object/IRObjectFile.cpp (original)<br class="">
+++ llvm/trunk/lib/Object/IRObjectFile.cpp Thu Apr 21 23:28:05 2016<br class="">
@@ -38,12 +38,24 @@ using namespace object;<br class="">
IRObjectFile::IRObjectFile(MemoryBufferRef Object, std::unique_ptr<Module> Mod)<br class="">
: SymbolicFile(Binary::ID_IR, Object), M(std::move(Mod)) {<br class="">
Mang.reset(new Mangler());<br class="">
+ CollectAsmUndefinedRefs(*M, [this](StringRef Name,<br class="">
+ BasicSymbolRef::Flags Flags) {<br class="">
+ AsmSymbols.push_back(std::make_pair<std::string, uint32_t>(Name, Flags));<br class="">
+ });<br class="">
+}<br class="">
+<br class="">
+// Parse inline ASM and collect the list of symbols that are not defined in<br class="">
+// the current module. This is inspired from IRObjectFile.<br class="">
+void IRObjectFile::CollectAsmUndefinedRefs(<br class="">
+ Module &TheModule,<br class="">
+ const std::function<void(StringRef, BasicSymbolRef::Flags)> &<br class="">
+ AsmUndefinedRefs) {<br class="">
<br class="">
- const std::string &InlineAsm = M->getModuleInlineAsm();<br class="">
+ const std::string &InlineAsm = TheModule.getModuleInlineAsm();<br class="">
if (InlineAsm.empty())<br class="">
return;<br class="">
<br class="">
- Triple TT(M->getTargetTriple());<br class="">
+ Triple TT(TheModule.getTargetTriple());<br class="">
std::string Err;<br class="">
const Target *T = TargetRegistry::lookupTarget(TT.str(), Err);<br class="">
if (!T)<br class="">
@@ -106,8 +118,7 @@ IRObjectFile::IRObjectFile(MemoryBufferR<br class="">
Res |= BasicSymbolRef::SF_Global;<br class="">
break;<br class="">
}<br class="">
- AsmSymbols.push_back(<br class="">
- std::make_pair<std::string, uint32_t>(Key, std::move(Res)));<br class="">
+ AsmUndefinedRefs(Key, BasicSymbolRef::Flags(Res));<br class="">
}<br class="">
}<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></body></html>