diff llvm/unittests/CodeGen/MachineInstrTest.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 0572611fdcc8
children c4bab56944e8
line wrap: on
line diff
--- a/llvm/unittests/CodeGen/MachineInstrTest.cpp	Tue Jun 15 19:13:43 2021 +0900
+++ b/llvm/unittests/CodeGen/MachineInstrTest.cpp	Tue Jun 15 19:15:29 2021 +0900
@@ -6,8 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/ADT/Triple.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
-#include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/MachineMemOperand.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
@@ -33,8 +34,10 @@
 #include "MFCommon.inc"
 
 std::unique_ptr<MCContext> createMCContext(MCAsmInfo *AsmInfo) {
-  return std::make_unique<MCContext>(
-      AsmInfo, nullptr, nullptr, nullptr, nullptr, false);
+  Triple TheTriple(/*ArchStr=*/"", /*VendorStr=*/"", /*OSStr=*/"",
+                   /*EnvironmentStr=*/"elf");
+  return std::make_unique<MCContext>(TheTriple, AsmInfo, nullptr, nullptr,
+                                     nullptr, nullptr, false);
 }
 
 // This test makes sure that MachineInstr::isIdenticalTo handles Defs correctly
@@ -383,6 +386,7 @@
   ASSERT_FALSE(MI->getHeapAllocMarker());
 }
 
-static_assert(is_trivially_copyable<MCOperand>::value, "trivially copyable");
+static_assert(std::is_trivially_copyable<MCOperand>::value,
+              "trivially copyable");
 
 } // end namespace