diff --git a/lib/HLSL/DxilAddPixelHitInstrumentation.cpp b/lib/HLSL/DxilAddPixelHitInstrumentation.cpp index 6bedca558..e53a86630 100644 --- a/lib/HLSL/DxilAddPixelHitInstrumentation.cpp +++ b/lib/HLSL/DxilAddPixelHitInstrumentation.cpp @@ -74,7 +74,7 @@ bool DxilAddPixelHitInstrumentation::runOnModule(Module &M) // about the shader having selected components that don't include x or y. // If not present, we add it. if ( SV_Position == InputElements.end() ) { - auto SVPosition = std::make_unique(DXIL::SigPointKind::PSIn); + auto SVPosition = llvm::make_unique(DXIL::SigPointKind::PSIn); SVPosition->Initialize("Position", hlsl::CompType::getF32(), hlsl::DXIL::InterpolationMode::Linear, 1, 4, SVPositionIndex == -1 ? 0 : SVPositionIndex, 0); SVPosition->AppendSemanticIndex(0); SVPosition->SetSigPointKind(DXIL::SigPointKind::PSIn); diff --git a/lib/HLSL/DxilDebugInstrumentation.cpp b/lib/HLSL/DxilDebugInstrumentation.cpp index 8d818ee76..494344f89 100644 --- a/lib/HLSL/DxilDebugInstrumentation.cpp +++ b/lib/HLSL/DxilDebugInstrumentation.cpp @@ -263,7 +263,7 @@ DxilDebugInstrumentation::SystemValueIndices DxilDebugInstrumentation::addRequir // about the shader having selected components that don't include x or y. // If not present, we add it. if (Existing_SV_Position == InputElements.end()) { - auto Added_SV_Position = std::make_unique(DXIL::SigPointKind::PSIn); + auto Added_SV_Position = llvm::make_unique(DXIL::SigPointKind::PSIn); Added_SV_Position->Initialize("Position", hlsl::CompType::getF32(), hlsl::DXIL::InterpolationMode::Linear, 1, 4); Added_SV_Position->AppendSemanticIndex(0); Added_SV_Position->SetSigPointKind(DXIL::SigPointKind::PSIn); @@ -285,7 +285,7 @@ DxilDebugInstrumentation::SystemValueIndices DxilDebugInstrumentation::addRequir return Element->GetSemantic()->GetKind() == hlsl::DXIL::SemanticKind::VertexID; }); if (Existing_SV_VertexId == InputElements.end()) { - auto Added_SV_VertexId = std::make_unique(DXIL::SigPointKind::VSIn); + auto Added_SV_VertexId = llvm::make_unique(DXIL::SigPointKind::VSIn); Added_SV_VertexId->Initialize("VertexId", hlsl::CompType::getF32(), hlsl::DXIL::InterpolationMode::Undefined, 1, 1); Added_SV_VertexId->AppendSemanticIndex(0); Added_SV_VertexId->SetSigPointKind(DXIL::SigPointKind::VSIn); @@ -305,7 +305,7 @@ DxilDebugInstrumentation::SystemValueIndices DxilDebugInstrumentation::addRequir return Element->GetSemantic()->GetKind() == hlsl::DXIL::SemanticKind::InstanceID; }); if (Existing_SV_InstanceId == InputElements.end()) { - auto Added_SV_InstanceId = std::make_unique(DXIL::SigPointKind::VSIn); + auto Added_SV_InstanceId = llvm::make_unique(DXIL::SigPointKind::VSIn); Added_SV_InstanceId->Initialize("InstanceId", hlsl::CompType::getF32(), hlsl::DXIL::InterpolationMode::Undefined, 1, 1); Added_SV_InstanceId->AppendSemanticIndex(0); Added_SV_InstanceId->SetSigPointKind(DXIL::SigPointKind::VSIn); diff --git a/lib/HLSL/DxilGenerationPass.cpp b/lib/HLSL/DxilGenerationPass.cpp index 62e8a818a..3ebb15987 100644 --- a/lib/HLSL/DxilGenerationPass.cpp +++ b/lib/HLSL/DxilGenerationPass.cpp @@ -123,7 +123,7 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, DxilEntrySignature * // Resources for (auto && C : H.GetCBuffers()) { - auto b = make_unique(); + auto b = llvm::make_unique(); InitResourceBase(C.get(), b.get()); b->SetSize(C->GetSize()); if (HasDebugInfo) @@ -133,7 +133,7 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, DxilEntrySignature * M.AddCBuffer(std::move(b)); } for (auto && C : H.GetUAVs()) { - auto b = make_unique(); + auto b = llvm::make_unique(); InitResource(C.get(), b.get()); if (HasDebugInfo) LLVMUsed.emplace_back(cast(b->GetGlobalSymbol())); @@ -142,7 +142,7 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, DxilEntrySignature * M.AddUAV(std::move(b)); } for (auto && C : H.GetSRVs()) { - auto b = make_unique(); + auto b = llvm::make_unique(); InitResource(C.get(), b.get()); if (HasDebugInfo) LLVMUsed.emplace_back(cast(b->GetGlobalSymbol())); @@ -151,7 +151,7 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, DxilEntrySignature * M.AddSRV(std::move(b)); } for (auto && C : H.GetSamplers()) { - auto b = make_unique(); + auto b = llvm::make_unique(); InitResourceBase(C.get(), b.get()); b->SetSamplerKind(C->GetSamplerKind()); if (HasDebugInfo) @@ -593,9 +593,9 @@ void DxilGenerationPass::TranslateDxilResourceUses( // Must be instruction for multi dim array. std::unique_ptr > Builder; if (GetElementPtrInst *GEPInst = dyn_cast(GEP)) { - Builder = std::make_unique >(GEPInst); + Builder = llvm::make_unique >(GEPInst); } else { - Builder = std::make_unique >(GV->getContext()); + Builder = llvm::make_unique >(GV->getContext()); } for (; GEPIt != E; ++GEPIt) { if (GEPIt->isArrayTy()) { diff --git a/lib/HLSL/DxilLinker.cpp b/lib/HLSL/DxilLinker.cpp index 4e783eefc..4fae726b2 100644 --- a/lib/HLSL/DxilLinker.cpp +++ b/lib/HLSL/DxilLinker.cpp @@ -595,7 +595,7 @@ DxilLinkJob::Link(std::pair &entryLinkPair, // Add signature. DxilEntrySignature &entrySig = entryDM.GetDxilEntrySignature(entryFunc); std::unique_ptr newSig = - std::make_unique(entrySig); + llvm::make_unique(entrySig); DM.ResetEntrySignature(newSig.release()); } @@ -768,7 +768,7 @@ bool DxilLinkerImpl::RegisterLib(StringRef name, pM->setModuleIdentifier(name); std::unique_ptr pLib = - std::make_unique(std::move(pM)); + llvm::make_unique(std::move(pM)); m_LibMap[name] = std::move(pLib); return true; } diff --git a/lib/HLSL/DxilModule.cpp b/lib/HLSL/DxilModule.cpp index 3cd2a15bc..6620a77c7 100644 --- a/lib/HLSL/DxilModule.cpp +++ b/lib/HLSL/DxilModule.cpp @@ -59,10 +59,10 @@ namespace hlsl { DxilModule::DxilModule(Module *pModule) : m_Ctx(pModule->getContext()) , m_pModule(pModule) -, m_pOP(std::make_unique(pModule->getContext(), pModule)) -, m_pTypeSystem(std::make_unique(pModule)) -, m_pViewIdState(std::make_unique(this)) -, m_pMDHelper(std::make_unique(pModule, std::make_unique(pModule))) +, m_pOP(llvm::make_unique(pModule->getContext(), pModule)) +, m_pTypeSystem(llvm::make_unique(pModule)) +, m_pViewIdState(llvm::make_unique(this)) +, m_pMDHelper(llvm::make_unique(pModule, llvm::make_unique(pModule))) , m_pDebugInfoFinder(nullptr) , m_pEntryFunc(nullptr) , m_EntryName("") @@ -1684,7 +1684,7 @@ void DxilModule::StripDebugRelatedCode() { } DebugInfoFinder &DxilModule::GetOrCreateDebugInfoFinder() { if (m_pDebugInfoFinder == nullptr) { - m_pDebugInfoFinder = std::make_unique(); + m_pDebugInfoFinder = llvm::make_unique(); m_pDebugInfoFinder->processModule(*m_pModule); } return *m_pDebugInfoFinder; @@ -1763,7 +1763,7 @@ namespace llvm { hlsl::DxilModule &Module::GetOrCreateDxilModule(bool skipInit) { std::unique_ptr M; if (!HasDxilModule()) { - M = std::make_unique(this); + M = llvm::make_unique(this); if (!skipInit) { M->LoadDxilMetadata(); } diff --git a/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp b/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp index 6cf4e8e1e..3ddfc78e9 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp @@ -6192,7 +6192,7 @@ void SROA_Parameter_HLSL::createFlattenedFunction(Function *F) { // ShaderProps. if (m_pHLModule->HasDxilFunctionProps(F)) { DxilFunctionProps &funcProps = m_pHLModule->GetDxilFunctionProps(F); - std::unique_ptr flatFuncProps = std::make_unique(); + std::unique_ptr flatFuncProps = llvm::make_unique(); flatFuncProps->shaderKind = funcProps.shaderKind; flatFuncProps->ShaderProps = funcProps.ShaderProps; m_pHLModule->AddDxilFunctionProps(flatF, flatFuncProps); diff --git a/tools/clang/lib/Frontend/FrontendActions.cpp b/tools/clang/lib/Frontend/FrontendActions.cpp index 3f9a9b0f1..3459e2861 100644 --- a/tools/clang/lib/Frontend/FrontendActions.cpp +++ b/tools/clang/lib/Frontend/FrontendActions.cpp @@ -706,7 +706,7 @@ HLSLRootSignatureAction::HLSLRootSignatureAction(StringRef rootSigMacro, unsigned major, unsigned minor) : HLSLRootSignatureMacro(rootSigMacro), rootSigMajor(major), rootSigMinor(minor) { - rootSigHandle = std::make_unique(); + rootSigHandle = llvm::make_unique(); } void HLSLRootSignatureAction::ExecuteAction() { diff --git a/tools/clang/tools/dxcompiler/dxcompilerobj.cpp b/tools/clang/tools/dxcompiler/dxcompilerobj.cpp index ee8856af0..d28942bff 100644 --- a/tools/clang/tools/dxcompiler/dxcompilerobj.cpp +++ b/tools/clang/tools/dxcompiler/dxcompilerobj.cpp @@ -374,7 +374,7 @@ public: llvm::LLVMContext llvmContext; // LLVMContext should outlive CompilerInstance CompilerInstance compiler; std::unique_ptr diagPrinter = - std::make_unique(w, &compiler.getDiagnosticOpts()); + llvm::make_unique(w, &compiler.getDiagnosticOpts()); SetupCompilerForCompile(compiler, &m_langExtensionsHelper, utf8SourceName, diagPrinter.get(), defines, opts, pArguments, argCount); msfPtr->SetupForCompilerInstance(compiler); @@ -673,7 +673,7 @@ public: raw_stream_ostream outStream(pOutputStream.p); CompilerInstance compiler; std::unique_ptr diagPrinter = - std::make_unique(w, &compiler.getDiagnosticOpts()); + llvm::make_unique(w, &compiler.getDiagnosticOpts()); SetupCompilerForCompile(compiler, &m_langExtensionsHelper, utf8SourceName, diagPrinter.get(), defines, opts, pArguments, argCount); msfPtr->SetupForCompilerInstance(compiler); diff --git a/tools/clang/tools/libclang/dxcrewriteunused.cpp b/tools/clang/tools/libclang/dxcrewriteunused.cpp index 492308dfa..c89dd692e 100644 --- a/tools/clang/tools/libclang/dxcrewriteunused.cpp +++ b/tools/clang/tools/libclang/dxcrewriteunused.cpp @@ -339,7 +339,7 @@ HRESULT DoRewriteUnused(_In_ DxcLangExtensionsHelper *pHelper, // Setup a compiler instance. CompilerInstance compiler; std::unique_ptr diagPrinter = - std::make_unique(w, &compiler.getDiagnosticOpts()); + llvm::make_unique(w, &compiler.getDiagnosticOpts()); SetupCompilerForRewrite(compiler, pHelper, pFileName, diagPrinter.get(), pRemap, pDefines); // Parse the source file. @@ -500,7 +500,7 @@ HRESULT DoSimpleReWrite(_In_ DxcLangExtensionsHelper *pHelper, // Setup a compiler instance. CompilerInstance compiler; std::unique_ptr diagPrinter = - std::make_unique(w, &compiler.getDiagnosticOpts()); + llvm::make_unique(w, &compiler.getDiagnosticOpts()); SetupCompilerForRewrite(compiler, pHelper, pFileName, diagPrinter.get(), pRemap, pDefines); // Parse the source file.