[llvm] r279542 - Possible fix of test failures on win bots

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 11:00:41 PDT 2016


Author: davidxl
Date: Tue Aug 23 13:00:41 2016
New Revision: 279542

URL: http://llvm.org/viewvc/llvm-project?rev=279542&view=rev
Log:
Possible fix of test failures on win bots 

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=279542&r1=279541&r2=279542&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Aug 23 13:00:41 2016
@@ -766,9 +766,9 @@ void LoopUnswitch::EmitPreheaderBranchOn
   BranchInst *BI = BranchInst::Create(TrueDest, FalseDest, BranchVal, InsertPt);
   if (TI) {
     // FIXME: check why white list is needed here:
-    ArrayRef<unsigned> WL = {LLVMContext::MD_dbg, LLVMContext::MD_prof,
-                             LLVMContext::MD_make_implicit};
-    BI->copyMetadata(*TI, WL);
+    unsigned WL[3] = {LLVMContext::MD_dbg, LLVMContext::MD_prof,
+                      LLVMContext::MD_make_implicit};
+    BI->copyMetadata(*TI, makeArrayRef(&WL[0], 3));
     if (Swapped)
       BI->swapProfMetadata();
   }




More information about the llvm-commits mailing list