Ver Fonte

Replace std::make_unique with llvm::make_unique (#2367)

Tristan Labelle há 6 anos atrás
pai
commit
02ac47c26d
2 ficheiros alterados com 4 adições e 2 exclusões
  1. 2 1
      lib/DxilDia/DxilDiaSession.cpp
  2. 2 1
      lib/HLSL/DxilContainerReflection.cpp

+ 2 - 1
lib/DxilDia/DxilDiaSession.cpp

@@ -13,6 +13,7 @@
 
 #include "dxc/DxilPIXPasses/DxilPIXPasses.h"
 #include "dxc/DxilPIXPasses/DxilPIXVirtualRegisters.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/InstIterator.h"
 #include "llvm/IR/Instruction.h"
@@ -38,7 +39,7 @@ void dxil_dia::Session::Init(
   m_module = module;
   m_context = context;
   m_finder = finder;
-  m_dxilModule = std::make_unique<hlsl::DxilModule>(module.get());
+  m_dxilModule = llvm::make_unique<hlsl::DxilModule>(module.get());
 
   llvm::legacy::PassManager PM;
   llvm::initializeDxilAnnotateWithVirtualRegisterPass(*llvm::PassRegistry::getPassRegistry());

+ 2 - 1
lib/HLSL/DxilContainerReflection.cpp

@@ -9,6 +9,7 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/IR/LLVMContext.h"
 #include "llvm/IR/InstIterator.h"
@@ -1797,7 +1798,7 @@ LPCSTR DxilShaderReflection::CreateUpperCase(LPCSTR pValue) {
   if (*pCursor == '\0')
     return pValue;
 
-  std::unique_ptr<char[]> pUpperStr = std::make_unique<char[]>(strlen(pValue) + 1);
+  std::unique_ptr<char[]> pUpperStr = llvm::make_unique<char[]>(strlen(pValue) + 1);
   char *pWrite = pUpperStr.get();
   pCursor = pValue;
   for (;;) {