<div dir="ltr"><div><div>Thank you!<br><br></div>Thanks<br><br></div>Galina</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 2:06 PM, Dan Gohman <span dir="ltr"><<a href="mailto:sunfish@mozilla.com" target="_blank">sunfish@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>This is now fixed in clang r292269.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Dan<br><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 1:56 PM, Galina Kistanova <span dir="ltr"><<a href="mailto:gkistanova@gmail.com" target="_blank">gkistanova@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><pre><span class="m_1748993650179302962m_-4308082103306661690gmail-stdout">Actually more the one builder affected, here another one:<br><br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/4552" target="_blank">http://lab.llvm.org:8011/build<wbr>ers/llvm-clang-lld-x86_64-<wbr>scei-ps4-ubuntu-fast/builds/<wbr>4552</a><br><br>llvm.src/tools/clang/lib/CodeG<wbr>en/BackendUtil.cpp:997:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]<br>llvm.src/tools/clang/lib/CodeG<wbr>en/BackendUtil.cpp:1009:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]<br>llvm.src/tools/clang/lib/CodeG<wbr>en/CodeGenModule.cpp:3339:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]<br><br>Thanks<span class="m_1748993650179302962HOEnZb"><font color="#888888"><br><br>Galina
</font></span></span></pre></div></div></div></div><div class="m_1748993650179302962HOEnZb"><div class="m_1748993650179302962h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 1:46 PM, Galina Kistanova <span dir="ltr"><<a href="mailto:gkistanova@gmail.com" target="_blank">gkistanova@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello Dan,<br><br>It look like this commit added warnings to one of our builders:<br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/4040" target="_blank">http://lab.llvm.org:8011/build<wbr>ers/llvm-clang-lld-x86_64-scei<wbr>-ps4-windows10pro-fast/builds/<wbr>4040</a><br><br>C:\Buildbot\Slave\llvm-clang-l<wbr>ld-x86_64-scei-ps4-windows10pr<wbr>o-fast\llvm.src\tools\clang\li<wbr>b\CodeGen\BackendUtil.cpp(1004<wbr>): warning C4062: enumerator 'llvm::Triple::Wasm' in switch of enum 'llvm::Triple::ObjectFormatTyp<wbr>e' is not handled<br>C:\Buildbot\Slave\llvm-clang-l<wbr>ld-x86_64-scei-ps4-windows10pr<wbr>o-fast\llvm.src\tools\clang\li<wbr>b\CodeGen\BackendUtil.cpp(1016<wbr>): warning C4062: enumerator 'llvm::Triple::Wasm' in switch of enum 'llvm::Triple::ObjectFormatTyp<wbr>e' is not handled<br>C:\Buildbot\Slave\llvm-clang-l<wbr>ld-x86_64-scei-ps4-windows10pr<wbr>o-fast\llvm.src\tools\clang\li<wbr>b\CodeGen\CodeGenModule.cpp(33<wbr>49): warning C4062: enumerator 'llvm::Triple::Wasm' in switch of enum 'llvm::Triple::ObjectFormatTyp<wbr>e' is not handled<br><br>Please have a look at this?<br><br>Thanks<span class="m_1748993650179302962m_-4308082103306661690HOEnZb"><font color="#888888"><br><br>Galina<br></font></span></div><div class="m_1748993650179302962m_-4308082103306661690HOEnZb"><div class="m_1748993650179302962m_-4308082103306661690h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 12:34 PM, Dan Gohman via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: djg<br>
Date: Tue Jan 17 14:34:09 2017<br>
New Revision: 292252<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=292252&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=292252&view=rev</a><br>
Log:<br>
[WebAssembly] Add triple support for the new wasm object format<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D26701" rel="noreferrer" target="_blank">https://reviews.llvm.org/D2670<wbr>1</a><br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ADT/Tr<wbr>iple.h<br>
    llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp<br>
    llvm/trunk/lib/ProfileData/Ins<wbr>trProf.cpp<br>
    llvm/trunk/lib/Support/Triple.<wbr>cpp<br>
    llvm/trunk/lib/Transforms/Inst<wbr>rumentation/AddressSanitizer.c<wbr>pp<br>
    llvm/trunk/unittests/ADT/Tripl<wbr>eTest.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/Tr<wbr>iple.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Triple.h?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/llvm/<wbr>ADT/Triple.h?rev=292252&r1=292<wbr>251&r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/ADT/Tr<wbr>iple.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/Tr<wbr>iple.h Tue Jan 17 14:34:09 2017<br>
@@ -206,6 +206,7 @@ public:<br>
     COFF,<br>
     ELF,<br>
     MachO,<br>
+    Wasm,<br>
   };<br>
<br>
 private:<br>
@@ -576,6 +577,11 @@ public:<br>
     return getObjectFormat() == Triple::MachO;<br>
   }<br>
<br>
+  /// Tests whether the OS uses the Wasm binary format.<br>
+  bool isOSBinFormatWasm() const {<br>
+    return getObjectFormat() == Triple::Wasm;<br>
+  }<br>
+<br>
   /// Tests whether the target is the PS4 CPU<br>
   bool isPS4CPU() const {<br>
     return getArch() == Triple::x86_64 &&<br>
<br>
Modified: llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/MC/MCObje<wbr>ctFileInfo.cpp?rev=292252&r1=2<wbr>92251&r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp Tue Jan 17 14:34:09 2017<br>
@@ -843,6 +843,9 @@ void MCObjectFileInfo::InitMCObject<wbr>FileI<br>
     Env = IsELF;<br>
     initELFMCObjectFileInfo(TT);<br>
     break;<br>
+  case Triple::Wasm:<br>
+    report_fatal_error("Cannot initialize MC for wasm object file format yet.");<br>
+    break;<br>
   case Triple::UnknownObjectFormat:<br>
     report_fatal_error("Cannot initialize MC for unknown object file format.");<br>
     break;<br>
<br>
Modified: llvm/trunk/lib/ProfileData/Ins<wbr>trProf.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/ProfileDa<wbr>ta/InstrProf.cpp?rev=292252&r1<wbr>=292251&r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/ProfileData/Ins<wbr>trProf.cpp (original)<br>
+++ llvm/trunk/lib/ProfileData/Ins<wbr>trProf.cpp Tue Jan 17 14:34:09 2017<br>
@@ -794,7 +794,7 @@ bool needsComdatForCounter(const Functio<br>
     return true;<br>
<br>
   Triple TT(M.getTargetTriple());<br>
-  if (!TT.isOSBinFormatELF())<br>
+  if (!TT.isOSBinFormatELF() && !TT.isOSBinFormatWasm())<br>
     return false;<br>
<br>
   // See createPGOFuncNameVar for more details. To avoid link errors, profile<br>
<br>
Modified: llvm/trunk/lib/Support/Triple.<wbr>cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Support/T<wbr>riple.cpp?rev=292252&r1=292251<wbr>&r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Support/Triple.<wbr>cpp (original)<br>
+++ llvm/trunk/lib/Support/Triple.<wbr>cpp Tue Jan 17 14:34:09 2017<br>
@@ -510,6 +510,7 @@ static Triple::ObjectFormatType parseFor<br>
     .EndsWith("coff", Triple::COFF)<br>
     .EndsWith("elf", Triple::ELF)<br>
     .EndsWith("macho", Triple::MachO)<br>
+    .EndsWith("wasm", Triple::Wasm)<br>
     .Default(Triple::UnknownObjec<wbr>tFormat);<br>
 }<br>
<br>
@@ -581,6 +582,7 @@ static StringRef getObjectFormatTypeName<br>
   case Triple::COFF: return "coff";<br>
   case Triple::ELF: return "elf";<br>
   case Triple::MachO: return "macho";<br>
+  case Triple::Wasm: return "wasm";<br>
   }<br>
   llvm_unreachable("unknown object format type");<br>
 }<br>
<br>
Modified: llvm/trunk/lib/Transforms/Inst<wbr>rumentation/AddressSanitizer.c<wbr>pp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Transform<wbr>s/Instrumentation/AddressSanit<wbr>izer.cpp?rev=292252&r1=292251&<wbr>r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Transforms/Inst<wbr>rumentation/AddressSanitizer.c<wbr>pp (original)<br>
+++ llvm/trunk/lib/Transforms/Inst<wbr>rumentation/AddressSanitizer.c<wbr>pp Tue Jan 17 14:34:09 2017<br>
@@ -1853,7 +1853,8 @@ bool AddressSanitizerModule::Instru<wbr>mentG<br>
     GlobalValue *InstrumentedGlobal = NewGlobal;<br>
<br>
     bool CanUsePrivateAliases =<br>
-        TargetTriple.isOSBinFormatELF(<wbr>) || TargetTriple.isOSBinFormatMach<wbr>O();<br>
+        TargetTriple.isOSBinFormatELF(<wbr>) || TargetTriple.isOSBinFormatMach<wbr>O() ||<br>
+        TargetTriple.isOSBinFormatWasm<wbr>();<br>
     if (CanUsePrivateAliases && ClUsePrivateAliasForGlobals) {<br>
       // Create local alias for NewGlobal to avoid crash on ODR between<br>
       // instrumented and non-instrumented libraries.<br>
<br>
Modified: llvm/trunk/unittests/ADT/Tripl<wbr>eTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=292252&r1=292251&r2=292252&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/unittests/ADT<wbr>/TripleTest.cpp?rev=292252&r1=<wbr>292251&r2=292252&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/unittests/ADT/Tripl<wbr>eTest.cpp (original)<br>
+++ llvm/trunk/unittests/ADT/Tripl<wbr>eTest.cpp Tue Jan 17 14:34:09 2017<br>
@@ -888,6 +888,9 @@ TEST(TripleTest, FileFormat) {<br>
   EXPECT_EQ(Triple::ELF, Triple("i686-pc-windows-msvc-e<wbr>lf").getObjectFormat());<br>
   EXPECT_EQ(Triple::ELF, Triple("i686-pc-cygwin-elf").g<wbr>etObjectFormat());<br>
<br>
+  EXPECT_EQ(Triple::Wasm, Triple("wasm32-unknown-unknown<wbr>-wasm").getObjectFormat());<br>
+  EXPECT_EQ(Triple::Wasm, Triple("wasm64-unknown-unknown<wbr>-wasm").getObjectFormat());<br>
+<br>
   Triple MSVCNormalized(Triple::normali<wbr>ze("i686-pc-windows-msvc-elf")<wbr>);<br>
   EXPECT_EQ(Triple::ELF, MSVCNormalized.getObjectFormat<wbr>());<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>