]> granicus.if.org Git - llvm/commitdiff
[llvm] Migrate llvm::make_unique to std::make_unique
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 15 Aug 2019 15:54:37 +0000 (15:54 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 15 Aug 2019 15:54:37 +0000 (15:54 +0000)
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369013 91177308-0d34-0410-b5e6-96231b3b80d8

430 files changed:
docs/ORCv2.rst
docs/tutorial/BuildingAJIT1.rst
docs/tutorial/BuildingAJIT2.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl02.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl05.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl06.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst
docs/tutorial/MyFirstLanguageFrontend/LangImpl09.rst
examples/ExceptionDemo/ExceptionDemo.cpp
examples/HowToUseJIT/HowToUseJIT.cpp
examples/HowToUseLLJIT/HowToUseLLJIT.cpp
examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp
examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
examples/Kaleidoscope/BuildingAJIT/Chapter5/toy.cpp
examples/Kaleidoscope/Chapter2/toy.cpp
examples/Kaleidoscope/Chapter3/toy.cpp
examples/Kaleidoscope/Chapter4/toy.cpp
examples/Kaleidoscope/Chapter5/toy.cpp
examples/Kaleidoscope/Chapter6/toy.cpp
examples/Kaleidoscope/Chapter7/toy.cpp
examples/Kaleidoscope/Chapter8/toy.cpp
examples/Kaleidoscope/Chapter9/toy.cpp
examples/LLJITExamples/ExampleModules.h
examples/ParallelJIT/ParallelJIT.cpp
examples/SpeculativeJIT/SpeculativeJIT.cpp
include/llvm/ADT/Any.h
include/llvm/Analysis/RegionInfoImpl.h
include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
include/llvm/CodeGen/LiveInterval.h
include/llvm/CodeGen/MachinePipeliner.h
include/llvm/CodeGen/PBQP/Math.h
include/llvm/CodeGen/TargetPassConfig.h
include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
include/llvm/DebugInfo/CodeView/TypeDeserializer.h
include/llvm/DebugInfo/DIContext.h
include/llvm/DebugInfo/PDB/Native/SymbolCache.h
include/llvm/DebugInfo/PDB/PDBSymbol.h
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
include/llvm/ExecutionEngine/Orc/Core.h
include/llvm/ExecutionEngine/Orc/LambdaResolver.h
include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
include/llvm/ExecutionEngine/Orc/LazyReexports.h
include/llvm/ExecutionEngine/Orc/Legacy.h
include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
include/llvm/ExecutionEngine/Orc/RPCUtils.h
include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
include/llvm/IR/Metadata.h
include/llvm/IR/ModuleSummaryIndex.h
include/llvm/IR/ModuleSummaryIndexYAML.h
include/llvm/IR/PassManagerInternal.h
include/llvm/LTO/Config.h
include/llvm/MCA/HardwareUnits/LSUnit.h
include/llvm/MCA/HardwareUnits/Scheduler.h
include/llvm/ProfileData/InstrProf.h
include/llvm/Support/Error.h
include/llvm/Support/GenericDomTree.h
include/llvm/Support/GenericDomTreeConstruction.h
include/llvm/Support/Registry.h
lib/Analysis/AssumptionCache.cpp
lib/Analysis/CallGraph.cpp
lib/Analysis/DependenceAnalysis.cpp
lib/Analysis/IndirectCallPromotionAnalysis.cpp
lib/Analysis/LazyBranchProbabilityInfo.cpp
lib/Analysis/LazyValueInfo.cpp
lib/Analysis/LegacyDivergenceAnalysis.cpp
lib/Analysis/LoopAccessAnalysis.cpp
lib/Analysis/LoopCacheAnalysis.cpp
lib/Analysis/MemorySSA.cpp
lib/Analysis/ModuleSummaryAnalysis.cpp
lib/Analysis/OptimizationRemarkEmitter.cpp
lib/Analysis/OrderedInstructions.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/Parser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/MetadataLoader.cpp
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/GCMetadata.cpp
lib/CodeGen/GlobalISel/CSEInfo.cpp
lib/CodeGen/GlobalISel/Combiner.cpp
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/CodeGen/GlobalISel/Legalizer.cpp
lib/CodeGen/GlobalISel/RegBankSelect.cpp
lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
lib/CodeGen/IfConversion.cpp
lib/CodeGen/InlineSpiller.cpp
lib/CodeGen/LLVMTargetMachine.cpp
lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp
lib/CodeGen/LiveDebugValues.cpp
lib/CodeGen/LiveDebugVariables.cpp
lib/CodeGen/MIRParser/MIRParser.cpp
lib/CodeGen/MachineBlockPlacement.cpp
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/MachineOptimizationRemarkEmitter.cpp
lib/CodeGen/MachineScheduler.cpp
lib/CodeGen/MacroFusion.cpp
lib/CodeGen/PseudoSourceValue.cpp
lib/CodeGen/RegAllocPBQP.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/TargetPassConfig.cpp
lib/DebugInfo/DWARF/DWARFContext.cpp
lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
lib/DebugInfo/DWARF/DWARFUnit.cpp
lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
lib/DebugInfo/DWARF/DWARFVerifier.cpp
lib/DebugInfo/MSF/MappedBlockStream.cpp
lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
lib/DebugInfo/PDB/DIA/DIASectionContrib.cpp
lib/DebugInfo/PDB/DIA/DIASession.cpp
lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
lib/DebugInfo/PDB/Native/NativeEnumInjectedSources.cpp
lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp
lib/DebugInfo/PDB/Native/NativeSession.cpp
lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
lib/DebugInfo/PDB/Native/NativeTypeFunctionSig.cpp
lib/DebugInfo/PDB/Native/PDBFile.cpp
lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
lib/DebugInfo/PDB/Native/TpiStream.cpp
lib/DebugInfo/PDB/Native/TpiStreamBuilder.cpp
lib/DebugInfo/PDB/PDBSymbolFunc.cpp
lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp
lib/DebugInfo/PDB/UDTLayout.cpp
lib/ExecutionEngine/ExecutionEngine.cpp
lib/ExecutionEngine/JITLink/JITLinkGeneric.h
lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp
lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp
lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
lib/ExecutionEngine/Orc/CompileUtils.cpp
lib/ExecutionEngine/Orc/ExecutionUtils.cpp
lib/ExecutionEngine/Orc/IndirectionUtils.cpp
lib/ExecutionEngine/Orc/LLJIT.cpp
lib/ExecutionEngine/Orc/Layer.cpp
lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
lib/ExecutionEngine/Orc/OrcCBindingsStack.h
lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
lib/FuzzMutate/FuzzerCLI.cpp
lib/IR/AsmWriter.cpp
lib/IR/Function.cpp
lib/IR/LLVMContextImpl.cpp
lib/IR/RemarkStreamer.cpp
lib/IR/Verifier.cpp
lib/LTO/Caching.cpp
lib/LTO/LTO.cpp
lib/LTO/LTOBackend.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/ThinLTOCodeGenerator.cpp
lib/MC/ELFObjectWriter.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCObjectStreamer.cpp
lib/MC/MCParser/DarwinAsmParser.cpp
lib/MC/MCStreamer.cpp
lib/MC/MachObjectWriter.cpp
lib/MC/WasmObjectWriter.cpp
lib/MC/WinCOFFObjectWriter.cpp
lib/MC/XCOFFObjectWriter.cpp
lib/MCA/Context.cpp
lib/MCA/HardwareUnits/ResourceManager.cpp
lib/MCA/HardwareUnits/Scheduler.cpp
lib/MCA/InstrBuilder.cpp
lib/MCA/Stages/EntryStage.cpp
lib/Object/ELFObjectFile.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/WasmObjectFile.cpp
lib/Object/XCOFFObjectFile.cpp
lib/ObjectYAML/ELFEmitter.cpp
lib/ObjectYAML/MinidumpYAML.cpp
lib/Option/ArgList.cpp
lib/ProfileData/Coverage/CoverageMappingReader.cpp
lib/ProfileData/GCOV.cpp
lib/ProfileData/InstrProfReader.cpp
lib/ProfileData/ProfileSummaryBuilder.cpp
lib/ProfileData/SampleProfReader.cpp
lib/Remarks/BitstreamRemarkSerializer.cpp
lib/Remarks/RemarkParser.cpp
lib/Remarks/RemarkSerializer.cpp
lib/Remarks/YAMLRemarkParser.cpp
lib/Remarks/YAMLRemarkSerializer.cpp
lib/Support/CodeGenCoverage.cpp
lib/Support/Error.cpp
lib/Support/FileCheck.cpp
lib/Support/FileOutputBuffer.cpp
lib/Support/JSON.cpp
lib/Support/SpecialCaseList.cpp
lib/Support/Timer.cpp
lib/Support/Unix/Path.inc
lib/Support/VirtualFileSystem.cpp
lib/Support/YAMLTraits.cpp
lib/Support/Z3Solver.cpp
lib/TableGen/Record.cpp
lib/TableGen/SetTheory.cpp
lib/TableGen/TGLexer.cpp
lib/TableGen/TGParser.cpp
lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
lib/Target/AArch64/AArch64Subtarget.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp
lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.h
lib/Target/AMDGPU/AMDGPULibFunc.cpp
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
lib/Target/AMDGPU/GCNIterativeScheduler.cpp
lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp
lib/Target/AMDGPU/SIInsertWaitcnts.cpp
lib/Target/AMDGPU/SIMachineFunctionInfo.h
lib/Target/AMDGPU/SIMachineScheduler.cpp
lib/Target/AMDGPU/SIMemoryLegalizer.cpp
lib/Target/AMDGPU/SIModeRegister.cpp
lib/Target/AMDGPU/SIPeepholeSDWA.cpp
lib/Target/ARC/ARCTargetMachine.cpp
lib/Target/ARM/ARMParallelDSP.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp
lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
lib/Target/AVR/AVRTargetMachine.cpp
lib/Target/AVR/AsmParser/AVRAsmParser.cpp
lib/Target/AVR/MCTargetDesc/AVRELFObjectWriter.cpp
lib/Target/BPF/AsmParser/BPFAsmParser.cpp
lib/Target/BPF/BPFTargetMachine.cpp
lib/Target/BPF/BTFDebug.cpp
lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp
lib/Target/Hexagon/HexagonSubtarget.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp
lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp
lib/Target/Lanai/MCTargetDesc/LanaiELFObjectWriter.cpp
lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
lib/Target/MSP430/MCTargetDesc/MSP430ELFObjectWriter.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/Mips/AsmParser/MipsAsmParser.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp
lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
lib/Target/RISCV/MCTargetDesc/RISCVELFObjectWriter.cpp
lib/Target/RISCV/RISCVTargetMachine.cpp
lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp
lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp
lib/Target/SystemZ/SystemZTargetMachine.cpp
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
lib/Target/X86/AsmParser/X86Operand.h
lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp
lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp
lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp
lib/Target/X86/X86CondBrFolding.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreTargetMachine.cpp
lib/Transforms/Coroutines/CoroCleanup.cpp
lib/Transforms/Coroutines/CoroEarly.cpp
lib/Transforms/Coroutines/CoroElide.cpp
lib/Transforms/IPO/FunctionImport.cpp
lib/Transforms/IPO/HotColdSplitting.cpp
lib/Transforms/IPO/Inliner.cpp
lib/Transforms/IPO/PartialInlining.cpp
lib/Transforms/IPO/SCCP.cpp
lib/Transforms/IPO/SampleProfile.cpp
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
lib/Transforms/IPO/WholeProgramDevirt.cpp
lib/Transforms/Instrumentation/CFGMST.h
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
lib/Transforms/Scalar/EarlyCSE.cpp
lib/Transforms/Scalar/GVNHoist.cpp
lib/Transforms/Scalar/LICM.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Scalar/NewGVN.cpp
lib/Transforms/Utils/CloneModule.cpp
lib/Transforms/Utils/Evaluator.cpp
lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/PredicateInfo.cpp
lib/Transforms/Utils/SymbolRewriter.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
lib/Transforms/Vectorize/SLPVectorizer.cpp
lib/WindowsManifest/WindowsManifestMerger.cpp
lib/XRay/FDRRecordProducer.cpp
tools/dsymutil/DwarfLinker.cpp
tools/dsymutil/DwarfStreamer.cpp
tools/dsymutil/MachODebugMapParser.cpp
tools/dsymutil/MachOUtils.cpp
tools/gold/gold-plugin.cpp
tools/llc/llc.cpp
tools/lli/lli.cpp
tools/llvm-cov/CodeCoverage.cpp
tools/llvm-cov/SourceCoverageView.cpp
tools/llvm-dis/llvm-dis.cpp
tools/llvm-elfabi/ELFObjHandler.cpp
tools/llvm-exegesis/lib/Analysis.cpp
tools/llvm-exegesis/lib/Assembler.cpp
tools/llvm-exegesis/lib/BenchmarkRunner.cpp
tools/llvm-exegesis/lib/BenchmarkRunner.h
tools/llvm-exegesis/lib/Target.cpp
tools/llvm-exegesis/lib/X86/Target.cpp
tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp
tools/llvm-jitlink/llvm-jitlink.cpp
tools/llvm-link/llvm-link.cpp
tools/llvm-lto/llvm-lto.cpp
tools/llvm-lto2/llvm-lto2.cpp
tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
tools/llvm-mc/llvm-mc.cpp
tools/llvm-mca/CodeRegion.cpp
tools/llvm-mca/llvm-mca.cpp
tools/llvm-objcopy/COFF/Reader.cpp
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
tools/llvm-objcopy/ELF/Object.cpp
tools/llvm-objcopy/ELF/Object.h
tools/llvm-objcopy/MachO/MachOReader.cpp
tools/llvm-objdump/MachODump.cpp
tools/llvm-opt-fuzzer/llvm-opt-fuzzer.cpp
tools/llvm-pdbutil/BytesOutputStyle.cpp
tools/llvm-pdbutil/DumpOutputStyle.cpp
tools/llvm-pdbutil/ExplainOutputStyle.cpp
tools/llvm-pdbutil/InputFile.cpp
tools/llvm-pdbutil/PrettyTypeDumper.cpp
tools/llvm-pdbutil/llvm-pdbutil.cpp
tools/llvm-profdata/llvm-profdata.cpp
tools/llvm-rc/ResourceScriptParser.cpp
tools/llvm-rc/ResourceScriptStmt.h
tools/llvm-rc/llvm-rc.cpp
tools/llvm-readobj/COFFDumper.cpp
tools/llvm-rtdyld/llvm-rtdyld.cpp
tools/llvm-stress/llvm-stress.cpp
tools/lto/lto.cpp
tools/obj2yaml/elf2yaml.cpp
tools/obj2yaml/macho2yaml.cpp
tools/obj2yaml/wasm2yaml.cpp
tools/opt/opt.cpp
tools/sancov/sancov.cpp
unittests/ADT/FunctionRefTest.cpp
unittests/ADT/IteratorTest.cpp
unittests/ADT/MakeUniqueTest.cpp
unittests/ADT/MapVectorTest.cpp
unittests/ADT/STLExtrasTest.cpp
unittests/Analysis/MemorySSATest.cpp
unittests/CodeGen/AArch64SelectionDAGTest.cpp
unittests/CodeGen/GlobalISel/CSETest.cpp
unittests/CodeGen/GlobalISel/GISelMITest.h
unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
unittests/CodeGen/MachineInstrTest.cpp
unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp
unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp
unittests/DebugInfo/DWARF/DwarfGenerator.cpp
unittests/DebugInfo/PDB/PDBApiTest.cpp
unittests/ExecutionEngine/ExecutionEngineTest.cpp
unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp
unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
unittests/ExecutionEngine/Orc/QueueChannel.h
unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
unittests/FuzzMutate/StrategiesTest.cpp
unittests/IR/CFGBuilder.cpp
unittests/IR/MetadataTest.cpp
unittests/IR/TimePassesTest.cpp
unittests/Linker/LinkModulesTest.cpp
unittests/MC/DwarfLineTables.cpp
unittests/ProfileData/CoverageMappingTest.cpp
unittests/ProfileData/InstrProfTest.cpp
unittests/Support/BinaryStreamTest.cpp
unittests/Support/Casting.cpp
unittests/Support/FileCheckTest.cpp
unittests/Support/Host.cpp
unittests/Support/TrigramIndexTest.cpp
unittests/Support/YAMLIOTest.cpp
unittests/Target/AArch64/InstSizes.cpp
unittests/Transforms/Utils/ValueMapperTest.cpp
unittests/Transforms/Vectorize/VPlanTestBase.h
unittests/XRay/FDRProducerConsumerTest.cpp
unittests/XRay/FDRRecordPrinterTest.cpp
utils/TableGen/AsmMatcherEmitter.cpp
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/CodeGenRegisters.cpp
utils/TableGen/CodeGenSchedule.cpp
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/DAGISelEmitter.cpp
utils/TableGen/FixedLenDecoderEmitter.cpp
utils/TableGen/GlobalISelEmitter.cpp
utils/TableGen/SearchableTableEmitter.cpp
utils/TableGen/X86DisassemblerTables.cpp
utils/TableGen/X86RecognizableInstr.cpp

index ba4534e6215f5888fbec410ce2646fe821099d5e..edb1695f4e3edbd531a106b661e5e3a1a65b9401 100644 (file)
@@ -174,7 +174,7 @@ checking omitted for brevity) as:
 
   ExecutionSession ES;
   RTDyldObjectLinkingLayer ObjLinkingLayer(
-      ES, []() { return llvm::make_unique<SectionMemoryManager>(); });
+      ES, []() { return std::make_unique<SectionMemoryManager>(); });
   CXXCompileLayer CXXLayer(ES, ObjLinkingLayer);
 
   // Create JITDylib "A" and add code to it using the CXX layer.
@@ -453,7 +453,7 @@ std::unique_ptr<LLVMContext>:
 
   .. code-block:: c++
 
-    ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+    ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
 
 ThreadSafeModules can be constructed from a pair of a std::unique_ptr<Module>
 and a ThreadSafeContext value. ThreadSafeContext values may be shared between
@@ -462,10 +462,10 @@ multiple ThreadSafeModules:
   .. code-block:: c++
 
     ThreadSafeModule TSM1(
-      llvm::make_unique<Module>("M1", *TSCtx.getContext()), TSCtx);
+      std::make_unique<Module>("M1", *TSCtx.getContext()), TSCtx);
 
     ThreadSafeModule TSM2(
-      llvm::make_unique<Module>("M2", *TSCtx.getContext()), TSCtx);
+      std::make_unique<Module>("M2", *TSCtx.getContext()), TSCtx);
 
 Before using a ThreadSafeContext, clients should ensure that either the context
 is only accessible on the current thread, or that the context is locked. In the
@@ -476,7 +476,7 @@ or creating any Modules attached to it. E.g.
 
   .. code-block:: c++
 
-    ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+    ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
 
     ThreadPool TP(NumThreads);
     JITStack J;
@@ -519,8 +519,8 @@ constructs a new ThreadSafeContext value from a std::unique_ptr<LLVMContext>:
     // Maximize concurrency opportunities by loading every module on a
     // separate context.
     for (const auto &IRPath : IRPaths) {
-      auto Ctx = llvm::make_unique<LLVMContext>();
-      auto M = llvm::make_unique<LLVMContext>("M", *Ctx);
+      auto Ctx = std::make_unique<LLVMContext>();
+      auto M = std::make_unique<LLVMContext>("M", *Ctx);
       CompileLayer.add(ES.getMainJITDylib(),
                        ThreadSafeModule(std::move(M), std::move(Ctx)));
     }
@@ -531,7 +531,7 @@ all modules on the same context:
   .. code-block:: c++
 
     // Save memory by using one context for all Modules:
-    ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+    ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
     for (const auto &IRPath : IRPaths) {
       ThreadSafeModule TSM(parsePath(IRPath, *TSCtx.getContext()), TSCtx);
       CompileLayer.add(ES.getMainJITDylib(), ThreadSafeModule(std::move(TSM));
index fcb755bd286f18bc8e5d3d30c2f683a21ad3f8ea..00ad94aa08ac570f17e9bcbf09750a814b52a522 100644 (file)
@@ -138,10 +138,10 @@ usual include guards and #includes [2]_, we get to the definition of our class:
   public:
     KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
         : ObjectLayer(ES,
-                      []() { return llvm::make_unique<SectionMemoryManager>(); }),
+                      []() { return std::make_unique<SectionMemoryManager>(); }),
           CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
           DL(std::move(DL)), Mangle(ES, this->DL),
-          Ctx(llvm::make_unique<LLVMContext>()) {
+          Ctx(std::make_unique<LLVMContext>()) {
       ES.getMainJITDylib().setGenerator(
           cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
     }
@@ -195,7 +195,7 @@ REPL process as well. We do this by attaching a
     if (!DL)
       return DL.takeError();
 
-    return llvm::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
+    return std::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
   }
 
   const DataLayout &getDataLayout() const { return DL; }
index 7d25ccaba0aa1ff24f2df272f8f854d864935ab5..1f818d945664953daa4cc84ae63b31ac5e5a356a 100644 (file)
@@ -71,11 +71,11 @@ apply to each Module that is added via addModule:
 
     KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
         : ObjectLayer(ES,
-                      []() { return llvm::make_unique<SectionMemoryManager>(); }),
+                      []() { return std::make_unique<SectionMemoryManager>(); }),
           CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
           TransformLayer(ES, CompileLayer, optimizeModule),
           DL(std::move(DL)), Mangle(ES, this->DL),
-          Ctx(llvm::make_unique<LLVMContext>()) {
+          Ctx(std::make_unique<LLVMContext>()) {
       ES.getMainJITDylib().setGenerator(
           cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(DL)));
     }
@@ -102,7 +102,7 @@ Next we need to update our addModule method to replace the call to
   static Expected<ThreadSafeModule>
   optimizeModule(ThreadSafeModule M, const MaterializationResponsibility &R) {
     // Create a function pass manager.
-    auto FPM = llvm::make_unique<legacy::FunctionPassManager>(M.get());
+    auto FPM = std::make_unique<legacy::FunctionPassManager>(M.get());
 
     // Add some optimizations.
     FPM->add(createInstructionCombiningPass());
@@ -213,7 +213,7 @@ class:
 .. code-block:: c++
 
   Error IRLayer::add(JITDylib &JD, ThreadSafeModule TSM, VModuleKey K) {
-    return JD.define(llvm::make_unique<BasicIRLayerMaterializationUnit>(
+    return JD.define(std::make_unique<BasicIRLayerMaterializationUnit>(
         *this, std::move(K), std::move(TSM)));
   }
 
index 3a2680099dfd27123f36205cf3af95729a0b7aa3..dec9f36ed5653baa0886d42be7f7dc99da46f050 100644 (file)
@@ -155,8 +155,8 @@ be generated with calls like this:
 
 .. code-block:: c++
 
-      auto LHS = llvm::make_unique<VariableExprAST>("x");
-      auto RHS = llvm::make_unique<VariableExprAST>("y");
+      auto LHS = std::make_unique<VariableExprAST>("x");
+      auto RHS = std::make_unique<VariableExprAST>("y");
       auto Result = std::make_unique<BinaryExprAST>('+', std::move(LHS),
                                                     std::move(RHS));
 
@@ -210,7 +210,7 @@ which parses that production. For numeric literals, we have:
 
     /// numberexpr ::= number
     static std::unique_ptr<ExprAST> ParseNumberExpr() {
-      auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+      auto Result = std::make_unique<NumberExprAST>(NumVal);
       getNextToken(); // consume the number
       return std::move(Result);
     }
@@ -276,7 +276,7 @@ function calls:
       getNextToken();  // eat identifier.
 
       if (CurTok != '(') // Simple variable ref.
-        return llvm::make_unique<VariableExprAST>(IdName);
+        return std::make_unique<VariableExprAST>(IdName);
 
       // Call.
       getNextToken();  // eat (
@@ -300,7 +300,7 @@ function calls:
       // Eat the ')'.
       getNextToken();
 
-      return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+      return std::make_unique<CallExprAST>(IdName, std::move(Args));
     }
 
 This routine follows the same style as the other routines. (It expects
@@ -503,7 +503,7 @@ then continue parsing:
         }
 
         // Merge LHS/RHS.
-        LHS = llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
+        LHS = std::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
                                                std::move(RHS));
       }  // loop around to the top of the while loop.
     }
@@ -533,7 +533,7 @@ above two blocks duplicated for context):
             return nullptr;
         }
         // Merge LHS/RHS.
-        LHS = llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
+        LHS = std::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
                                                std::move(RHS));
       }  // loop around to the top of the while loop.
     }
@@ -593,7 +593,7 @@ expressions):
       // success.
       getNextToken();  // eat ')'.
 
-      return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+      return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
     }
 
 Given this, a function definition is very simple, just a prototype plus
@@ -608,7 +608,7 @@ an expression to implement the body:
       if (!Proto) return nullptr;
 
       if (auto E = ParseExpression())
-        return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+        return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
       return nullptr;
     }
 
@@ -634,8 +634,8 @@ nullary (zero argument) functions for them:
     static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
       if (auto E = ParseExpression()) {
         // Make an anonymous proto.
-        auto Proto = llvm::make_unique<PrototypeAST>("", std::vector<std::string>());
-        return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+        auto Proto = std::make_unique<PrototypeAST>("", std::vector<std::string>());
+        return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
       }
       return nullptr;
     }
index 773ce55eca0362cf205d517e7a4c37527f0c6ce2..f5a46a68fcfb6e5ac6ab28e22c12426985ed1512 100644 (file)
@@ -141,10 +141,10 @@ for us:
 
     void InitializeModuleAndPassManager(void) {
       // Open a new module.
-      TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+      TheModule = std::make_unique<Module>("my cool jit", TheContext);
 
       // Create a new pass manager attached to it.
-      TheFPM = llvm::make_unique<FunctionPassManager>(TheModule.get());
+      TheFPM = std::make_unique<FunctionPassManager>(TheModule.get());
 
       // Do simple "peephole" optimizations and bit-twiddling optzns.
       TheFPM->add(createInstructionCombiningPass());
@@ -259,7 +259,7 @@ adding a global variable ``TheJIT``, and initializing it in
       fprintf(stderr, "ready> ");
       getNextToken();
 
-      TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+      TheJIT = std::make_unique<KaleidoscopeJIT>();
 
       // Run the main "interpreter loop" now.
       MainLoop();
@@ -273,11 +273,11 @@ We also need to setup the data layout for the JIT:
 
     void InitializeModuleAndPassManager(void) {
       // Open a new module.
-      TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+      TheModule = std::make_unique<Module>("my cool jit", TheContext);
       TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
       // Create a new pass manager attached to it.
-      TheFPM = llvm::make_unique<FunctionPassManager>(TheModule.get());
+      TheFPM = std::make_unique<FunctionPassManager>(TheModule.get());
       ...
 
 The KaleidoscopeJIT class is a simple JIT built specifically for these
index 685e5fb69e444bbc88988df9151f4a9700beed19..0e61c07659de9e10e53773de5dae76862b8e8a84 100644 (file)
@@ -146,7 +146,7 @@ First we define a new parsing function:
       if (!Else)
         return nullptr;
 
-      return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+      return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                           std::move(Else));
     }
 
@@ -560,7 +560,7 @@ value to null in the AST node:
       if (!Body)
         return nullptr;
 
-      return llvm::make_unique<ForExprAST>(IdName, std::move(Start),
+      return std::make_unique<ForExprAST>(IdName, std::move(Start),
                                            std::move(End), std::move(Step),
                                            std::move(Body));
     }
index 911a7dc92bcab675539c3c17d1bf6e3e94e54edd..a05ed0b1a3b110e9fda421c3de631ee8da84bec2 100644 (file)
@@ -220,7 +220,7 @@ user-defined operator, we need to parse it:
       if (Kind && ArgNames.size() != Kind)
         return LogErrorP("Invalid number of operands for operator");
 
-      return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames), Kind != 0,
+      return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames), Kind != 0,
                                              BinaryPrecedence);
     }
 
@@ -348,7 +348,7 @@ simple: we'll add a new function to do it:
       int Opc = CurTok;
       getNextToken();
       if (auto Operand = ParseUnary())
-        return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+        return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
       return nullptr;
     }
 
index 8013dec326afde99495642352f860e2d61805635..218e4419135d6271fe0d41aa27f3c75e6f529950 100644 (file)
@@ -780,7 +780,7 @@ AST node:
       if (!Body)
         return nullptr;
 
-      return llvm::make_unique<VarExprAST>(std::move(VarNames),
+      return std::make_unique<VarExprAST>(std::move(VarNames),
                                            std::move(Body));
     }
 
index 1dcc0a8aa9058a6a64420eb22f8174adcebce5ce..87584cdb394e1425166b7d859c2ca156b15ba466 100644 (file)
@@ -77,8 +77,8 @@ statement be our "main":
 
 .. code-block:: udiff
 
-  -    auto Proto = llvm::make_unique<PrototypeAST>("", std::vector<std::string>());
-  +    auto Proto = llvm::make_unique<PrototypeAST>("main", std::vector<std::string>());
+  -    auto Proto = std::make_unique<PrototypeAST>("", std::vector<std::string>());
+  +    auto Proto = std::make_unique<PrototypeAST>("main", std::vector<std::string>());
 
 just with the simple change of giving it a name.
 
@@ -325,7 +325,7 @@ that we pass down through when we create a new expression:
 
 .. code-block:: c++
 
-   LHS = llvm::make_unique<BinaryExprAST>(BinLoc, BinOp, std::move(LHS),
+   LHS = std::make_unique<BinaryExprAST>(BinLoc, BinOp, std::move(LHS),
                                           std::move(RHS));
 
 giving us locations for each of our expressions and variables.
index 91c8617f26d206bab1db693d7f31525207aa8cbd..0ecb527f4ec051ef1354a949636fa766f65e7cac 100644 (file)
@@ -1904,7 +1904,7 @@ int main(int argc, char *argv[]) {
 
   // Make the module, which holds all the code.
   std::unique_ptr<llvm::Module> Owner =
-      llvm::make_unique<llvm::Module>("my cool jit", Context);
+      std::make_unique<llvm::Module>("my cool jit", Context);
   llvm::Module *module = Owner.get();
 
   std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new llvm::SectionMemoryManager());
index 30354d4cae64866e17f9722a781dc30ed456ae1a..c7b3b9a7457c2146785268124ea3184faba7932a 100644 (file)
@@ -63,7 +63,7 @@ int main() {
   LLVMContext Context;
   
   // Create some module to put our function into it.
-  std::unique_ptr<Module> Owner = make_unique<Module>("test", Context);
+  std::unique_ptr<Module> Owner = std::make_unique<Module>("test", Context);
   Module *M = Owner.get();
 
   // Create the add1 function entry and insert this entry into module M.  The
index 0b77ff08de0371d6af06f183ee31a25b245d93dc..4383b5a1eeb0b8cdc02bebad61ca7261d4198dd4 100644 (file)
@@ -20,8 +20,8 @@ using namespace llvm::orc;
 ExitOnError ExitOnErr;
 
 ThreadSafeModule createDemoModule() {
-  auto Context = llvm::make_unique<LLVMContext>();
-  auto M = make_unique<Module>("test", *Context);
+  auto Context = std::make_unique<LLVMContext>();
+  auto M = std::make_unique<Module>("test", *Context);
 
   // Create the add1 function entry and insert this entry into module M.  The
   // function will have a return type of "int" and take an argument of "int".
index 8b79f2eefd960037a70231815ae88e6423ad3836..a7fa3afc470cd73f5353e521c6dee6e21327bfb3 100644 (file)
@@ -42,10 +42,10 @@ private:
 public:
   KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
       : ObjectLayer(ES,
-                    []() { return llvm::make_unique<SectionMemoryManager>(); }),
+                    []() { return std::make_unique<SectionMemoryManager>(); }),
         CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
         DL(std::move(DL)), Mangle(ES, this->DL),
-        Ctx(llvm::make_unique<LLVMContext>()) {
+        Ctx(std::make_unique<LLVMContext>()) {
     ES.getMainJITDylib().addGenerator(
         cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
             DL.getGlobalPrefix())));
@@ -61,7 +61,7 @@ public:
     if (!DL)
       return DL.takeError();
 
-    return llvm::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
+    return std::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
   }
 
   const DataLayout &getDataLayout() const { return DL; }
index 8cbd5d6f2f7737fb2f1b109e973b31e6f7292129..b4605bae4ed9d075c53fc47e273d52fe46d652b7 100644 (file)
@@ -329,7 +329,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -356,7 +356,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -380,7 +380,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -409,7 +409,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -455,7 +455,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -504,7 +504,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -545,7 +545,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -582,7 +582,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -659,7 +659,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -671,7 +671,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -679,9 +679,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr(unsigned ExprCount) {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>
+    auto Proto = std::make_unique<PrototypeAST>
         (("__anon_expr" + Twine(ExprCount)).str(), std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1103,11 +1103,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", *TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", *TheContext);
   TheModule->setDataLayout(TheJIT->getDataLayout());
 
   // Create a new builder for the module.
-  Builder = llvm::make_unique<IRBuilder<>>(*TheContext);
+  Builder = std::make_unique<IRBuilder<>>(*TheContext);
 }
 
 static void HandleDefinition() {
index bf89d3b759701aefc15a448484321d153ee366f5..e9999efd37a5176847188c464e3adcac8e0c893c 100644 (file)
@@ -48,11 +48,11 @@ private:
 public:
   KaleidoscopeJIT(JITTargetMachineBuilder JTMB, DataLayout DL)
       : ObjectLayer(ES,
-                    []() { return llvm::make_unique<SectionMemoryManager>(); }),
+                    []() { return std::make_unique<SectionMemoryManager>(); }),
         CompileLayer(ES, ObjectLayer, ConcurrentIRCompiler(std::move(JTMB))),
         OptimizeLayer(ES, CompileLayer, optimizeModule),
         DL(std::move(DL)), Mangle(ES, this->DL),
-        Ctx(llvm::make_unique<LLVMContext>()) {
+        Ctx(std::make_unique<LLVMContext>()) {
     ES.getMainJITDylib().addGenerator(
         cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
             DL.getGlobalPrefix())));
@@ -72,7 +72,7 @@ public:
     if (!DL)
       return DL.takeError();
 
-    return llvm::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
+    return std::make_unique<KaleidoscopeJIT>(std::move(*JTMB), std::move(*DL));
   }
 
   Error addModule(std::unique_ptr<Module> M) {
@@ -89,7 +89,7 @@ private:
   optimizeModule(ThreadSafeModule TSM, const MaterializationResponsibility &R) {
     TSM.withModuleDo([](Module &M) {
       // Create a function pass manager.
-      auto FPM = llvm::make_unique<legacy::FunctionPassManager>(&M);
+      auto FPM = std::make_unique<legacy::FunctionPassManager>(&M);
 
       // Add some optimizations.
       FPM->add(createInstructionCombiningPass());
index e7c3624aa04d575ced97dfaa0233eba6c6d6301b..743d50829dc3bcf5815929aa94e4d6b90205c573 100644 (file)
@@ -329,7 +329,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -356,7 +356,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -380,7 +380,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -409,7 +409,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -455,7 +455,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -504,7 +504,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -545,7 +545,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -582,7 +582,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -659,7 +659,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -671,7 +671,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -679,9 +679,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr(unsigned ExprCount) {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>(
+    auto Proto = std::make_unique<PrototypeAST>(
         ("__anon_expr" + Twine(ExprCount)).str(), std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1103,11 +1103,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", *TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", *TheContext);
   TheModule->setDataLayout(TheJIT->getDataLayout());
 
   // Create a new builder for the module.
-  Builder = llvm::make_unique<IRBuilder<>>(*TheContext);
+  Builder = std::make_unique<IRBuilder<>>(*TheContext);
 }
 
 static void HandleDefinition() {
index 35104f926d4f9903387eaf404068a335cd336cbe..add38fdb81938e44ca09ce60729a1412b77fea9d 100644 (file)
@@ -131,7 +131,7 @@ public:
 private:
   std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) {
     // Create a function pass manager.
-    auto FPM = llvm::make_unique<legacy::FunctionPassManager>(M.get());
+    auto FPM = std::make_unique<legacy::FunctionPassManager>(M.get());
 
     // Add some optimizations.
     FPM->add(createInstructionCombiningPass());
index 2471344c6d65fdd3aaba7211e50a94dc892f94fa..e9505033106e70a4b7aa6510c263410ef392b4db 100644 (file)
@@ -329,7 +329,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -356,7 +356,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -380,7 +380,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -409,7 +409,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -455,7 +455,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -504,7 +504,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -545,7 +545,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -582,7 +582,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -659,7 +659,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -671,7 +671,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -679,9 +679,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1102,7 +1102,7 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 }
 
@@ -1222,7 +1222,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModule();
 
index ee5225672fc4200470f8f683d6c20c426a017561..dd6304b7a78c86e3d45b83b7f4e5692a44ff9866 100644 (file)
@@ -207,7 +207,7 @@ private:
 
   std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) {
     // Create a function pass manager.
-    auto FPM = llvm::make_unique<legacy::FunctionPassManager>(M.get());
+    auto FPM = std::make_unique<legacy::FunctionPassManager>(M.get());
 
     // Add some optimizations.
     FPM->add(createInstructionCombiningPass());
index ed8ae31ba0fd4dfa3e1e894960a6d0b2625dfff2..bfd57e621cdaaf80670e200a524c095c249f66b7 100644 (file)
@@ -314,7 +314,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -341,7 +341,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -365,7 +365,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -394,7 +394,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -440,7 +440,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -489,7 +489,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -530,7 +530,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -567,7 +567,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -644,7 +644,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -656,7 +656,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -664,9 +664,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1095,7 +1095,7 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 }
 
@@ -1114,7 +1114,7 @@ irgenAndTakeOwnership(FunctionAST &FnAST, const std::string &Suffix) {
 static void HandleDefinition() {
   if (auto FnAST = ParseDefinition()) {
     FunctionProtos[FnAST->getProto().getName()] =
-      llvm::make_unique<PrototypeAST>(FnAST->getProto());
+      std::make_unique<PrototypeAST>(FnAST->getProto());
     ExitOnErr(TheJIT->addFunctionAST(std::move(FnAST)));
   } else {
     // Skip token for error recovery.
@@ -1140,7 +1140,7 @@ static void HandleTopLevelExpression() {
   // Evaluate a top-level expression into an anonymous function.
   if (auto FnAST = ParseTopLevelExpr()) {
     FunctionProtos[FnAST->getName()] =
-      llvm::make_unique<PrototypeAST>(FnAST->getProto());
+      std::make_unique<PrototypeAST>(FnAST->getProto());
     if (FnAST->codegen()) {
       // JIT the module containing the anonymous expression, keeping a handle so
       // we can free it later.
@@ -1227,7 +1227,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModule();
 
index 5cc64da68cc3e9243f66ef98336efc4cc8b3fe13..1d9c98a9d72ad0ce2f28300710ff4e09d0b0ab0e 100644 (file)
@@ -224,7 +224,7 @@ private:
 
   std::unique_ptr<Module> optimizeModule(std::unique_ptr<Module> M) {
     // Create a function pass manager.
-    auto FPM = llvm::make_unique<legacy::FunctionPassManager>(M.get());
+    auto FPM = std::make_unique<legacy::FunctionPassManager>(M.get());
 
     // Add some optimizations.
     FPM->add(createInstructionCombiningPass());
index 415cc7512779f7598fab108eda9e9ac1de9cc47a..eff61fb954df4d4f0401b1b6bf884f8b6a039e1c 100644 (file)
@@ -331,7 +331,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -358,7 +358,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -382,7 +382,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -411,7 +411,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -457,7 +457,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -506,7 +506,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -547,7 +547,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -584,7 +584,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -661,7 +661,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -673,7 +673,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -684,12 +684,12 @@ static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
     auto PEArgs = std::vector<std::unique_ptr<ExprAST>>();
     PEArgs.push_back(std::move(E));
     auto PrintExpr =
-      llvm::make_unique<CallExprAST>("printExprResult", std::move(PEArgs));
+      std::make_unique<CallExprAST>("printExprResult", std::move(PEArgs));
 
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto),
+    return std::make_unique<FunctionAST>(std::move(Proto),
                                           std::move(PrintExpr));
   }
   return nullptr;
@@ -1119,7 +1119,7 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 }
 
@@ -1138,7 +1138,7 @@ irgenAndTakeOwnership(FunctionAST &FnAST, const std::string &Suffix) {
 static void HandleDefinition() {
   if (auto FnAST = ParseDefinition()) {
     FunctionProtos[FnAST->getProto().getName()] =
-      llvm::make_unique<PrototypeAST>(FnAST->getProto());
+      std::make_unique<PrototypeAST>(FnAST->getProto());
     ExitOnErr(TheJIT->addFunctionAST(std::move(FnAST)));
   } else {
     // Skip token for error recovery.
@@ -1164,7 +1164,7 @@ static void HandleTopLevelExpression() {
   // Evaluate a top-level expression into an anonymous function.
   if (auto FnAST = ParseTopLevelExpr()) {
     FunctionProtos[FnAST->getName()] =
-      llvm::make_unique<PrototypeAST>(FnAST->getProto());
+      std::make_unique<PrototypeAST>(FnAST->getProto());
     if (FnAST->codegen()) {
       // JIT the module containing the anonymous expression, keeping a handle so
       // we can free it later.
@@ -1253,7 +1253,7 @@ std::unique_ptr<FDRPCChannel> connect() {
     exit(1);
   }
 
-  return llvm::make_unique<FDRPCChannel>(sockfd, sockfd);
+  return std::make_unique<FDRPCChannel>(sockfd, sockfd);
 }
 
 //===----------------------------------------------------------------------===//
@@ -1281,11 +1281,11 @@ int main(int argc, char *argv[]) {
   ExecutionSession ES;
   auto TCPChannel = connect();
   auto Remote = ExitOnErr(MyRemote::Create(*TCPChannel, ES));
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>(ES, *Remote);
+  TheJIT = std::make_unique<KaleidoscopeJIT>(ES, *Remote);
 
   // Automatically inject a definition for 'printExprResult'.
   FunctionProtos["printExprResult"] =
-    llvm::make_unique<PrototypeAST>("printExprResult",
+    std::make_unique<PrototypeAST>("printExprResult",
                                     std::vector<std::string>({"Val"}));
 
   // Prime the first token.
index 4dc917e3f06f3293bac74f00c35913c877e3c9b2..59432fb3de8f6bbc8e2bac8ef4b804bafdbb2b28 100644 (file)
@@ -197,7 +197,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -224,7 +224,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -248,7 +248,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// primary
@@ -300,7 +300,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
     }
 
     // Merge LHS/RHS.
-    LHS = llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
+    LHS = std::make_unique<BinaryExprAST>(BinOp, std::move(LHS),
                                            std::move(RHS));
   }
 }
@@ -337,7 +337,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   // success.
   getNextToken(); // eat ')'.
 
-  return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+  return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
 }
 
 /// definition ::= 'def' prototype expression
@@ -348,7 +348,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -356,9 +356,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
index 8aad3f4d7bec35bde8dbd24f0892aeddf9e696e8..f7b2d988fd1e95a859caf9a061f08156465dc008 100644 (file)
@@ -223,7 +223,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -250,7 +250,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -274,7 +274,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// primary
@@ -327,7 +327,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -363,7 +363,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   // success.
   getNextToken(); // eat ')'.
 
-  return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+  return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
 }
 
 /// definition ::= 'def' prototype expression
@@ -374,7 +374,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -382,9 +382,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -598,7 +598,7 @@ int main() {
   getNextToken();
 
   // Make the module, which holds all the code.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
 
   // Run the main "interpreter loop" now.
   MainLoop();
index f8000c41a6fc1241385bfdd9551f6faa8a570537..3c17a01885378fb62b7f0982639d86777d9c4c64 100644 (file)
@@ -233,7 +233,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -260,7 +260,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -284,7 +284,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// primary
@@ -337,7 +337,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -373,7 +373,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   // success.
   getNextToken(); // eat ')'.
 
-  return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+  return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
 }
 
 /// definition ::= 'def' prototype expression
@@ -384,7 +384,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -392,9 +392,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -550,11 +550,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModuleAndPassManager() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
   // Create a new pass manager attached to it.
-  TheFPM = llvm::make_unique<legacy::FunctionPassManager>(TheModule.get());
+  TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
 
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   TheFPM->add(createInstructionCombiningPass());
@@ -689,7 +689,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModuleAndPassManager();
 
index 534c8e529e4ebc36a284130739492021a6d43281..3eeb1c14a36eadde0af49d2911970fbd22092668 100644 (file)
@@ -278,7 +278,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -305,7 +305,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -329,7 +329,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -358,7 +358,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -404,7 +404,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -464,7 +464,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -500,7 +500,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   // success.
   getNextToken(); // eat ')'.
 
-  return llvm::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
+  return std::make_unique<PrototypeAST>(FnName, std::move(ArgNames));
 }
 
 /// definition ::= 'def' prototype expression
@@ -511,7 +511,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -519,9 +519,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -824,11 +824,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModuleAndPassManager() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
   // Create a new pass manager attached to it.
-  TheFPM = llvm::make_unique<legacy::FunctionPassManager>(TheModule.get());
+  TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
 
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   TheFPM->add(createInstructionCombiningPass());
@@ -963,7 +963,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModuleAndPassManager();
 
index 4b58117bd4a6ecb55a1f805e38c6e09e624119e1..5b3dd5a6c4e3ee28415a6960a2cede4ba375974e 100644 (file)
@@ -312,7 +312,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -339,7 +339,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -363,7 +363,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -392,7 +392,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -438,7 +438,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -477,7 +477,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -514,7 +514,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -591,7 +591,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -603,7 +603,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -611,9 +611,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -943,11 +943,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModuleAndPassManager() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
   // Create a new pass manager attached to it.
-  TheFPM = llvm::make_unique<legacy::FunctionPassManager>(TheModule.get());
+  TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
 
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   TheFPM->add(createInstructionCombiningPass());
@@ -1082,7 +1082,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModuleAndPassManager();
 
index 41c27d06d477050bbd97a77345f09d63fbc5d4bb..c42431a8ba1e8651a6ec53efd7dc2eeb2884b747 100644 (file)
@@ -334,7 +334,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -361,7 +361,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -385,7 +385,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -414,7 +414,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -460,7 +460,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -509,7 +509,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -550,7 +550,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -587,7 +587,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -664,7 +664,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -676,7 +676,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -684,9 +684,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1111,11 +1111,11 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModuleAndPassManager() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 
   // Create a new pass manager attached to it.
-  TheFPM = llvm::make_unique<legacy::FunctionPassManager>(TheModule.get());
+  TheFPM = std::make_unique<legacy::FunctionPassManager>(TheModule.get());
 
   // Promote allocas to registers.
   TheFPM->add(createPromoteMemoryToRegisterPass());
@@ -1253,7 +1253,7 @@ int main() {
   fprintf(stderr, "ready> ");
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModuleAndPassManager();
 
index c5628cf2154630f1b8e5fad4849b2e520402f6ae..8c46e4466588a432d96aae51837af229ececc9a1 100644 (file)
@@ -335,7 +335,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -362,7 +362,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(IdName);
+    return std::make_unique<VariableExprAST>(IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -386,7 +386,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -415,7 +415,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -461,7 +461,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -510,7 +510,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -551,7 +551,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -588,7 +588,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
 
     // Merge LHS/RHS.
     LHS =
-        llvm::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
+        std::make_unique<BinaryExprAST>(BinOp, std::move(LHS), std::move(RHS));
   }
 }
 
@@ -665,7 +665,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -677,7 +677,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -685,9 +685,9 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
 static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>("__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>("__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1107,7 +1107,7 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModuleAndPassManager() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
 }
 
 static void HandleDefinition() {
index 19bac1a8bc7021c89241b983ead61ea467c7ac9d..21c8993e1a064773b8d091ac4193ae8892bf3cd4 100644 (file)
@@ -442,7 +442,7 @@ static std::unique_ptr<ExprAST> ParseExpression();
 
 /// numberexpr ::= number
 static std::unique_ptr<ExprAST> ParseNumberExpr() {
-  auto Result = llvm::make_unique<NumberExprAST>(NumVal);
+  auto Result = std::make_unique<NumberExprAST>(NumVal);
   getNextToken(); // consume the number
   return std::move(Result);
 }
@@ -471,7 +471,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   getNextToken(); // eat identifier.
 
   if (CurTok != '(') // Simple variable ref.
-    return llvm::make_unique<VariableExprAST>(LitLoc, IdName);
+    return std::make_unique<VariableExprAST>(LitLoc, IdName);
 
   // Call.
   getNextToken(); // eat (
@@ -495,7 +495,7 @@ static std::unique_ptr<ExprAST> ParseIdentifierExpr() {
   // Eat the ')'.
   getNextToken();
 
-  return llvm::make_unique<CallExprAST>(LitLoc, IdName, std::move(Args));
+  return std::make_unique<CallExprAST>(LitLoc, IdName, std::move(Args));
 }
 
 /// ifexpr ::= 'if' expression 'then' expression 'else' expression
@@ -526,7 +526,7 @@ static std::unique_ptr<ExprAST> ParseIfExpr() {
   if (!Else)
     return nullptr;
 
-  return llvm::make_unique<IfExprAST>(IfLoc, std::move(Cond), std::move(Then),
+  return std::make_unique<IfExprAST>(IfLoc, std::move(Cond), std::move(Then),
                                       std::move(Else));
 }
 
@@ -572,7 +572,7 @@ static std::unique_ptr<ExprAST> ParseForExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
+  return std::make_unique<ForExprAST>(IdName, std::move(Start), std::move(End),
                                        std::move(Step), std::move(Body));
 }
 
@@ -621,7 +621,7 @@ static std::unique_ptr<ExprAST> ParseVarExpr() {
   if (!Body)
     return nullptr;
 
-  return llvm::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
+  return std::make_unique<VarExprAST>(std::move(VarNames), std::move(Body));
 }
 
 /// primary
@@ -662,7 +662,7 @@ static std::unique_ptr<ExprAST> ParseUnary() {
   int Opc = CurTok;
   getNextToken();
   if (auto Operand = ParseUnary())
-    return llvm::make_unique<UnaryExprAST>(Opc, std::move(Operand));
+    return std::make_unique<UnaryExprAST>(Opc, std::move(Operand));
   return nullptr;
 }
 
@@ -699,7 +699,7 @@ static std::unique_ptr<ExprAST> ParseBinOpRHS(int ExprPrec,
     }
 
     // Merge LHS/RHS.
-    LHS = llvm::make_unique<BinaryExprAST>(BinLoc, BinOp, std::move(LHS),
+    LHS = std::make_unique<BinaryExprAST>(BinLoc, BinOp, std::move(LHS),
                                            std::move(RHS));
   }
 }
@@ -779,7 +779,7 @@ static std::unique_ptr<PrototypeAST> ParsePrototype() {
   if (Kind && ArgNames.size() != Kind)
     return LogErrorP("Invalid number of operands for operator");
 
-  return llvm::make_unique<PrototypeAST>(FnLoc, FnName, ArgNames, Kind != 0,
+  return std::make_unique<PrototypeAST>(FnLoc, FnName, ArgNames, Kind != 0,
                                          BinaryPrecedence);
 }
 
@@ -791,7 +791,7 @@ static std::unique_ptr<FunctionAST> ParseDefinition() {
     return nullptr;
 
   if (auto E = ParseExpression())
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   return nullptr;
 }
 
@@ -800,9 +800,9 @@ static std::unique_ptr<FunctionAST> ParseTopLevelExpr() {
   SourceLocation FnLoc = CurLoc;
   if (auto E = ParseExpression()) {
     // Make an anonymous proto.
-    auto Proto = llvm::make_unique<PrototypeAST>(FnLoc, "__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>(FnLoc, "__anon_expr",
                                                  std::vector<std::string>());
-    return llvm::make_unique<FunctionAST>(std::move(Proto), std::move(E));
+    return std::make_unique<FunctionAST>(std::move(Proto), std::move(E));
   }
   return nullptr;
 }
@@ -1314,7 +1314,7 @@ Function *FunctionAST::codegen() {
 
 static void InitializeModule() {
   // Open a new module.
-  TheModule = llvm::make_unique<Module>("my cool jit", TheContext);
+  TheModule = std::make_unique<Module>("my cool jit", TheContext);
   TheModule->setDataLayout(TheJIT->getTargetMachine().createDataLayout());
 }
 
@@ -1416,7 +1416,7 @@ int main() {
   // Prime the first token.
   getNextToken();
 
-  TheJIT = llvm::make_unique<KaleidoscopeJIT>();
+  TheJIT = std::make_unique<KaleidoscopeJIT>();
 
   InitializeModule();
 
@@ -1429,7 +1429,7 @@ int main() {
     TheModule->addModuleFlag(llvm::Module::Warning, "Dwarf Version", 2);
 
   // Construct the DIBuilder, we do this here because we need the module.
-  DBuilder = llvm::make_unique<DIBuilder>(*TheModule);
+  DBuilder = std::make_unique<DIBuilder>(*TheModule);
 
   // Create the compile unit for the module.
   // Currently down as "fib.ks" as a filename since we're redirecting stdin
index aa6b2b9d2eab3228e52de18308b4a89e321b2b12..ae0089fd9dd545533fb69687d9078b84149be63a 100644 (file)
@@ -35,7 +35,7 @@ parseExampleModule(llvm::StringRef Source, llvm::StringRef Name) {
   using namespace llvm;
   using namespace llvm::orc;
 
-  auto Ctx = llvm::make_unique<LLVMContext>();
+  auto Ctx = std::make_unique<LLVMContext>();
   SMDiagnostic Err;
   auto M = parseIR(MemoryBufferRef(Source, Name), Err, *Ctx);
 
index 9c148a08017070900d4f790a501a34d4377681de..6478462207668a93fd6347515f631c4f8f186471 100644 (file)
@@ -259,7 +259,7 @@ int main() {
   LLVMContext Context;
 
   // Create some module to put our function into it.
-  std::unique_ptr<Module> Owner = make_unique<Module>("test", Context);
+  std::unique_ptr<Module> Owner = std::make_unique<Module>("test", Context);
   Module *M = Owner.get();
 
   Function* add1F = createAdd1( M );
index 219018001dec7d1c2a5a7199e3a9d7502a9d5424..803badb59d9187f3bbb5db5eef8b8f34f027af0a 100644 (file)
@@ -48,7 +48,7 @@ public:
     if (!DL)
       return DL.takeError();
 
-    auto ES = llvm::make_unique<ExecutionSession>();
+    auto ES = std::make_unique<ExecutionSession>();
 
     auto LCTMgr = createLocalLazyCallThroughManager(
         JTMB->getTargetTriple(), *ES,
@@ -128,7 +128,7 @@ private:
   }
 
   static std::unique_ptr<SectionMemoryManager> createMemMgr() {
-    return llvm::make_unique<SectionMemoryManager>();
+    return std::make_unique<SectionMemoryManager>();
   }
 
   std::unique_ptr<ExecutionSession> ES;
@@ -168,7 +168,7 @@ int main(int argc, char *argv[]) {
   // Load the IR inputs.
   for (const auto &InputFile : InputFiles) {
     SMDiagnostic Err;
-    auto Ctx = llvm::make_unique<LLVMContext>();
+    auto Ctx = std::make_unique<LLVMContext>();
     auto M = parseIRFile(InputFile, Err, *Ctx);
     if (!M) {
       Err.print(argv[0], errs());
index 5dcd6e73c54f863a186d5451773c3b062479614f..49657e02a9911059e8ac3e964fa9c5b7d7ab2d3b 100644 (file)
@@ -38,7 +38,7 @@ class Any {
     explicit StorageImpl(T &&Value) : Value(std::move(Value)) {}
 
     std::unique_ptr<StorageBase> clone() const override {
-      return llvm::make_unique<StorageImpl<T>>(Value);
+      return std::make_unique<StorageImpl<T>>(Value);
     }
 
     const void *id() const override { return &TypeId<T>::Id; }
@@ -78,7 +78,7 @@ public:
           int>::type = 0>
   Any(T &&Value) {
     using U = typename std::decay<T>::type;
-    Storage = llvm::make_unique<StorageImpl<U>>(std::forward<T>(Value));
+    Storage = std::make_unique<StorageImpl<U>>(std::forward<T>(Value));
   }
 
   Any(Any &&Other) : Storage(std::move(Other.Storage)) {}
index c59c09dd2095dd0e852ec31dc49204dc080d27d7..6b5936680c37c7cea3a15118c0541ad93acb3dc1 100644 (file)
@@ -365,7 +365,7 @@ typename Tr::RegionNodeT *RegionBase<Tr>::getBBNode(BlockT *BB) const {
     auto Deconst = const_cast<RegionBase<Tr> *>(this);
     typename BBNodeMapT::value_type V = {
         BB,
-        llvm::make_unique<RegionNodeT>(static_cast<RegionT *>(Deconst), BB)};
+        std::make_unique<RegionNodeT>(static_cast<RegionT *>(Deconst), BB)};
     at = BBNodeMap.insert(std::move(V)).first;
   }
   return at->second.get();
index d546c39447c339fc14b21d28f1f22e1760b9e3c3..f7b804b3a21169106ac0f0634a5cd92f707d85bd 100644 (file)
@@ -87,7 +87,7 @@ public:
   }
   GISelKnownBits &get(MachineFunction &MF) {
     if (!Info)
-      Info = make_unique<GISelKnownBits>(MF);
+      Info = std::make_unique<GISelKnownBits>(MF);
     return *Info.get();
   }
   void getAnalysisUsage(AnalysisUsage &AU) const override;
index 8bb88165d3e10281ff4e86a54c03f39fa29ccb80..c3b472e6555c296f9845d42e1840635976408800 100644 (file)
@@ -224,7 +224,7 @@ namespace llvm {
 
     /// Constructs a new LiveRange object.
     LiveRange(bool UseSegmentSet = false)
-        : segmentSet(UseSegmentSet ? llvm::make_unique<SegmentSet>()
+        : segmentSet(UseSegmentSet ? std::make_unique<SegmentSet>()
                                    : nullptr) {}
 
     /// Constructs a new LiveRange object by copying segments and valnos from
index 03ca53072685df499f0a98a3187031e1fae62001..2655bb059ff54531469ec2fa28be6bff906abe14 100644 (file)
@@ -200,7 +200,7 @@ public:
         RegClassInfo(rci), II_setByPragma(II), Topo(SUnits, &ExitSU) {
     P.MF->getSubtarget().getSMSMutations(Mutations);
     if (SwpEnableCopyToPhi)
-      Mutations.push_back(llvm::make_unique<CopyToPhiMutation>());
+      Mutations.push_back(std::make_unique<CopyToPhiMutation>());
   }
 
   void schedule() override;
index 8b014ccbb07ba72655c1024b7184d8644a474140..099ba788e9a2d8c2bbfbecc2d4049b56288fd515 100644 (file)
@@ -28,17 +28,17 @@ class Vector {
 public:
   /// Construct a PBQP vector of the given size.
   explicit Vector(unsigned Length)
-    : Length(Length), Data(llvm::make_unique<PBQPNum []>(Length)) {}
+    : Length(Length), Data(std::make_unique<PBQPNum []>(Length)) {}
 
   /// Construct a PBQP vector with initializer.
   Vector(unsigned Length, PBQPNum InitVal)
-    : Length(Length), Data(llvm::make_unique<PBQPNum []>(Length)) {
+    : Length(Length), Data(std::make_unique<PBQPNum []>(Length)) {
     std::fill(Data.get(), Data.get() + Length, InitVal);
   }
 
   /// Copy construct a PBQP vector.
   Vector(const Vector &V)
-    : Length(V.Length), Data(llvm::make_unique<PBQPNum []>(Length)) {
+    : Length(V.Length), Data(std::make_unique<PBQPNum []>(Length)) {
     std::copy(V.Data.get(), V.Data.get() + Length, Data.get());
   }
 
@@ -125,21 +125,21 @@ private:
 public:
   /// Construct a PBQP Matrix with the given dimensions.
   Matrix(unsigned Rows, unsigned Cols) :
-    Rows(Rows), Cols(Cols), Data(llvm::make_unique<PBQPNum []>(Rows * Cols)) {
+    Rows(Rows), Cols(Cols), Data(std::make_unique<PBQPNum []>(Rows * Cols)) {
   }
 
   /// Construct a PBQP Matrix with the given dimensions and initial
   /// value.
   Matrix(unsigned Rows, unsigned Cols, PBQPNum InitVal)
     : Rows(Rows), Cols(Cols),
-      Data(llvm::make_unique<PBQPNum []>(Rows * Cols)) {
+      Data(std::make_unique<PBQPNum []>(Rows * Cols)) {
     std::fill(Data.get(), Data.get() + (Rows * Cols), InitVal);
   }
 
   /// Copy construct a PBQP matrix.
   Matrix(const Matrix &M)
     : Rows(M.Rows), Cols(M.Cols),
-      Data(llvm::make_unique<PBQPNum []>(Rows * Cols)) {
+      Data(std::make_unique<PBQPNum []>(Rows * Cols)) {
     std::copy(M.Data.get(), M.Data.get() + (Rows * Cols), Data.get());
   }
 
index 0bd82aafac37b14da6b442f371da3367c41dce71..d48fc664c1c3db8ba64d2cf8f2f43313d6ef3400 100644 (file)
@@ -280,7 +280,7 @@ public:
   ///
   /// This can also be used to plug a new MachineSchedStrategy into an instance
   /// of the standard ScheduleDAGMI:
-  ///   return new ScheduleDAGMI(C, make_unique<MyStrategy>(C), /*RemoveKillFlags=*/false)
+  ///   return new ScheduleDAGMI(C, std::make_unique<MyStrategy>(C), /*RemoveKillFlags=*/false)
   ///
   /// Return NULL to select the default (generic) machine scheduler.
   virtual ScheduleDAGInstrs *
index 62761cb87c8174868f201b2d7d255d9ffba875c9..108abb291498e3e57dce64e1ee8e2f19fb2b5108 100644 (file)
@@ -62,7 +62,7 @@ public:
 
   Error visitSymbolBegin(CVSymbol &Record) override {
     assert(!Mapping && "Already in a symbol mapping!");
-    Mapping = llvm::make_unique<MappingInfo>(Record.content(), Container);
+    Mapping = std::make_unique<MappingInfo>(Record.content(), Container);
     return Mapping->Mapping.visitSymbolBegin(Record);
   }
   Error visitSymbolEnd(CVSymbol &Record) override {
index 081de32dd02cb726956c556cf77cc77e66497384..2b17f5ccb13b0a8db707961e84e6bd94cfe538d6 100644 (file)
@@ -66,7 +66,7 @@ public:
 
   Error visitTypeBegin(CVType &Record) override {
     assert(!Mapping && "Already in a type mapping!");
-    Mapping = llvm::make_unique<MappingInfo>(Record.content());
+    Mapping = std::make_unique<MappingInfo>(Record.content());
     return Mapping->Mapping.visitTypeBegin(Record);
   }
 
index c0262b6f74301fe07f1fe502048a67991cdbf7b6..fbebfe634b63e6f7ba055d71830074b69c6b149c 100644 (file)
@@ -293,7 +293,7 @@ public:
   LoadedObjectInfoHelper(Ts &&... Args) : Base(std::forward<Ts>(Args)...) {}
 
   std::unique_ptr<llvm::LoadedObjectInfo> clone() const override {
-    return llvm::make_unique<Derived>(static_cast<const Derived &>(*this));
+    return std::make_unique<Derived>(static_cast<const Derived &>(*this));
   }
 };
 
index 0b15ab474f7101d12df92cca88cc072888808611..4adf3b394c2eaf8ddce11166016332e41136f647 100644 (file)
@@ -87,7 +87,7 @@ public:
 
     // Initial construction must not access the cache, since it must be done
     // atomically.
-    auto Result = llvm::make_unique<ConcreteSymbolT>(
+    auto Result = std::make_unique<ConcreteSymbolT>(
         Session, Id, std::forward<Args>(ConstructorArgs)...);
     Result->SymbolId = Id;
 
index d9004a8894d9778f0e3c38578135f897e2fd2cdb..0d95a246755647d3c51feaa3f700a40a24f88de0 100644 (file)
@@ -131,7 +131,7 @@ public:
     auto BaseIter = RawSymbol->findChildren(T::Tag);
     if (!BaseIter)
       return nullptr;
-    return llvm::make_unique<ConcreteSymbolEnumerator<T>>(std::move(BaseIter));
+    return std::make_unique<ConcreteSymbolEnumerator<T>>(std::move(BaseIter));
   }
   std::unique_ptr<IPDBEnumSymbols> findAllChildren(PDB_SymType Type) const;
   std::unique_ptr<IPDBEnumSymbols> findAllChildren() const;
index 18221c3b3f505117eb75ae5fc492bd9c6dd7e832..7946b5b7b209b3f8f39345c3b4effab55ecd408d 100644 (file)
@@ -191,7 +191,7 @@ private:
   std::unique_ptr<ResourceOwner<ResourceT>>
   wrapOwnership(ResourcePtrT ResourcePtr) {
     using RO = ResourceOwnerImpl<ResourceT, ResourcePtrT>;
-    return llvm::make_unique<RO>(std::move(ResourcePtr));
+    return std::make_unique<RO>(std::move(ResourcePtr));
   }
 
   struct LogicalDylib {
@@ -444,7 +444,7 @@ private:
       return Error::success();
 
     // Create the GlobalValues module.
-    auto GVsM = llvm::make_unique<Module>((SrcM.getName() + ".globals").str(),
+    auto GVsM = std::make_unique<Module>((SrcM.getName() + ".globals").str(),
                                           SrcM.getContext());
     GVsM->setDataLayout(DL);
 
@@ -637,7 +637,7 @@ private:
       NewName += F->getName();
     }
 
-    auto M = llvm::make_unique<Module>(NewName, SrcM.getContext());
+    auto M = std::make_unique<Module>(NewName, SrcM.getContext());
     M->setDataLayout(SrcM.getDataLayout());
     ValueToValueMapTy VMap;
 
index 1cd2f299c7ad23a662f1ccaec2c3b41c229bb32d..196bd1fffd06fc83c8c4f0c526e4cb89d08b615c 100644 (file)
@@ -346,7 +346,7 @@ private:
 ///
 inline std::unique_ptr<AbsoluteSymbolsMaterializationUnit>
 absoluteSymbols(SymbolMap Symbols, VModuleKey K = VModuleKey()) {
-  return llvm::make_unique<AbsoluteSymbolsMaterializationUnit>(
+  return std::make_unique<AbsoluteSymbolsMaterializationUnit>(
       std::move(Symbols), std::move(K));
 }
 
@@ -390,7 +390,7 @@ private:
 /// \endcode
 inline std::unique_ptr<ReExportsMaterializationUnit>
 symbolAliases(SymbolAliasMap Aliases, VModuleKey K = VModuleKey()) {
-  return llvm::make_unique<ReExportsMaterializationUnit>(
+  return std::make_unique<ReExportsMaterializationUnit>(
       nullptr, true, std::move(Aliases), std::move(K));
 }
 
@@ -402,7 +402,7 @@ symbolAliases(SymbolAliasMap Aliases, VModuleKey K = VModuleKey()) {
 inline std::unique_ptr<ReExportsMaterializationUnit>
 reexports(JITDylib &SourceJD, SymbolAliasMap Aliases,
           bool MatchNonExported = false, VModuleKey K = VModuleKey()) {
-  return llvm::make_unique<ReExportsMaterializationUnit>(
+  return std::make_unique<ReExportsMaterializationUnit>(
       &SourceJD, MatchNonExported, std::move(Aliases), std::move(K));
 }
 
index 84cbc53b73a571d7675fddf54fb30c22064c7508..b31914f12a0d332729f5ffbdecae2bde43617c17 100644 (file)
@@ -63,7 +63,7 @@ std::shared_ptr<LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>>
 createLambdaResolver(DylibLookupFtorT DylibLookupFtor,
                      ExternalLookupFtorT ExternalLookupFtor) {
   using LR = LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>;
-  return make_unique<LR>(std::move(DylibLookupFtor),
+  return std::make_unique<LR>(std::move(DylibLookupFtor),
                          std::move(ExternalLookupFtor));
 }
 
@@ -73,7 +73,7 @@ createLambdaResolver(ORCv1DeprecationAcknowledgement,
                      DylibLookupFtorT DylibLookupFtor,
                      ExternalLookupFtorT ExternalLookupFtor) {
   using LR = LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT>;
-  return make_unique<LR>(AcknowledgeORCv1Deprecation,
+  return std::make_unique<LR>(AcknowledgeORCv1Deprecation,
                          std::move(DylibLookupFtor),
                          std::move(ExternalLookupFtor));
 }
index 16202d89f8612704434f97c6f6a9cf49ef416733..3f6ddba3d7979efe5112f9975223c721f80ea6e3 100644 (file)
@@ -171,7 +171,7 @@ private:
                                            bool ExportedSymbolsOnly) const {
       assert(!MangledSymbols && "Mangled symbols map already exists?");
 
-      auto Symbols = llvm::make_unique<StringMap<const GlobalValue*>>();
+      auto Symbols = std::make_unique<StringMap<const GlobalValue*>>();
 
       Mangler Mang;
 
@@ -209,7 +209,7 @@ public:
   Error addModule(VModuleKey K, std::unique_ptr<Module> M) {
     assert(!ModuleMap.count(K) && "VModuleKey K already in use");
     ModuleMap[K] =
-        llvm::make_unique<EmissionDeferredModule>(std::move(K), std::move(M));
+        std::make_unique<EmissionDeferredModule>(std::move(K), std::move(M));
     return Error::success();
   }
 
index 8f3264646a68d76438794fd10e71befcc08ceb23..311ed59b1549110603e787bd1aa53b3343a764e7 100644 (file)
@@ -71,7 +71,7 @@ public:
   template <typename NotifyResolvedImpl>
   static std::unique_ptr<NotifyResolvedFunction>
   createNotifyResolvedFunction(NotifyResolvedImpl NotifyResolved) {
-    return llvm::make_unique<NotifyResolvedFunctionImpl<NotifyResolvedImpl>>(
+    return std::make_unique<NotifyResolvedFunctionImpl<NotifyResolvedImpl>>(
         std::move(NotifyResolved));
   }
 
@@ -186,7 +186,7 @@ lazyReexports(LazyCallThroughManager &LCTManager,
               IndirectStubsManager &ISManager, JITDylib &SourceJD,
               SymbolAliasMap CallableAliases, ImplSymbolMap *SrcJDLoc = nullptr,
               VModuleKey K = VModuleKey()) {
-  return llvm::make_unique<LazyReexportsMaterializationUnit>(
+  return std::make_unique<LazyReexportsMaterializationUnit>(
       LCTManager, ISManager, SourceJD, std::move(CallableAliases), SrcJDLoc,
       std::move(K));
 }
index f9cbbf6ff180fb3f83d006d97804f7ce5435111b..148e260c95693dbca9553b868d7cd346ea922a82 100644 (file)
@@ -84,7 +84,7 @@ createSymbolResolver(GetResponsibilitySetFn &&GetResponsibilitySet,
           typename std::remove_reference<GetResponsibilitySetFn>::type>::type,
       typename std::remove_cv<
           typename std::remove_reference<LookupFn>::type>::type>;
-  return llvm::make_unique<LambdaSymbolResolverImpl>(
+  return std::make_unique<LambdaSymbolResolverImpl>(
       std::forward<GetResponsibilitySetFn>(GetResponsibilitySet),
       std::forward<LookupFn>(Lookup));
 }
index 8b875b7906e110e4d73318b8b32745c9ed628e5f..86e8d5df3ad93ac9bd36854fb2cdb3d4baf1a2c1 100644 (file)
@@ -493,7 +493,7 @@ public:
                                  ExecutionSession &ES,
                                  JITTargetAddress ErrorHandlerAddress)
         : JITCompileCallbackManager(
-              llvm::make_unique<RemoteTrampolinePool>(Client), ES,
+              std::make_unique<RemoteTrampolinePool>(Client), ES,
               ErrorHandlerAddress) {}
   };
 
@@ -553,7 +553,7 @@ public:
     auto Id = IndirectStubOwnerIds.getNext();
     if (auto Err = callB<stubs::CreateIndirectStubsOwner>(Id))
       return std::move(Err);
-    return llvm::make_unique<RemoteIndirectStubsManager>(*this, Id);
+    return std::make_unique<RemoteIndirectStubsManager>(*this, Id);
   }
 
   Expected<RemoteCompileCallbackManager &>
index 1a8b2d14486ccf7c373a65029199ba8a35cc6063..be5cea410544c15d5ad6aea9ccad201e78d2fbae 100644 (file)
@@ -764,7 +764,7 @@ private:
 // Create a ResponseHandler from a given user handler.
 template <typename ChannelT, typename FuncRetT, typename HandlerT>
 std::unique_ptr<ResponseHandler<ChannelT>> createResponseHandler(HandlerT H) {
-  return llvm::make_unique<ResponseHandlerImpl<ChannelT, FuncRetT, HandlerT>>(
+  return std::make_unique<ResponseHandlerImpl<ChannelT, FuncRetT, HandlerT>>(
       std::move(H));
 }
 
index d9535ce5f21ff11325b25b61bf2e9002417edab6..c5106cf09ecc70e6c303bcf7ae001115cda70ad0 100644 (file)
@@ -216,7 +216,7 @@ private:
         : K(std::move(K)),
           Parent(Parent),
           MemMgr(std::move(MemMgr)),
-          PFC(llvm::make_unique<PreFinalizeContents>(
+          PFC(std::make_unique<PreFinalizeContents>(
               std::move(Obj), std::move(Resolver),
               ProcessAllSections)) {
       buildInitialSymbolTable(PFC->Obj);
@@ -234,7 +234,7 @@ private:
 
       JITSymbolResolverAdapter ResolverAdapter(Parent.ES, *PFC->Resolver,
                                               nullptr);
-      PFC->RTDyld = llvm::make_unique<RuntimeDyld>(*MemMgr, ResolverAdapter);
+      PFC->RTDyld = std::make_unique<RuntimeDyld>(*MemMgr, ResolverAdapter);
       PFC->RTDyld->setProcessAllSections(PFC->ProcessAllSections);
 
       Finalized = true;
@@ -338,7 +338,7 @@ private:
                      std::shared_ptr<SymbolResolver> Resolver,
                      bool ProcessAllSections) {
     using LOS = ConcreteLinkedObject<MemoryManagerPtrT>;
-    return llvm::make_unique<LOS>(Parent, std::move(K), std::move(Obj),
+    return std::make_unique<LOS>(Parent, std::move(K), std::move(Obj),
                                   std::move(MemMgr), std::move(Resolver),
                                   ProcessAllSections);
   }
index b87cf697a81e5d7ed0398746500f0b00ab011bc9..9b1e0f0640d508c6838b54d58636f90c64a4ddae 100644 (file)
@@ -472,7 +472,7 @@ private:
   }
 
   Expected<ObjHandleT> addObject(std::string ObjBuffer) {
-    auto Buffer = llvm::make_unique<StringMemoryBuffer>(std::move(ObjBuffer));
+    auto Buffer = std::make_unique<StringMemoryBuffer>(std::move(ObjBuffer));
     auto Id = HandleIdMgr.getNext();
     assert(!BaseLayerHandles.count(Id) && "Id already in use?");
 
index 7ca2540181ba06ef598c40fc29eb8c31ebead7e6..581d7d78a97f6bc4d0a3272fb8acf09cd5697e6a 100644 (file)
@@ -806,7 +806,7 @@ public:
   /// Ensure that this has RAUW support, and then return it.
   ReplaceableMetadataImpl *getOrCreateReplaceableUses() {
     if (!hasReplaceableUses())
-      makeReplaceable(llvm::make_unique<ReplaceableMetadataImpl>(getContext()));
+      makeReplaceable(std::make_unique<ReplaceableMetadataImpl>(getContext()));
     return getReplaceableUses();
   }
 
index c0de46d280a31e8d8a78879e5cfc95d28818665f..be60447abd87ec576fd8fea5ac25c5552ddeda34 100644 (file)
@@ -603,7 +603,7 @@ public:
     if (!TypeTests.empty() || !TypeTestAssumeVCalls.empty() ||
         !TypeCheckedLoadVCalls.empty() || !TypeTestAssumeConstVCalls.empty() ||
         !TypeCheckedLoadConstVCalls.empty())
-      TIdInfo = llvm::make_unique<TypeIdInfo>(TypeIdInfo{
+      TIdInfo = std::make_unique<TypeIdInfo>(TypeIdInfo{
           std::move(TypeTests), std::move(TypeTestAssumeVCalls),
           std::move(TypeCheckedLoadVCalls),
           std::move(TypeTestAssumeConstVCalls),
@@ -682,7 +682,7 @@ public:
   /// were unable to devirtualize a checked call.
   void addTypeTest(GlobalValue::GUID Guid) {
     if (!TIdInfo)
-      TIdInfo = llvm::make_unique<TypeIdInfo>();
+      TIdInfo = std::make_unique<TypeIdInfo>();
     TIdInfo->TypeTests.push_back(Guid);
   }
 
@@ -782,7 +782,7 @@ public:
 
   void setVTableFuncs(VTableFuncList Funcs) {
     assert(!VTableFuncs);
-    VTableFuncs = llvm::make_unique<VTableFuncList>(std::move(Funcs));
+    VTableFuncs = std::make_unique<VTableFuncList>(std::move(Funcs));
   }
 
   ArrayRef<VirtFuncOffset> vTableFuncs() const {
@@ -1419,7 +1419,7 @@ template <>
 struct GraphTraits<ModuleSummaryIndex *> : public GraphTraits<ValueInfo> {
   static NodeRef getEntryNode(ModuleSummaryIndex *I) {
     std::unique_ptr<GlobalValueSummary> Root =
-        make_unique<FunctionSummary>(I->calculateCallGraphRoot());
+        std::make_unique<FunctionSummary>(I->calculateCallGraphRoot());
     GlobalValueSummaryInfo G(I->haveGVs());
     G.SummaryList.push_back(std::move(Root));
     static auto P =
index 26d9c43fabf18fb6dcc2fe4d668f2d633da87e2f..4d4a67c75172eea21badd6672a92317be449c12a 100644 (file)
@@ -220,7 +220,7 @@ template <> struct CustomMappingTraits<GlobalValueSummaryMapTy> {
           V.emplace(RefGUID, /*IsAnalysis=*/false);
         Refs.push_back(ValueInfo(/*IsAnalysis=*/false, &*V.find(RefGUID)));
       }
-      Elem.SummaryList.push_back(llvm::make_unique<FunctionSummary>(
+      Elem.SummaryList.push_back(std::make_unique<FunctionSummary>(
           GlobalValueSummary::GVFlags(
               static_cast<GlobalValue::LinkageTypes>(FSum.Linkage),
               FSum.NotEligibleToImport, FSum.Live, FSum.IsLocal, FSum.CanAutoHide),
index 58198bf67b112d027d8ba02e9b3974d8f7bebc49..c602c0b5cc20a1e72c081584f662652dee3edb52 100644 (file)
@@ -289,7 +289,7 @@ struct AnalysisPassModel : AnalysisPassConcept<IRUnitT, PreservedAnalysesT,
       AnalysisResultConcept<IRUnitT, PreservedAnalysesT, InvalidatorT>>
   run(IRUnitT &IR, AnalysisManager<IRUnitT, ExtraArgTs...> &AM,
       ExtraArgTs... ExtraArgs) override {
-    return llvm::make_unique<ResultModelT>(
+    return std::make_unique<ResultModelT>(
         Pass.run(IR, AM, std::forward<ExtraArgTs>(ExtraArgs)...));
   }
 
index fb107e3fbe024d88d9440ce2ba152bfeffc1723a..daa6585b111305fa7ce3097dcda11c1b7388d0d0 100644 (file)
@@ -226,7 +226,7 @@ struct LTOLLVMContext : LLVMContext {
     setDiscardValueNames(C.ShouldDiscardValueNames);
     enableDebugTypeODRUniquing();
     setDiagnosticHandler(
-        llvm::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true);
+        std::make_unique<LTOLLVMDiagnosticHandler>(&DiagHandler), true);
   }
   DiagnosticHandlerFunction DiagHandler;
 };
index ae9a49c648555318be947bdb20515fcdaf6b607b..6ca103808aa81494df14493cde0636ab3550bf17 100644 (file)
@@ -285,7 +285,7 @@ public:
 
   unsigned createMemoryGroup() {
     Groups.insert(
-        std::make_pair(NextGroupID, llvm::make_unique<MemoryGroup>()));
+        std::make_pair(NextGroupID, std::make_unique<MemoryGroup>()));
     return NextGroupID++;
   }
 
index 36d0bd40488722a0f53a7c163527e0f1f6c6f79f..74c71a73dffd123ca421b49db49b1d939da3e948 100644 (file)
@@ -159,7 +159,7 @@ public:
 
   Scheduler(const MCSchedModel &Model, LSUnit &Lsu,
             std::unique_ptr<SchedulerStrategy> SelectStrategy)
-      : Scheduler(make_unique<ResourceManager>(Model), Lsu,
+      : Scheduler(std::make_unique<ResourceManager>(Model), Lsu,
                   std::move(SelectStrategy)) {}
 
   Scheduler(std::unique_ptr<ResourceManager> RM, LSUnit &Lsu,
index c7d764ade30d9358b399caf7d5db410747680754..a229020b8da850582819e9c77c6b3767cfcc6760 100644 (file)
@@ -695,7 +695,7 @@ struct InstrProfRecord {
   InstrProfRecord(const InstrProfRecord &RHS)
       : Counts(RHS.Counts),
         ValueData(RHS.ValueData
-                      ? llvm::make_unique<ValueProfData>(*RHS.ValueData)
+                      ? std::make_unique<ValueProfData>(*RHS.ValueData)
                       : nullptr) {}
   InstrProfRecord &operator=(InstrProfRecord &&) = default;
   InstrProfRecord &operator=(const InstrProfRecord &RHS) {
@@ -705,7 +705,7 @@ struct InstrProfRecord {
       return *this;
     }
     if (!ValueData)
-      ValueData = llvm::make_unique<ValueProfData>(*RHS.ValueData);
+      ValueData = std::make_unique<ValueProfData>(*RHS.ValueData);
     else
       *ValueData = *RHS.ValueData;
     return *this;
@@ -817,7 +817,7 @@ private:
   std::vector<InstrProfValueSiteRecord> &
   getOrCreateValueSitesForKind(uint32_t ValueKind) {
     if (!ValueData)
-      ValueData = llvm::make_unique<ValueProfData>();
+      ValueData = std::make_unique<ValueProfData>();
     switch (ValueKind) {
     case IPVK_IndirectCallTarget:
       return ValueData->IndirectCallSites;
@@ -897,7 +897,7 @@ InstrProfRecord::getValueForSite(uint32_t ValueKind, uint32_t Site,
     return std::unique_ptr<InstrProfValueData[]>(nullptr);
   }
 
-  auto VD = llvm::make_unique<InstrProfValueData[]>(N);
+  auto VD = std::make_unique<InstrProfValueData[]>(N);
   TotalCount = getValueForSite(VD.get(), ValueKind, Site);
 
   return VD;
index 424906c5d19e2c1257742198b4351716f84d1c18..c0e4d362364bee999273aaa94826b87119c52f42 100644 (file)
@@ -328,7 +328,7 @@ inline ErrorSuccess Error::success() { return ErrorSuccess(); }
 /// Make a Error instance representing failure using the given error info
 /// type.
 template <typename ErrT, typename... ArgTs> Error make_error(ArgTs &&... Args) {
-  return Error(llvm::make_unique<ErrT>(std::forward<ArgTs>(Args)...));
+  return Error(std::make_unique<ErrT>(std::forward<ArgTs>(Args)...));
 }
 
 /// Base class for user error types. Users should declare their error types
index 34d8289ab1d6d0d12f4068a92f1a9cac5daeede5..9169379f746d0f0b0e5489e0d14cfa7697e4821f 100644 (file)
@@ -571,7 +571,7 @@ protected:
     assert(IDomNode && "Not immediate dominator specified for block!");
     DFSInfoValid = false;
     return (DomTreeNodes[BB] = IDomNode->addChild(
-                llvm::make_unique<DomTreeNodeBase<NodeT>>(BB, IDomNode))).get();
+                std::make_unique<DomTreeNodeBase<NodeT>>(BB, IDomNode))).get();
   }
 
   /// Add a new node to the forward dominator tree and make it a new root.
@@ -585,7 +585,7 @@ protected:
            "Cannot change root of post-dominator tree");
     DFSInfoValid = false;
     DomTreeNodeBase<NodeT> *NewNode = (DomTreeNodes[BB] =
-      llvm::make_unique<DomTreeNodeBase<NodeT>>(BB, nullptr)).get();
+      std::make_unique<DomTreeNodeBase<NodeT>>(BB, nullptr)).get();
     if (Roots.empty()) {
       addRoot(BB);
     } else {
index ccceba8817189165ae811fc19472653838f28e49..7c0278e8770eede1475640405facd42d1763a57d 100644 (file)
@@ -186,7 +186,7 @@ struct SemiNCAInfo {
     // Add a new tree node for this NodeT, and link it as a child of
     // IDomNode
     return (DT.DomTreeNodes[BB] = IDomNode->addChild(
-        llvm::make_unique<DomTreeNodeBase<NodeT>>(BB, IDomNode)))
+        std::make_unique<DomTreeNodeBase<NodeT>>(BB, IDomNode)))
         .get();
   }
 
@@ -586,7 +586,7 @@ struct SemiNCAInfo {
     NodePtr Root = IsPostDom ? nullptr : DT.Roots[0];
 
     DT.RootNode = (DT.DomTreeNodes[Root] =
-                       llvm::make_unique<DomTreeNodeBase<NodeT>>(Root, nullptr))
+                       std::make_unique<DomTreeNodeBase<NodeT>>(Root, nullptr))
         .get();
     SNCA.attachNewSubtree(DT, DT.RootNode);
   }
@@ -611,7 +611,7 @@ struct SemiNCAInfo {
       // Add a new tree node for this BasicBlock, and link it as a child of
       // IDomNode.
       DT.DomTreeNodes[W] = IDomNode->addChild(
-          llvm::make_unique<DomTreeNodeBase<NodeT>>(W, IDomNode));
+          std::make_unique<DomTreeNodeBase<NodeT>>(W, IDomNode));
     }
   }
 
@@ -663,7 +663,7 @@ struct SemiNCAInfo {
       TreeNodePtr VirtualRoot = DT.getNode(nullptr);
       FromTN =
           (DT.DomTreeNodes[From] = VirtualRoot->addChild(
-               llvm::make_unique<DomTreeNodeBase<NodeT>>(From, VirtualRoot)))
+               std::make_unique<DomTreeNodeBase<NodeT>>(From, VirtualRoot)))
               .get();
       DT.Roots.push_back(From);
     }
index 4d8aa5f1470df076e2c8e0743ef1b872fc125ae5..5bb6a254a47f4c3017768d64f14f508e175652c4 100644 (file)
@@ -115,7 +115,7 @@ namespace llvm {
       entry Entry;
       node Node;
 
-      static std::unique_ptr<T> CtorFn() { return make_unique<V>(); }
+      static std::unique_ptr<T> CtorFn() { return std::make_unique<V>(); }
 
     public:
       Add(StringRef Name, StringRef Desc)
index cf2f845dee0a2d932a74e28e37aea05d35e38c25..501191102b321327d85e41ff4aa17f07ffb80196 100644 (file)
@@ -252,7 +252,7 @@ AssumptionCache &AssumptionCacheTracker::getAssumptionCache(Function &F) {
   // Ok, build a new cache by scanning the function, insert it and the value
   // handle into our map, and return the newly populated cache.
   auto IP = AssumptionCaches.insert(std::make_pair(
-      FunctionCallbackVH(&F, this), llvm::make_unique<AssumptionCache>(F)));
+      FunctionCallbackVH(&F, this), std::make_unique<AssumptionCache>(F)));
   assert(IP.second && "Scanning function already in the map?");
   return *IP.first->second;
 }
index ec5e94d499be45e73a2593d4a72ed89ff12db966..70aeb1a688ee0c0afb3f1580652c34b3f4dfbb1d 100644 (file)
@@ -29,7 +29,7 @@ using namespace llvm;
 
 CallGraph::CallGraph(Module &M)
     : M(M), ExternalCallingNode(getOrInsertFunction(nullptr)),
-      CallsExternalNode(llvm::make_unique<CallGraphNode>(nullptr)) {
+      CallsExternalNode(std::make_unique<CallGraphNode>(nullptr)) {
   // Add every function to the call graph.
   for (Function &F : M)
     addToCallGraph(&F);
@@ -150,7 +150,7 @@ CallGraphNode *CallGraph::getOrInsertFunction(const Function *F) {
     return CGN.get();
 
   assert((!F || F->getParent() == &M) && "Function not in current module!");
-  CGN = llvm::make_unique<CallGraphNode>(const_cast<Function *>(F));
+  CGN = std::make_unique<CallGraphNode>(const_cast<Function *>(F));
   return CGN.get();
 }
 
index 75f269e84f9dcf0ea41b1e9422c6411a33550133..0038c9fb9ce42c19d9b5b9794b8b695978161c04 100644 (file)
@@ -254,7 +254,7 @@ FullDependence::FullDependence(Instruction *Source, Instruction *Destination,
       LoopIndependent(PossiblyLoopIndependent) {
   Consistent = true;
   if (CommonLevels)
-    DV = make_unique<DVEntry[]>(CommonLevels);
+    DV = std::make_unique<DVEntry[]>(CommonLevels);
 }
 
 // The rest are simple getters that hide the implementation.
@@ -3415,7 +3415,7 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
   if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) {
     // can only analyze simple loads and stores, i.e., no calls, invokes, etc.
     LLVM_DEBUG(dbgs() << "can only handle simple loads and stores\n");
-    return make_unique<Dependence>(Src, Dst);
+    return std::make_unique<Dependence>(Src, Dst);
   }
 
   assert(isLoadOrStore(Src) && "instruction is not load or store");
@@ -3430,7 +3430,7 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
   case PartialAlias:
     // cannot analyse objects if we don't understand their aliasing.
     LLVM_DEBUG(dbgs() << "can't analyze may or partial alias\n");
-    return make_unique<Dependence>(Src, Dst);
+    return std::make_unique<Dependence>(Src, Dst);
   case NoAlias:
     // If the objects noalias, they are distinct, accesses are independent.
     LLVM_DEBUG(dbgs() << "no alias\n");
@@ -3777,7 +3777,7 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
       return nullptr;
   }
 
-  return make_unique<FullDependence>(std::move(Result));
+  return std::make_unique<FullDependence>(std::move(Result));
 }
 
 
index 6ff840efcb642df4e37299be10a296a79ed8f1b4..68153de8219f506204b565b85b333c91cb208b80 100644 (file)
@@ -53,7 +53,7 @@ static cl::opt<unsigned>
                               "call callsite"));
 
 ICallPromotionAnalysis::ICallPromotionAnalysis() {
-  ValueDataArray = llvm::make_unique<InstrProfValueData[]>(MaxNumPromotions);
+  ValueDataArray = std::make_unique<InstrProfValueData[]>(MaxNumPromotions);
 }
 
 bool ICallPromotionAnalysis::isPromotionProfitable(uint64_t Count,
index f2592c26b3736ccdc35aa2cbbbf10ac2195e2d5f..7fd61b4e0b2b06e389e313f9a1ffc24c40bec43d 100644 (file)
@@ -56,7 +56,7 @@ void LazyBranchProbabilityInfoPass::releaseMemory() { LBPI.reset(); }
 bool LazyBranchProbabilityInfoPass::runOnFunction(Function &F) {
   LoopInfo &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
   TargetLibraryInfo &TLI = getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
-  LBPI = llvm::make_unique<LazyBranchProbabilityInfo>(&F, &LI, &TLI);
+  LBPI = std::make_unique<LazyBranchProbabilityInfo>(&F, &LI, &TLI);
   return false;
 }
 
index 542ff709d4755cac5e68af76dfd29a07f79b0c23..6c6fe8730b6f2569623660a69c3ceb9e27e6e3c7 100644 (file)
@@ -188,7 +188,7 @@ namespace {
       else {
         auto It = ValueCache.find_as(Val);
         if (It == ValueCache.end()) {
-          ValueCache[Val] = make_unique<ValueCacheEntryTy>(Val, this);
+          ValueCache[Val] = std::make_unique<ValueCacheEntryTy>(Val, this);
           It = ValueCache.find_as(Val);
           assert(It != ValueCache.end() && "Val was just added to the map!");
         }
index 2fd8b8d6e1de9cee82685f1b1c4a403564fb59a9..7a12f597969dedc47e7f893564240b02ef0b477d 100644 (file)
@@ -336,7 +336,7 @@ bool LegacyDivergenceAnalysis::runOnFunction(Function &F) {
   if (shouldUseGPUDivergenceAnalysis(F)) {
     // run the new GPU divergence analysis
     auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
-    gpuDA = llvm::make_unique<GPUDivergenceAnalysis>(F, DT, PDT, LI, TTI);
+    gpuDA = std::make_unique<GPUDivergenceAnalysis>(F, DT, PDT, LI, TTI);
 
   } else {
     // run LLVM's existing DivergenceAnalysis
index d1a9d107870dfa9c3ce516650c6c019b286a784f..6c677a2ce536b294bb9a590dccf24f785a969137 100644 (file)
@@ -2099,7 +2099,7 @@ OptimizationRemarkAnalysis &LoopAccessInfo::recordAnalysis(StringRef RemarkName,
       DL = I->getDebugLoc();
   }
 
-  Report = make_unique<OptimizationRemarkAnalysis>(DEBUG_TYPE, RemarkName, DL,
+  Report = std::make_unique<OptimizationRemarkAnalysis>(DEBUG_TYPE, RemarkName, DL,
                                                    CodeRegion);
   return *Report;
 }
@@ -2344,9 +2344,9 @@ void LoopAccessInfo::collectStridedAccess(Value *MemAccess) {
 LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
                                const TargetLibraryInfo *TLI, AliasAnalysis *AA,
                                DominatorTree *DT, LoopInfo *LI)
-    : PSE(llvm::make_unique<PredicatedScalarEvolution>(*SE, *L)),
-      PtrRtChecking(llvm::make_unique<RuntimePointerChecking>(SE)),
-      DepChecker(llvm::make_unique<MemoryDepChecker>(*PSE, L)), TheLoop(L),
+    : PSE(std::make_unique<PredicatedScalarEvolution>(*SE, *L)),
+      PtrRtChecking(std::make_unique<RuntimePointerChecking>(SE)),
+      DepChecker(std::make_unique<MemoryDepChecker>(*PSE, L)), TheLoop(L),
       NumLoads(0), NumStores(0), MaxSafeDepDistBytes(-1), CanVecMem(false),
       HasConvergentOp(false),
       HasDependenceInvolvingLoopInvariantAddress(false) {
@@ -2401,7 +2401,7 @@ const LoopAccessInfo &LoopAccessLegacyAnalysis::getInfo(Loop *L) {
   auto &LAI = LoopAccessInfoMap[L];
 
   if (!LAI)
-    LAI = llvm::make_unique<LoopAccessInfo>(L, SE, TLI, AA, DT, LI);
+    LAI = std::make_unique<LoopAccessInfo>(L, SE, TLI, AA, DT, LI);
 
   return *LAI.get();
 }
index f76f78e0a6e688ee30a93891bd283383666fe40a..10d2fe07884a0f22b6a785610631cdc115a1d20f 100644 (file)
@@ -484,7 +484,7 @@ CacheCost::getCacheCost(Loop &Root, LoopStandardAnalysisResults &AR,
     return nullptr;
   }
 
-  return make_unique<CacheCost>(Loops, AR.LI, AR.SE, AR.TTI, AR.AA, DI, TRT);
+  return std::make_unique<CacheCost>(Loops, AR.LI, AR.SE, AR.TTI, AR.AA, DI, TRT);
 }
 
 void CacheCost::calculateCacheFootprint() {
index ed4b645623288bd0fb09af22a8a148b231073767..26e3cd70161aa252b50e042fb5d13fd361a29283 100644 (file)
@@ -1238,7 +1238,7 @@ MemorySSA::AccessList *MemorySSA::getOrCreateAccessList(const BasicBlock *BB) {
   auto Res = PerBlockAccesses.insert(std::make_pair(BB, nullptr));
 
   if (Res.second)
-    Res.first->second = llvm::make_unique<AccessList>();
+    Res.first->second = std::make_unique<AccessList>();
   return Res.first->second.get();
 }
 
@@ -1246,7 +1246,7 @@ MemorySSA::DefsList *MemorySSA::getOrCreateDefsList(const BasicBlock *BB) {
   auto Res = PerBlockDefs.insert(std::make_pair(BB, nullptr));
 
   if (Res.second)
-    Res.first->second = llvm::make_unique<DefsList>();
+    Res.first->second = std::make_unique<DefsList>();
   return Res.first->second.get();
 }
 
@@ -1555,10 +1555,10 @@ MemorySSA::CachingWalker<AliasAnalysis> *MemorySSA::getWalkerImpl() {
 
   if (!WalkerBase)
     WalkerBase =
-        llvm::make_unique<ClobberWalkerBase<AliasAnalysis>>(this, AA, DT);
+        std::make_unique<ClobberWalkerBase<AliasAnalysis>>(this, AA, DT);
 
   Walker =
-      llvm::make_unique<CachingWalker<AliasAnalysis>>(this, WalkerBase.get());
+      std::make_unique<CachingWalker<AliasAnalysis>>(this, WalkerBase.get());
   return Walker.get();
 }
 
@@ -1568,10 +1568,10 @@ MemorySSAWalker *MemorySSA::getSkipSelfWalker() {
 
   if (!WalkerBase)
     WalkerBase =
-        llvm::make_unique<ClobberWalkerBase<AliasAnalysis>>(this, AA, DT);
+        std::make_unique<ClobberWalkerBase<AliasAnalysis>>(this, AA, DT);
 
   SkipWalker =
-      llvm::make_unique<SkipSelfWalker<AliasAnalysis>>(this, WalkerBase.get());
+      std::make_unique<SkipSelfWalker<AliasAnalysis>>(this, WalkerBase.get());
   return SkipWalker.get();
  }
 
@@ -2256,7 +2256,7 @@ MemorySSAAnalysis::Result MemorySSAAnalysis::run(Function &F,
                                                  FunctionAnalysisManager &AM) {
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
   auto &AA = AM.getResult<AAManager>(F);
-  return MemorySSAAnalysis::Result(llvm::make_unique<MemorySSA>(F, &AA, &DT));
+  return MemorySSAAnalysis::Result(std::make_unique<MemorySSA>(F, &AA, &DT));
 }
 
 bool MemorySSAAnalysis::Result::invalidate(
index b10678a2184f4aafda03452fe6ebf711a1e25de1..29d95d0e9895a420496ddbcb56453a96f3476d0a 100644 (file)
@@ -467,7 +467,7 @@ static void computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
       // FIXME: refactor this to use the same code that inliner is using.
       // Don't try to import functions with noinline attribute.
       F.getAttributes().hasFnAttribute(Attribute::NoInline)};
-  auto FuncSummary = llvm::make_unique<FunctionSummary>(
+  auto FuncSummary = std::make_unique<FunctionSummary>(
       Flags, NumInsts, FunFlags, /*EntryCount=*/0, std::move(Refs),
       CallGraphEdges.takeVector(), TypeTests.takeVector(),
       TypeTestAssumeVCalls.takeVector(), TypeCheckedLoadVCalls.takeVector(),
@@ -598,7 +598,7 @@ static void computeVariableSummary(ModuleSummaryIndex &Index,
       !V.hasComdat() && !V.hasAppendingLinkage() && !V.isInterposable() &&
       !V.hasAvailableExternallyLinkage() && !V.hasDLLExportStorageClass();
   GlobalVarSummary::GVarFlags VarFlags(CanBeInternalized, CanBeInternalized);
-  auto GVarSummary = llvm::make_unique<GlobalVarSummary>(Flags, VarFlags,
+  auto GVarSummary = std::make_unique<GlobalVarSummary>(Flags, VarFlags,
                                                          RefEdges.takeVector());
   if (NonRenamableLocal)
     CantBePromoted.insert(V.getGUID());
@@ -616,7 +616,7 @@ computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A,
   GlobalValueSummary::GVFlags Flags(A.getLinkage(), NonRenamableLocal,
                                     /* Live = */ false, A.isDSOLocal(),
                                     A.hasLinkOnceODRLinkage() && A.hasGlobalUnnamedAddr());
-  auto AS = llvm::make_unique<AliasSummary>(Flags);
+  auto AS = std::make_unique<AliasSummary>(Flags);
   auto *Aliasee = A.getBaseObject();
   auto AliaseeVI = Index.getValueInfo(Aliasee->getGUID());
   assert(AliaseeVI && "Alias expects aliasee summary to be available");
@@ -696,7 +696,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
           // Create the appropriate summary type.
           if (Function *F = dyn_cast<Function>(GV)) {
             std::unique_ptr<FunctionSummary> Summary =
-                llvm::make_unique<FunctionSummary>(
+                std::make_unique<FunctionSummary>(
                     GVFlags, /*InstCount=*/0,
                     FunctionSummary::FFlags{
                         F->hasFnAttribute(Attribute::ReadNone),
@@ -714,7 +714,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
             Index.addGlobalValueSummary(*GV, std::move(Summary));
           } else {
             std::unique_ptr<GlobalVarSummary> Summary =
-                llvm::make_unique<GlobalVarSummary>(
+                std::make_unique<GlobalVarSummary>(
                     GVFlags, GlobalVarSummary::GVarFlags(false, false),
                     ArrayRef<ValueInfo>{});
             Index.addGlobalValueSummary(*GV, std::move(Summary));
@@ -741,7 +741,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
     else if (F.hasProfileData()) {
       LoopInfo LI{DT};
       BranchProbabilityInfo BPI{F, LI};
-      BFIPtr = llvm::make_unique<BlockFrequencyInfo>(F, BPI, LI);
+      BFIPtr = std::make_unique<BlockFrequencyInfo>(F, BPI, LI);
       BFI = BFIPtr.get();
     }
 
index 72c40a0be2325d85e8ff9f5bcfde4c9a6faa577a..07a5619a35b9009edbbf88dd24e32d869702ad92 100644 (file)
@@ -39,7 +39,7 @@ OptimizationRemarkEmitter::OptimizationRemarkEmitter(const Function *F)
   BPI.calculate(*F, LI);
 
   // Finally compute BFI.
-  OwnedBFI = llvm::make_unique<BlockFrequencyInfo>(*F, BPI, LI);
+  OwnedBFI = std::make_unique<BlockFrequencyInfo>(*F, BPI, LI);
   BFI = OwnedBFI.get();
 }
 
@@ -97,7 +97,7 @@ bool OptimizationRemarkEmitterWrapperPass::runOnFunction(Function &Fn) {
   else
     BFI = nullptr;
 
-  ORE = llvm::make_unique<OptimizationRemarkEmitter>(&Fn, BFI);
+  ORE = std::make_unique<OptimizationRemarkEmitter>(&Fn, BFI);
   return false;
 }
 
index 458c0a7de6c226a2dea883035c7af3b0800b77c6..e947e5e388a832555778693cd3cfb1006558700d 100644 (file)
@@ -21,7 +21,7 @@ bool OrderedInstructions::localDominates(const Instruction *InstA,
   const BasicBlock *IBB = InstA->getParent();
   auto OBB = OBBMap.find(IBB);
   if (OBB == OBBMap.end())
-    OBB = OBBMap.insert({IBB, make_unique<OrderedBasicBlock>(IBB)}).first;
+    OBB = OBBMap.insert({IBB, std::make_unique<OrderedBasicBlock>(IBB)}).first;
   return OBB->second->dominates(InstA, InstB);
 }
 
index e707e957a6606b5099c013e22c4b79fb124e86c7..eb66a7c82b55870cc1c02928ef14ed5082e0e287 100644 (file)
@@ -3107,7 +3107,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
         ParseToken(lltok::rbrace, "expected end of struct constant"))
       return true;
 
-    ID.ConstantStructElts = make_unique<Constant *[]>(Elts.size());
+    ID.ConstantStructElts = std::make_unique<Constant *[]>(Elts.size());
     ID.UIntVal = Elts.size();
     memcpy(ID.ConstantStructElts.get(), Elts.data(),
            Elts.size() * sizeof(Elts[0]));
@@ -3129,7 +3129,7 @@ bool LLParser::ParseValID(ValID &ID, PerFunctionState *PFS) {
       return true;
 
     if (isPackedStruct) {
-      ID.ConstantStructElts = make_unique<Constant *[]>(Elts.size());
+      ID.ConstantStructElts = std::make_unique<Constant *[]>(Elts.size());
       memcpy(ID.ConstantStructElts.get(), Elts.data(),
              Elts.size() * sizeof(Elts[0]));
       ID.UIntVal = Elts.size();
@@ -8088,7 +8088,7 @@ bool LLParser::ParseFunctionSummary(std::string Name, GlobalValue::GUID GUID,
   if (ParseToken(lltok::rparen, "expected ')' here"))
     return true;
 
-  auto FS = llvm::make_unique<FunctionSummary>(
+  auto FS = std::make_unique<FunctionSummary>(
       GVFlags, InstCount, FFlags, /*EntryCount=*/0, std::move(Refs),
       std::move(Calls), std::move(TypeIdInfo.TypeTests),
       std::move(TypeIdInfo.TypeTestAssumeVCalls),
@@ -8148,7 +8148,7 @@ bool LLParser::ParseVariableSummary(std::string Name, GlobalValue::GUID GUID,
     return true;
 
   auto GS =
-      llvm::make_unique<GlobalVarSummary>(GVFlags, GVarFlags, std::move(Refs));
+      std::make_unique<GlobalVarSummary>(GVFlags, GVarFlags, std::move(Refs));
 
   GS->setModulePath(ModulePath);
   GS->setVTableFuncs(std::move(VTableFuncs));
@@ -8189,7 +8189,7 @@ bool LLParser::ParseAliasSummary(std::string Name, GlobalValue::GUID GUID,
   if (ParseToken(lltok::rparen, "expected ')' here"))
     return true;
 
-  auto AS = llvm::make_unique<AliasSummary>(GVFlags);
+  auto AS = std::make_unique<AliasSummary>(GVFlags);
 
   AS->setModulePath(ModulePath);
 
index b13c6237f411881539504df9d32a2f94e84dece5..b7f552a6fccb9573c98b69c3d43a0a785f56ff13 100644 (file)
@@ -42,7 +42,7 @@ llvm::parseAssembly(MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context,
                     SlotMapping *Slots, bool UpgradeDebugInfo,
                     StringRef DataLayoutString) {
   std::unique_ptr<Module> M =
-      make_unique<Module>(F.getBufferIdentifier(), Context);
+      std::make_unique<Module>(F.getBufferIdentifier(), Context);
 
   if (parseAssemblyInto(F, M.get(), nullptr, Err, Slots, UpgradeDebugInfo,
                         DataLayoutString))
@@ -71,9 +71,9 @@ ParsedModuleAndIndex llvm::parseAssemblyWithIndex(
     MemoryBufferRef F, SMDiagnostic &Err, LLVMContext &Context,
     SlotMapping *Slots, bool UpgradeDebugInfo, StringRef DataLayoutString) {
   std::unique_ptr<Module> M =
-      make_unique<Module>(F.getBufferIdentifier(), Context);
+      std::make_unique<Module>(F.getBufferIdentifier(), Context);
   std::unique_ptr<ModuleSummaryIndex> Index =
-      make_unique<ModuleSummaryIndex>(/*HaveGVs=*/true);
+      std::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/true);
 
   if (parseAssemblyInto(F, M.get(), Index.get(), Err, Slots, UpgradeDebugInfo,
                         DataLayoutString))
@@ -123,7 +123,7 @@ static bool parseSummaryIndexAssemblyInto(MemoryBufferRef F,
 std::unique_ptr<ModuleSummaryIndex>
 llvm::parseSummaryIndexAssembly(MemoryBufferRef F, SMDiagnostic &Err) {
   std::unique_ptr<ModuleSummaryIndex> Index =
-      make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
+      std::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
 
   if (parseSummaryIndexAssemblyInto(F, *Index, Err))
     return nullptr;
index 997b556f0f99f838ebb56627dcf6a74b577411d8..32ae4cd9956986e60b610291eb01b8903db613c5 100644 (file)
@@ -5874,7 +5874,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
           ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex),
           IsOldProfileFormat, HasProfile, HasRelBF);
       setSpecialRefs(Refs, NumRORefs, NumWORefs);
-      auto FS = llvm::make_unique<FunctionSummary>(
+      auto FS = std::make_unique<FunctionSummary>(
           Flags, InstCount, getDecodedFFlags(RawFunFlags), /*EntryCount=*/0,
           std::move(Refs), std::move(Calls), std::move(PendingTypeTests),
           std::move(PendingTypeTestAssumeVCalls),
@@ -5900,7 +5900,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
       uint64_t RawFlags = Record[1];
       unsigned AliaseeID = Record[2];
       auto Flags = getDecodedGVSummaryFlags(RawFlags, Version);
-      auto AS = llvm::make_unique<AliasSummary>(Flags);
+      auto AS = std::make_unique<AliasSummary>(Flags);
       // The module path string ref set in the summary must be owned by the
       // index's module string table. Since we don't have a module path
       // string table section in the per-module index, we create a single
@@ -5934,7 +5934,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
       std::vector<ValueInfo> Refs =
           makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart));
       auto FS =
-          llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
+          std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
       FS->setModulePath(getThisModule()->first());
       auto GUID = getValueInfoFromValueId(ValueID);
       FS->setOriginalName(GUID.second);
@@ -5961,7 +5961,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
         VTableFuncs.push_back({Callee, Offset});
       }
       auto VS =
-          llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
+          std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
       VS->setModulePath(getThisModule()->first());
       VS->setVTableFuncs(VTableFuncs);
       auto GUID = getValueInfoFromValueId(ValueID);
@@ -6019,7 +6019,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
           IsOldProfileFormat, HasProfile, false);
       ValueInfo VI = getValueInfoFromValueId(ValueID).first;
       setSpecialRefs(Refs, NumRORefs, NumWORefs);
-      auto FS = llvm::make_unique<FunctionSummary>(
+      auto FS = std::make_unique<FunctionSummary>(
           Flags, InstCount, getDecodedFFlags(RawFunFlags), EntryCount,
           std::move(Refs), std::move(Edges), std::move(PendingTypeTests),
           std::move(PendingTypeTestAssumeVCalls),
@@ -6046,7 +6046,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
       uint64_t RawFlags = Record[2];
       unsigned AliaseeValueId = Record[3];
       auto Flags = getDecodedGVSummaryFlags(RawFlags, Version);
-      auto AS = llvm::make_unique<AliasSummary>(Flags);
+      auto AS = std::make_unique<AliasSummary>(Flags);
       LastSeenSummary = AS.get();
       AS->setModulePath(ModuleIdMap[ModuleId]);
 
@@ -6075,7 +6075,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
       std::vector<ValueInfo> Refs =
           makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart));
       auto FS =
-          llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
+          std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
       LastSeenSummary = FS.get();
       FS->setModulePath(ModuleIdMap[ModuleId]);
       ValueInfo VI = getValueInfoFromValueId(ValueID).first;
@@ -6438,7 +6438,7 @@ BitcodeModule::getModuleImpl(LLVMContext &Context, bool MaterializeAll,
                               Context);
 
   std::unique_ptr<Module> M =
-      llvm::make_unique<Module>(ModuleIdentifier, Context);
+      std::make_unique<Module>(ModuleIdentifier, Context);
   M->setMaterializer(R);
 
   // Delay parsing Metadata if ShouldLazyLoadMetadata is true.
@@ -6485,7 +6485,7 @@ Expected<std::unique_ptr<ModuleSummaryIndex>> BitcodeModule::getSummary() {
   if (Error JumpFailed = Stream.JumpToBit(ModuleBit))
     return std::move(JumpFailed);
 
-  auto Index = llvm::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
+  auto Index = std::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
   ModuleSummaryIndexBitcodeReader R(std::move(Stream), Strtab, *Index,
                                     ModuleIdentifier, 0);
 
index 108f71189585f009872def455701e5569feb18c8..fa50ec5766a75fd28f02147bba19fb1de99b426f 100644 (file)
@@ -2133,7 +2133,7 @@ MetadataLoader::MetadataLoader(BitstreamCursor &Stream, Module &TheModule,
                                BitcodeReaderValueList &ValueList,
                                bool IsImporting,
                                std::function<Type *(unsigned)> getTypeByID)
-    : Pimpl(llvm::make_unique<MetadataLoaderImpl>(
+    : Pimpl(std::make_unique<MetadataLoaderImpl>(
           Stream, TheModule, ValueList, std::move(getTypeByID), IsImporting)) {}
 
 Error MetadataLoader::parseMetadata(bool ModuleLevel) {
index 0319f256c6ef47abacc023be2a9152cc6686a0d9..cc1566929e33c5a8ba314c369ca0818bed016faa 100644 (file)
@@ -311,7 +311,7 @@ bool AsmPrinter::doInitialization(Module &M) {
   if (MAI->doesSupportDebugInformation()) {
     bool EmitCodeView = MMI->getModule()->getCodeViewFlag();
     if (EmitCodeView && TM.getTargetTriple().isOSWindows()) {
-      Handlers.emplace_back(llvm::make_unique<CodeViewDebug>(this),
+      Handlers.emplace_back(std::make_unique<CodeViewDebug>(this),
                             DbgTimerName, DbgTimerDescription,
                             CodeViewLineTablesGroupName,
                             CodeViewLineTablesGroupDescription);
@@ -380,7 +380,7 @@ bool AsmPrinter::doInitialization(Module &M) {
 
   if (mdconst::extract_or_null<ConstantInt>(
           MMI->getModule()->getModuleFlag("cfguardtable")))
-    Handlers.emplace_back(llvm::make_unique<WinCFGuard>(this), CFGuardName,
+    Handlers.emplace_back(std::make_unique<WinCFGuard>(this), CFGuardName,
                           CFGuardDescription, DWARFGroupName,
                           DWARFGroupDescription);
 
@@ -1025,7 +1025,7 @@ void AsmPrinter::EmitFunctionBody() {
     // Get MachineDominatorTree or compute it on the fly if it's unavailable
     MDT = getAnalysisIfAvailable<MachineDominatorTree>();
     if (!MDT) {
-      OwnedMDT = make_unique<MachineDominatorTree>();
+      OwnedMDT = std::make_unique<MachineDominatorTree>();
       OwnedMDT->getBase().recalculate(*MF);
       MDT = OwnedMDT.get();
     }
@@ -1033,7 +1033,7 @@ void AsmPrinter::EmitFunctionBody() {
     // Get MachineLoopInfo or compute it on the fly if it's unavailable
     MLI = getAnalysisIfAvailable<MachineLoopInfo>();
     if (!MLI) {
-      OwnedMLI = make_unique<MachineLoopInfo>();
+      OwnedMLI = std::make_unique<MachineLoopInfo>();
       OwnedMLI->getBase().analyze(MDT->getBase());
       MLI = OwnedMLI.get();
     }
index 5e49fec9c053ace90e985d94e6798756bf8d9386..420df26a2b8be2f00201e4e9488b9932d7baac57 100644 (file)
@@ -72,7 +72,7 @@ static void srcMgrDiagHandler(const SMDiagnostic &Diag, void *diagInfo) {
 unsigned AsmPrinter::addInlineAsmDiagBuffer(StringRef AsmStr,
                                             const MDNode *LocMDNode) const {
   if (!DiagInfo) {
-    DiagInfo = make_unique<SrcMgrDiagInfo>();
+    DiagInfo = std::make_unique<SrcMgrDiagInfo>();
 
     MCContext &Context = MMI->getContext();
     Context.setInlineSourceManager(&DiagInfo->SrcMgr);
index ea83646977188f499a1ad938394eda17b546f251..65060966a4e3ff7c05d218cb066f9b5744e0f3f4 100644 (file)
@@ -648,9 +648,9 @@ void CodeViewDebug::emitTypeInformation() {
 
   if (OS.isVerboseAsm()) {
     // To construct block comment describing the type record for readability.
-    SP = llvm::make_unique<ScopedPrinter>(CommentOS);
+    SP = std::make_unique<ScopedPrinter>(CommentOS);
     SP->setPrefix(CommentPrefix);
-    TDV = llvm::make_unique<TypeDumpVisitor>(Table, SP.get(), false);
+    TDV = std::make_unique<TypeDumpVisitor>(Table, SP.get(), false);
     Pipeline.addCallbackToPipeline(*TDV);
   }
 
@@ -1363,7 +1363,7 @@ void CodeViewDebug::beginFunctionImpl(const MachineFunction *MF) {
   const TargetRegisterInfo *TRI = TSI.getRegisterInfo();
   const MachineFrameInfo &MFI = MF->getFrameInfo();
   const Function &GV = MF->getFunction();
-  auto Insertion = FnDebugInfo.insert({&GV, llvm::make_unique<FunctionInfo>()});
+  auto Insertion = FnDebugInfo.insert({&GV, std::make_unique<FunctionInfo>()});
   assert(Insertion.second && "function already has info");
   CurFn = Insertion.first->second.get();
   CurFn->FuncId = NextFuncId++;
@@ -3015,7 +3015,7 @@ void CodeViewDebug::collectGlobalVariableInfo() {
         auto Insertion = ScopeGlobals.insert(
             {Scope, std::unique_ptr<GlobalVariableList>()});
         if (Insertion.second)
-          Insertion.first->second = llvm::make_unique<GlobalVariableList>();
+          Insertion.first->second = std::make_unique<GlobalVariableList>();
         VariableList = Insertion.first->second.get();
       } else if (GV->hasComdat())
         // Emit this global variable into a COMDAT section.
index 1b6326c187201b586cc19351104e8aedcc6bdea9..46c8bd8a0ed81ce8034ffdede29681f6d844c4b9 100644 (file)
@@ -208,7 +208,7 @@ void DwarfCompileUnit::addLocationAttribute(
     if (!Loc) {
       addToAccelTable = true;
       Loc = new (DIEValueAllocator) DIELoc;
-      DwarfExpr = llvm::make_unique<DIEDwarfExpression>(*Asm, *this, *Loc);
+      DwarfExpr = std::make_unique<DIEDwarfExpression>(*Asm, *this, *Loc);
     }
 
     if (Expr) {
@@ -1071,11 +1071,11 @@ void DwarfCompileUnit::createAbstractEntity(const DINode *Node,
   assert(Scope && Scope->isAbstractScope());
   auto &Entity = getAbstractEntities()[Node];
   if (isa<const DILocalVariable>(Node)) {
-    Entity = llvm::make_unique<DbgVariable>(
+    Entity = std::make_unique<DbgVariable>(
                         cast<const DILocalVariable>(Node), nullptr /* IA */);;
     DU->addScopeVariable(Scope, cast<DbgVariable>(Entity.get()));
   } else if (isa<const DILabel>(Node)) {
-    Entity = llvm::make_unique<DbgLabel>(
+    Entity = std::make_unique<DbgLabel>(
                         cast<const DILabel>(Node), nullptr /* IA */);
     DU->addScopeLabel(Scope, cast<DbgLabel>(Entity.get()));
   }
index d828c9097e943eb7b477b6fc666be06293261de6..364119a6ca1b92454a66fa17006db809779b0aa8 100644 (file)
@@ -279,7 +279,7 @@ void DbgVariable::initializeDbgValue(const MachineInstr *DbgValue) {
   assert(getInlinedAt() == DbgValue->getDebugLoc()->getInlinedAt() &&
          "Wrong inlined-at");
 
-  ValueLoc = llvm::make_unique<DbgValueLoc>(getDebugLocValue(DbgValue));
+  ValueLoc = std::make_unique<DbgValueLoc>(getDebugLocValue(DbgValue));
   if (auto *E = DbgValue->getDebugExpression())
     if (E->getNumElements())
       FrameIndexExprs.push_back({0, E});
@@ -864,7 +864,7 @@ DwarfDebug::getOrCreateDwarfCompileUnit(const DICompileUnit *DIUnit) {
 
   CompilationDir = DIUnit->getDirectory();
 
-  auto OwnedUnit = llvm::make_unique<DwarfCompileUnit>(
+  auto OwnedUnit = std::make_unique<DwarfCompileUnit>(
       InfoHolder.getUnits().size(), DIUnit, Asm, this, &InfoHolder);
   DwarfCompileUnit &NewCU = *OwnedUnit;
   InfoHolder.addUnit(std::move(OwnedUnit));
@@ -1289,7 +1289,7 @@ void DwarfDebug::collectVariableInfoFromMFTable(
       continue;
 
     ensureAbstractEntityIsCreatedIfScoped(TheCU, Var.first, Scope->getScopeNode());
-    auto RegVar = llvm::make_unique<DbgVariable>(
+    auto RegVar = std::make_unique<DbgVariable>(
                     cast<DILocalVariable>(Var.first), Var.second);
     RegVar->initializeMMI(VI.Expr, VI.Slot);
     if (DbgVariable *DbgVar = MFVars.lookup(Var))
@@ -1500,13 +1500,13 @@ DbgEntity *DwarfDebug::createConcreteEntity(DwarfCompileUnit &TheCU,
   ensureAbstractEntityIsCreatedIfScoped(TheCU, Node, Scope.getScopeNode());
   if (isa<const DILocalVariable>(Node)) {
     ConcreteEntities.push_back(
-        llvm::make_unique<DbgVariable>(cast<const DILocalVariable>(Node),
+        std::make_unique<DbgVariable>(cast<const DILocalVariable>(Node),
                                        Location));
     InfoHolder.addScopeVariable(&Scope,
         cast<DbgVariable>(ConcreteEntities.back().get()));
   } else if (isa<const DILabel>(Node)) {
     ConcreteEntities.push_back(
-        llvm::make_unique<DbgLabel>(cast<const DILabel>(Node),
+        std::make_unique<DbgLabel>(cast<const DILabel>(Node),
                                     Location, Sym));
     InfoHolder.addScopeLabel(&Scope,
         cast<DbgLabel>(ConcreteEntities.back().get()));
@@ -2824,7 +2824,7 @@ void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE &Die,
 
 DwarfCompileUnit &DwarfDebug::constructSkeletonCU(const DwarfCompileUnit &CU) {
 
-  auto OwnedUnit = llvm::make_unique<DwarfCompileUnit>(
+  auto OwnedUnit = std::make_unique<DwarfCompileUnit>(
       CU.getUniqueID(), CU.getCUNode(), Asm, this, &SkeletonHolder);
   DwarfCompileUnit &NewCU = *OwnedUnit;
   NewCU.setSection(Asm->getObjFileLowering().getDwarfInfoSection());
@@ -2924,7 +2924,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
   bool TopLevelType = TypeUnitsUnderConstruction.empty();
   AddrPool.resetUsedFlag();
 
-  auto OwnedUnit = llvm::make_unique<DwarfTypeUnit>(CU, Asm, this, &InfoHolder,
+  auto OwnedUnit = std::make_unique<DwarfTypeUnit>(CU, Asm, this, &InfoHolder,
                                                     getDwoLineTable(CU));
   DwarfTypeUnit &NewTU = *OwnedUnit;
   DIE &UnitDie = NewTU.getUnitDie();
index 4f3630f84c9054fd253c78598f048d4be3815c10..843caf1ab184f4f9d340ef1b41634cbf47b63d69 100644 (file)
@@ -153,7 +153,7 @@ public:
     assert(!ValueLoc && "Already initialized?");
     assert(!Value.getExpression()->isFragment() && "Fragments not supported.");
 
-    ValueLoc = llvm::make_unique<DbgValueLoc>(Value);
+    ValueLoc = std::make_unique<DbgValueLoc>(Value);
     if (auto *E = ValueLoc->getExpression())
       if (E->getNumElements())
         FrameIndexExprs.push_back({0, E});
index 511b7f738574586f0d94d09f5b8b73e852a53f42..d4d5fcd48cba94029f9e6e491552644dc488e055 100644 (file)
@@ -344,7 +344,7 @@ class TypePromotionTransaction;
     // Get the DominatorTree, building if necessary.
     DominatorTree &getDT(Function &F) {
       if (!DT)
-        DT = llvm::make_unique<DominatorTree>(F);
+        DT = std::make_unique<DominatorTree>(F);
       return *DT;
     }
 
@@ -2680,26 +2680,26 @@ private:
 
 void TypePromotionTransaction::setOperand(Instruction *Inst, unsigned Idx,
                                           Value *NewVal) {
-  Actions.push_back(llvm::make_unique<TypePromotionTransaction::OperandSetter>(
+  Actions.push_back(std::make_unique<TypePromotionTransaction::OperandSetter>(
       Inst, Idx, NewVal));
 }
 
 void TypePromotionTransaction::eraseInstruction(Instruction *Inst,
                                                 Value *NewVal) {
   Actions.push_back(
-      llvm::make_unique<TypePromotionTransaction::InstructionRemover>(
+      std::make_unique<TypePromotionTransaction::InstructionRemover>(
           Inst, RemovedInsts, NewVal));
 }
 
 void TypePromotionTransaction::replaceAllUsesWith(Instruction *Inst,
                                                   Value *New) {
   Actions.push_back(
-      llvm::make_unique<TypePromotionTransaction::UsesReplacer>(Inst, New));
+      std::make_unique<TypePromotionTransaction::UsesReplacer>(Inst, New));
 }
 
 void TypePromotionTransaction::mutateType(Instruction *Inst, Type *NewTy) {
   Actions.push_back(
-      llvm::make_unique<TypePromotionTransaction::TypeMutator>(Inst, NewTy));
+      std::make_unique<TypePromotionTransaction::TypeMutator>(Inst, NewTy));
 }
 
 Value *TypePromotionTransaction::createTrunc(Instruction *Opnd,
@@ -2729,7 +2729,7 @@ Value *TypePromotionTransaction::createZExt(Instruction *Inst,
 void TypePromotionTransaction::moveBefore(Instruction *Inst,
                                           Instruction *Before) {
   Actions.push_back(
-      llvm::make_unique<TypePromotionTransaction::InstructionMoveBefore>(
+      std::make_unique<TypePromotionTransaction::InstructionMoveBefore>(
           Inst, Before));
 }
 
index 9c53550eaa9d4827503c439a5b3d81553474fefc..c1d22ef89195e75ae89e18e1e092e5631c5ffc4a 100644 (file)
@@ -72,7 +72,7 @@ GCFunctionInfo &GCModuleInfo::getFunctionInfo(const Function &F) {
     return *I->second;
 
   GCStrategy *S = getGCStrategy(F.getGC());
-  Functions.push_back(llvm::make_unique<GCFunctionInfo>(F, *S));
+  Functions.push_back(std::make_unique<GCFunctionInfo>(F, *S));
   GCFunctionInfo *GFI = Functions.back().get();
   FInfoMap[&F] = GFI;
   return *GFI;
index 4518dbee1a9f81bd9ceba0ef10837779afe6c30d..78939057e8aa1f63ea6c10f3c4223c6ef6039cf7 100644 (file)
@@ -65,9 +65,9 @@ std::unique_ptr<CSEConfigBase>
 llvm::getStandardCSEConfigForOpt(CodeGenOpt::Level Level) {
   std::unique_ptr<CSEConfigBase> Config;
   if (Level == CodeGenOpt::None)
-    Config = make_unique<CSEConfigConstantOnly>();
+    Config = std::make_unique<CSEConfigConstantOnly>();
   else
-    Config = make_unique<CSEConfigFull>();
+    Config = std::make_unique<CSEConfigFull>();
   return Config;
 }
 
index 31cb1dbbc9b5a74ec9359eba8e07725360bfe8ae..644ce2e604bd5ba351ff9ee617f952c215a7ff90 100644 (file)
@@ -92,7 +92,7 @@ bool Combiner::combineMachineInstrs(MachineFunction &MF,
     return false;
 
   Builder =
-      CSEInfo ? make_unique<CSEMIRBuilder>() : make_unique<MachineIRBuilder>();
+      CSEInfo ? std::make_unique<CSEMIRBuilder>() : std::make_unique<MachineIRBuilder>();
   MRI = &MF.getRegInfo();
   Builder->setMF(MF);
   if (CSEInfo)
index 19753fbce5ac64b9c4ad90a000166345e15ddfbe..81ea7b539be051094d0ea2336a6833a1ee8a500e 100644 (file)
@@ -2193,26 +2193,26 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &CurMF) {
                        : TPC->isGISelCSEEnabled();
 
   if (EnableCSE) {
-    EntryBuilder = make_unique<CSEMIRBuilder>(CurMF);
+    EntryBuilder = std::make_unique<CSEMIRBuilder>(CurMF);
     CSEInfo = &Wrapper.get(TPC->getCSEConfig());
     EntryBuilder->setCSEInfo(CSEInfo);
-    CurBuilder = make_unique<CSEMIRBuilder>(CurMF);
+    CurBuilder = std::make_unique<CSEMIRBuilder>(CurMF);
     CurBuilder->setCSEInfo(CSEInfo);
   } else {
-    EntryBuilder = make_unique<MachineIRBuilder>();
-    CurBuilder = make_unique<MachineIRBuilder>();
+    EntryBuilder = std::make_unique<MachineIRBuilder>();
+    CurBuilder = std::make_unique<MachineIRBuilder>();
   }
   CLI = MF->getSubtarget().getCallLowering();
   CurBuilder->setMF(*MF);
   EntryBuilder->setMF(*MF);
   MRI = &MF->getRegInfo();
   DL = &F.getParent()->getDataLayout();
-  ORE = llvm::make_unique<OptimizationRemarkEmitter>(&F);
+  ORE = std::make_unique<OptimizationRemarkEmitter>(&F);
   FuncInfo.MF = MF;
   FuncInfo.BPI = nullptr;
   const auto &TLI = *MF->getSubtarget().getTargetLowering();
   const TargetMachine &TM = MF->getTarget();
-  SL = make_unique<GISelSwitchLowering>(this, FuncInfo);
+  SL = std::make_unique<GISelSwitchLowering>(this, FuncInfo);
   SL->init(TLI, TM, *DL);
 
   EnableOpts = TM.getOptLevel() != CodeGenOpt::None && !skipFunction(F);
index b5b26bff34bbe38669952745d51e851da9e7aa8e..6391a5ee011c5d892db46059217d28d98b224cf2 100644 (file)
@@ -184,11 +184,11 @@ bool Legalizer::runOnMachineFunction(MachineFunction &MF) {
                        : TPC.isGISelCSEEnabled();
 
   if (EnableCSE) {
-    MIRBuilder = make_unique<CSEMIRBuilder>();
+    MIRBuilder = std::make_unique<CSEMIRBuilder>();
     CSEInfo = &Wrapper.get(TPC.getCSEConfig());
     MIRBuilder->setCSEInfo(CSEInfo);
   } else
-    MIRBuilder = make_unique<MachineIRBuilder>();
+    MIRBuilder = std::make_unique<MachineIRBuilder>();
   // This observer keeps the worklist updated.
   LegalizerWorkListManager WorkListObserver(InstList, ArtifactList);
   // We want both WorkListObserver as well as CSEInfo to observe all changes.
index 25bcfa91fa40412da7089488cc008a4d68675449..e69dc136096ea7c5303f245abc3fae50d0099ebd 100644 (file)
@@ -92,7 +92,7 @@ void RegBankSelect::init(MachineFunction &MF) {
     MBPI = nullptr;
   }
   MIRBuilder.setMF(MF);
-  MORE = llvm::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
+  MORE = std::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
 }
 
 void RegBankSelect::getAnalysisUsage(AnalysisUsage &AU) const {
index f9c1ec515dc5c365c4dc18bdd8624749ac93cb55..82eaa88abc78d279d4eeff89191fa211e0ccab8d 100644 (file)
@@ -283,7 +283,7 @@ RegisterBankInfo::getPartialMapping(unsigned StartIdx, unsigned Length,
   ++NumPartialMappingsCreated;
 
   auto &PartMapping = MapOfPartialMappings[Hash];
-  PartMapping = llvm::make_unique<PartialMapping>(StartIdx, Length, RegBank);
+  PartMapping = std::make_unique<PartialMapping>(StartIdx, Length, RegBank);
   return *PartMapping;
 }
 
@@ -317,7 +317,7 @@ RegisterBankInfo::getValueMapping(const PartialMapping *BreakDown,
   ++NumValueMappingsCreated;
 
   auto &ValMapping = MapOfValueMappings[Hash];
-  ValMapping = llvm::make_unique<ValueMapping>(BreakDown, NumBreakDowns);
+  ValMapping = std::make_unique<ValueMapping>(BreakDown, NumBreakDowns);
   return *ValMapping;
 }
 
@@ -341,7 +341,7 @@ RegisterBankInfo::getOperandsMapping(Iterator Begin, Iterator End) const {
   // mapping, because we use the pointer of the ValueMapping
   // to hash and we expect them to uniquely identify an instance
   // of value mapping.
-  Res = llvm::make_unique<ValueMapping[]>(std::distance(Begin, End));
+  Res = std::make_unique<ValueMapping[]>(std::distance(Begin, End));
   unsigned Idx = 0;
   for (Iterator It = Begin; It != End; ++It, ++Idx) {
     const ValueMapping *ValMap = *It;
@@ -391,7 +391,7 @@ RegisterBankInfo::getInstructionMappingImpl(
   ++NumInstructionMappingsCreated;
 
   auto &InstrMapping = MapOfInstructionMappings[Hash];
-  InstrMapping = llvm::make_unique<InstructionMapping>(
+  InstrMapping = std::make_unique<InstructionMapping>(
       ID, Cost, OperandsMapping, NumOperands);
   return *InstrMapping;
 }
index b17a253fe23fcd4463d50249e3c7f1ddb23bbe88..6f6581e360c17c6f84608ec67fbe05a3afdb7898 100644 (file)
@@ -1200,7 +1200,7 @@ void IfConverter::AnalyzeBlock(
           //   \ /
           //  TailBB
           // Note TailBB can be empty.
-          Tokens.push_back(llvm::make_unique<IfcvtToken>(
+          Tokens.push_back(std::make_unique<IfcvtToken>(
               BBI, ICDiamond, TNeedSub | FNeedSub, Dups, Dups2,
               (bool) TrueBBICalc.ClobbersPred, (bool) FalseBBICalc.ClobbersPred));
           Enqueued = true;
@@ -1218,7 +1218,7 @@ void IfConverter::AnalyzeBlock(
           //        / \ /   \
           //  FalseBB TrueBB FalseBB
           //
-          Tokens.push_back(llvm::make_unique<IfcvtToken>(
+          Tokens.push_back(std::make_unique<IfcvtToken>(
               BBI, ICForkedDiamond, TNeedSub | FNeedSub, Dups, Dups2,
               (bool) TrueBBICalc.ClobbersPred, (bool) FalseBBICalc.ClobbersPred));
           Enqueued = true;
@@ -1238,7 +1238,7 @@ void IfConverter::AnalyzeBlock(
       //   |  /
       //   FBB
       Tokens.push_back(
-          llvm::make_unique<IfcvtToken>(BBI, ICTriangle, TNeedSub, Dups));
+          std::make_unique<IfcvtToken>(BBI, ICTriangle, TNeedSub, Dups));
       Enqueued = true;
     }
 
@@ -1247,7 +1247,7 @@ void IfConverter::AnalyzeBlock(
                            TrueBBI.ExtraCost2, Prediction) &&
         FeasibilityAnalysis(TrueBBI, BBI.BrCond, true, true)) {
       Tokens.push_back(
-          llvm::make_unique<IfcvtToken>(BBI, ICTriangleRev, TNeedSub, Dups));
+          std::make_unique<IfcvtToken>(BBI, ICTriangleRev, TNeedSub, Dups));
       Enqueued = true;
     }
 
@@ -1263,7 +1263,7 @@ void IfConverter::AnalyzeBlock(
       //   |
       //   FBB
       Tokens.push_back(
-          llvm::make_unique<IfcvtToken>(BBI, ICSimple, TNeedSub, Dups));
+          std::make_unique<IfcvtToken>(BBI, ICSimple, TNeedSub, Dups));
       Enqueued = true;
     }
 
@@ -1275,7 +1275,7 @@ void IfConverter::AnalyzeBlock(
                              FalseBBI.NonPredSize + FalseBBI.ExtraCost,
                              FalseBBI.ExtraCost2, Prediction.getCompl()) &&
           FeasibilityAnalysis(FalseBBI, RevCond, true)) {
-        Tokens.push_back(llvm::make_unique<IfcvtToken>(BBI, ICTriangleFalse,
+        Tokens.push_back(std::make_unique<IfcvtToken>(BBI, ICTriangleFalse,
                                                        FNeedSub, Dups));
         Enqueued = true;
       }
@@ -1287,7 +1287,7 @@ void IfConverter::AnalyzeBlock(
                            FalseBBI.ExtraCost2, Prediction.getCompl()) &&
         FeasibilityAnalysis(FalseBBI, RevCond, true, true)) {
         Tokens.push_back(
-            llvm::make_unique<IfcvtToken>(BBI, ICTriangleFRev, FNeedSub, Dups));
+            std::make_unique<IfcvtToken>(BBI, ICTriangleFRev, FNeedSub, Dups));
         Enqueued = true;
       }
 
@@ -1297,7 +1297,7 @@ void IfConverter::AnalyzeBlock(
                              FalseBBI.ExtraCost2, Prediction.getCompl()) &&
           FeasibilityAnalysis(FalseBBI, RevCond)) {
         Tokens.push_back(
-            llvm::make_unique<IfcvtToken>(BBI, ICSimpleFalse, FNeedSub, Dups));
+            std::make_unique<IfcvtToken>(BBI, ICSimpleFalse, FNeedSub, Dups));
         Enqueued = true;
       }
     }
index 3a320d9243eff9f7641da07298797e566c4a12f1..7fb3fff5cb64615ce09a8b30fe01cf83f1da6a2d 100644 (file)
@@ -1145,7 +1145,7 @@ void HoistSpillHelper::addToMergeableSpills(MachineInstr &Spill, int StackSlot,
   // save a copy of LiveInterval in StackSlotToOrigLI because the original
   // LiveInterval may be cleared after all its references are spilled.
   if (StackSlotToOrigLI.find(StackSlot) == StackSlotToOrigLI.end()) {
-    auto LI = llvm::make_unique<LiveInterval>(OrigLI.reg, OrigLI.weight);
+    auto LI = std::make_unique<LiveInterval>(OrigLI.reg, OrigLI.weight);
     LI->assign(OrigLI, Allocator);
     StackSlotToOrigLI[StackSlot] = std::move(LI);
   }
index 886ae7e94adb53bc2e4333f3e5076fe2f8446965..cd70792146d2b1b5fbc73ac25e6d90775817ba30 100644 (file)
@@ -139,7 +139,7 @@ bool LLVMTargetMachine::addAsmPrinter(PassManagerBase &PM,
 
     std::unique_ptr<MCAsmBackend> MAB(
         getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions));
-    auto FOut = llvm::make_unique<formatted_raw_ostream>(Out);
+    auto FOut = std::make_unique<formatted_raw_ostream>(Out);
     MCStreamer *S = getTarget().createAsmStreamer(
         Context, std::move(FOut), Options.MCOptions.AsmVerbose,
         Options.MCOptions.MCUseDwarfDirectory, InstPrinter, std::move(MCE),
index 200ac0ba15bfbfa0df73c165e3db1cdd639b215c..cef5085ae07998006f2e15311d95431d8943b7aa 100644 (file)
@@ -73,18 +73,18 @@ LazyMachineBlockFrequencyInfoPass::calculateIfNotAvailable() const {
 
     if (!MDT) {
       LLVM_DEBUG(dbgs() << "Building DominatorTree on the fly\n");
-      OwnedMDT = make_unique<MachineDominatorTree>();
+      OwnedMDT = std::make_unique<MachineDominatorTree>();
       OwnedMDT->getBase().recalculate(*MF);
       MDT = OwnedMDT.get();
     }
 
     // Generate LoopInfo from it.
-    OwnedMLI = make_unique<MachineLoopInfo>();
+    OwnedMLI = std::make_unique<MachineLoopInfo>();
     OwnedMLI->getBase().analyze(MDT->getBase());
     MLI = OwnedMLI.get();
   }
 
-  OwnedMBFI = make_unique<MachineBlockFrequencyInfo>();
+  OwnedMBFI = std::make_unique<MachineBlockFrequencyInfo>();
   OwnedMBFI->calculate(*MF, MBPI, *MLI);
   return *OwnedMBFI.get();
 }
index 02a6e37b47734d8f227f469d1ca01c5d9ebb628c..3e0f51fb6d4fc95e91290aa3b7ee7dd21af90063 100644 (file)
@@ -1308,7 +1308,7 @@ bool LiveDebugValues::runOnMachineFunction(MachineFunction &MF) {
   TII = MF.getSubtarget().getInstrInfo();
   TFI = MF.getSubtarget().getFrameLowering();
   TFI->determineCalleeSaves(MF, CalleeSavedRegs,
-                            make_unique<RegScavenger>().get());
+                            std::make_unique<RegScavenger>().get());
   LS.initialize(MF);
 
   bool Changed = ExtendRanges(MF);
index afe48bfffe8508330275f131c42e0734a049d736..6ba8c48fceeba05c81ddfb4af127eca9ad372846 100644 (file)
@@ -570,7 +570,7 @@ UserValue *LDVImpl::getUserValue(const DILocalVariable *Var,
   }
 
   userValues.push_back(
-      llvm::make_unique<UserValue>(Var, Expr, DL, allocator));
+      std::make_unique<UserValue>(Var, Expr, DL, allocator));
   UserValue *UV = userValues.back().get();
   Leader = UserValue::merge(Leader, UV);
   return UV;
@@ -666,7 +666,7 @@ bool LDVImpl::handleDebugLabel(MachineInstr &MI, SlotIndex Idx) {
     }
   }
   if (!Found)
-    userLabels.push_back(llvm::make_unique<UserLabel>(Label, DL, Idx));
+    userLabels.push_back(std::make_unique<UserLabel>(Label, DL, Idx));
 
   return true;
 }
index a85a25cd709c74d48b90ad5c2bb629cd4f5cf966..f3dcb9c1214108700f3483813e4a0b306ce44488 100644 (file)
@@ -216,7 +216,7 @@ std::unique_ptr<Module> MIRParserImpl::parseIRModule() {
       return nullptr;
     // Create an empty module when the MIR file is empty.
     NoMIRDocuments = true;
-    return llvm::make_unique<Module>(Filename, Context);
+    return std::make_unique<Module>(Filename, Context);
   }
 
   std::unique_ptr<Module> M;
@@ -236,7 +236,7 @@ std::unique_ptr<Module> MIRParserImpl::parseIRModule() {
       NoMIRDocuments = true;
   } else {
     // Create an new, empty module.
-    M = llvm::make_unique<Module>(Filename, Context);
+    M = std::make_unique<Module>(Filename, Context);
     NoLLVMIR = true;
   }
   return M;
@@ -949,6 +949,6 @@ llvm::createMIRParser(std::unique_ptr<MemoryBuffer> Contents,
             "Can't read MIR with a Context that discards named Values")));
     return nullptr;
   }
-  return llvm::make_unique<MIRParser>(
-      llvm::make_unique<MIRParserImpl>(std::move(Contents), Filename, Context));
+  return std::make_unique<MIRParser>(
+      std::make_unique<MIRParserImpl>(std::move(Contents), Filename, Context));
 }
index bbef2598fb1df43e317e985b899932b223772226..4e48b810460b3c9f232e2d3ee434d00094d227c5 100644 (file)
@@ -3015,7 +3015,7 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) {
 
   F = &MF;
   MBPI = &getAnalysis<MachineBranchProbabilityInfo>();
-  MBFI = llvm::make_unique<BranchFolder::MBFIWrapper>(
+  MBFI = std::make_unique<BranchFolder::MBFIWrapper>(
       getAnalysis<MachineBlockFrequencyInfo>());
   MLI = &getAnalysis<MachineLoopInfo>();
   TII = MF.getSubtarget().getInstrInfo();
index e4172db4f8cfba6c12e38e04c2c75688d38b3b51..b771dd1a35156189bc37f449b9a8e1cf658749a5 100644 (file)
@@ -200,7 +200,7 @@ void MachineFunction::init() {
          "Target-incompatible DataLayout attached\n");
 
   PSVManager =
-    llvm::make_unique<PseudoSourceValueManager>(*(getSubtarget().
+    std::make_unique<PseudoSourceValueManager>(*(getSubtarget().
                                                   getInstrInfo()));
 }
 
index 2c141d0373fb2fd99031d8dc088a9bfde5725fce..7316148e4c03590a168290ba5b0792e0cb1875c2 100644 (file)
@@ -1725,7 +1725,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
       MFI = &MF->getFrameInfo();
       Context = &MF->getFunction().getContext();
     } else {
-      CtxPtr = llvm::make_unique<LLVMContext>();
+      CtxPtr = std::make_unique<LLVMContext>();
       Context = CtxPtr.get();
     }
 
index 27db9106b3374cbd3fad71bbdd75abd29989b9e0..b82403ae1b850ed4b1e724a7462b16de3c116729 100644 (file)
@@ -76,7 +76,7 @@ bool MachineOptimizationRemarkEmitterPass::runOnMachineFunction(
   else
     MBFI = nullptr;
 
-  ORE = llvm::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
+  ORE = std::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
   return false;
 }
 
index 3d599b4cab13440486f6d80c11f8bcdb349e7b26..ea322bf0d2d47d3af5b18c08919b8e8501ef3537 100644 (file)
@@ -1538,14 +1538,14 @@ namespace llvm {
 std::unique_ptr<ScheduleDAGMutation>
 createLoadClusterDAGMutation(const TargetInstrInfo *TII,
                              const TargetRegisterInfo *TRI) {
-  return EnableMemOpCluster ? llvm::make_unique<LoadClusterMutation>(TII, TRI)
+  return EnableMemOpCluster ? std::make_unique<LoadClusterMutation>(TII, TRI)
                             : nullptr;
 }
 
 std::unique_ptr<ScheduleDAGMutation>
 createStoreClusterDAGMutation(const TargetInstrInfo *TII,
                               const TargetRegisterInfo *TRI) {
-  return EnableMemOpCluster ? llvm::make_unique<StoreClusterMutation>(TII, TRI)
+  return EnableMemOpCluster ? std::make_unique<StoreClusterMutation>(TII, TRI)
                             : nullptr;
 }
 
@@ -1657,7 +1657,7 @@ namespace llvm {
 std::unique_ptr<ScheduleDAGMutation>
 createCopyConstrainDAGMutation(const TargetInstrInfo *TII,
                                const TargetRegisterInfo *TRI) {
-  return llvm::make_unique<CopyConstrain>(TII, TRI);
+  return std::make_unique<CopyConstrain>(TII, TRI);
 }
 
 } // end namespace llvm
@@ -3297,7 +3297,7 @@ void GenericScheduler::schedNode(SUnit *SU, bool IsTopNode) {
 /// default scheduler if the target does not set a default.
 ScheduleDAGMILive *llvm::createGenericSchedLive(MachineSchedContext *C) {
   ScheduleDAGMILive *DAG =
-      new ScheduleDAGMILive(C, llvm::make_unique<GenericScheduler>(C));
+      new ScheduleDAGMILive(C, std::make_unique<GenericScheduler>(C));
   // Register DAG post-processors.
   //
   // FIXME: extend the mutation API to allow earlier mutations to instantiate
@@ -3449,7 +3449,7 @@ void PostGenericScheduler::schedNode(SUnit *SU, bool IsTopNode) {
 }
 
 ScheduleDAGMI *llvm::createGenericSchedPostRA(MachineSchedContext *C) {
-  return new ScheduleDAGMI(C, llvm::make_unique<PostGenericScheduler>(C),
+  return new ScheduleDAGMI(C, std::make_unique<PostGenericScheduler>(C),
                            /*RemoveKillFlags=*/true);
 }
 
@@ -3560,10 +3560,10 @@ public:
 } // end anonymous namespace
 
 static ScheduleDAGInstrs *createILPMaxScheduler(MachineSchedContext *C) {
-  return new ScheduleDAGMILive(C, llvm::make_unique<ILPScheduler>(true));
+  return new ScheduleDAGMILive(C, std::make_unique<ILPScheduler>(true));
 }
 static ScheduleDAGInstrs *createILPMinScheduler(MachineSchedContext *C) {
-  return new ScheduleDAGMILive(C, llvm::make_unique<ILPScheduler>(false));
+  return new ScheduleDAGMILive(C, std::make_unique<ILPScheduler>(false));
 }
 
 static MachineSchedRegistry ILPMaxRegistry(
@@ -3657,7 +3657,7 @@ static ScheduleDAGInstrs *createInstructionShuffler(MachineSchedContext *C) {
   assert((TopDown || !ForceTopDown) &&
          "-misched-topdown incompatible with -misched-bottomup");
   return new ScheduleDAGMILive(
-      C, llvm::make_unique<InstructionShuffler>(Alternate, TopDown));
+      C, std::make_unique<InstructionShuffler>(Alternate, TopDown));
 }
 
 static MachineSchedRegistry ShufflerRegistry(
index 2db1e86905a482cf386af4b70b0576581e673ee8..d21eae222af031a7e6ab67d560c788a2a89e1ea9 100644 (file)
@@ -176,7 +176,7 @@ std::unique_ptr<ScheduleDAGMutation>
 llvm::createMacroFusionDAGMutation(
      ShouldSchedulePredTy shouldScheduleAdjacent) {
   if(EnableMacroFusion)
-    return llvm::make_unique<MacroFusion>(shouldScheduleAdjacent, true);
+    return std::make_unique<MacroFusion>(shouldScheduleAdjacent, true);
   return nullptr;
 }
 
@@ -184,6 +184,6 @@ std::unique_ptr<ScheduleDAGMutation>
 llvm::createBranchMacroFusionDAGMutation(
      ShouldSchedulePredTy shouldScheduleAdjacent) {
   if(EnableMacroFusion)
-    return llvm::make_unique<MacroFusion>(shouldScheduleAdjacent, false);
+    return std::make_unique<MacroFusion>(shouldScheduleAdjacent, false);
   return nullptr;
 }
index da3ef4b771f316c21411ec4a0c09d5813335e260..74e721dbd138865f0d21eb20a55757441e3a3edc 100644 (file)
@@ -129,7 +129,7 @@ const PseudoSourceValue *
 PseudoSourceValueManager::getFixedStack(int FI) {
   std::unique_ptr<FixedStackPseudoSourceValue> &V = FSValues[FI];
   if (!V)
-    V = llvm::make_unique<FixedStackPseudoSourceValue>(FI, TII);
+    V = std::make_unique<FixedStackPseudoSourceValue>(FI, TII);
   return V.get();
 }
 
@@ -138,7 +138,7 @@ PseudoSourceValueManager::getGlobalValueCallEntry(const GlobalValue *GV) {
   std::unique_ptr<const GlobalValuePseudoSourceValue> &E =
       GlobalCallEntries[GV];
   if (!E)
-    E = llvm::make_unique<GlobalValuePseudoSourceValue>(GV, TII);
+    E = std::make_unique<GlobalValuePseudoSourceValue>(GV, TII);
   return E.get();
 }
 
@@ -147,6 +147,6 @@ PseudoSourceValueManager::getExternalSymbolCallEntry(const char *ES) {
   std::unique_ptr<const ExternalSymbolPseudoSourceValue> &E =
       ExternalCallEntries[ES];
   if (!E)
-    E = llvm::make_unique<ExternalSymbolPseudoSourceValue>(ES, TII);
+    E = std::make_unique<ExternalSymbolPseudoSourceValue>(ES, TII);
   return E.get();
 }
index 217947e0c9ccb16b04594ed1f2e4f9a915024e3a..3c4a46b12f992e9add6e2350e6a33cdae0efe251 100644 (file)
@@ -824,11 +824,11 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
   if (!VRegsToAlloc.empty()) {
     const TargetSubtargetInfo &Subtarget = MF.getSubtarget();
     std::unique_ptr<PBQPRAConstraintList> ConstraintsRoot =
-      llvm::make_unique<PBQPRAConstraintList>();
-    ConstraintsRoot->addConstraint(llvm::make_unique<SpillCosts>());
-    ConstraintsRoot->addConstraint(llvm::make_unique<Interference>());
+      std::make_unique<PBQPRAConstraintList>();
+    ConstraintsRoot->addConstraint(std::make_unique<SpillCosts>());
+    ConstraintsRoot->addConstraint(std::make_unique<Interference>());
     if (PBQPCoalescing)
-      ConstraintsRoot->addConstraint(llvm::make_unique<Coalescing>());
+      ConstraintsRoot->addConstraint(std::make_unique<Coalescing>());
     ConstraintsRoot->addConstraint(Subtarget.getCustomPBQPConstraints());
 
     bool PBQPAllocComplete = false;
index 0072e33f23b7bca8b74218c9411c07878bc70d57..bfcf30b430b6d41a567c5e3dca56e674d82b2882 100644 (file)
@@ -426,7 +426,7 @@ public:
   SelectionDAGBuilder(SelectionDAG &dag, FunctionLoweringInfo &funcinfo,
                       SwiftErrorValueTracking &swifterror, CodeGenOpt::Level ol)
       : SDNodeOrder(LowestSDNodeOrder), TM(dag.getTarget()), DAG(dag),
-        SL(make_unique<SDAGSwitchLowering>(this, funcinfo)), FuncInfo(funcinfo),
+        SL(std::make_unique<SDAGSwitchLowering>(this, funcinfo)), FuncInfo(funcinfo),
         SwiftError(swifterror) {}
 
   void init(GCFunctionInfo *gfi, AliasAnalysis *AA,
index 434dc3a62ca3386ec8c68bc2c80602d748e9f9e4..c8fac8fbdcc6f34bedf23cf63e0deb11cf46965a 100644 (file)
@@ -436,7 +436,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
   RegInfo = &MF->getRegInfo();
   LibInfo = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
   GFI = Fn.hasGC() ? &getAnalysis<GCModuleInfo>().getFunctionInfo(Fn) : nullptr;
-  ORE = make_unique<OptimizationRemarkEmitter>(&Fn);
+  ORE = std::make_unique<OptimizationRemarkEmitter>(&Fn);
   auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>();
   DominatorTree *DT = DTWP ? &DTWP->getDomTree() : nullptr;
   auto *LIWP = getAnalysisIfAvailable<LoopInfoWrapperPass>();
index 36df02692f865fe3920071694bf25a498c7effc6..953d307cf598200e1a2260418c59b7db7fc169f4 100644 (file)
@@ -1231,5 +1231,5 @@ bool TargetPassConfig::isGISelCSEEnabled() const {
 }
 
 std::unique_ptr<CSEConfigBase> TargetPassConfig::getCSEConfig() const {
-  return make_unique<CSEConfigBase>();
+  return std::make_unique<CSEConfigBase>();
 }
index b18eb9f598954b8b534afc6f4cf3e83282e381ff..770f129753eca127604b2b7d35009be2d10575b1 100644 (file)
@@ -660,7 +660,7 @@ const DWARFUnitIndex &DWARFContext::getCUIndex() {
 
   DataExtractor CUIndexData(DObj->getCUIndexSection(), isLittleEndian(), 0);
 
-  CUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_INFO);
+  CUIndex = std::make_unique<DWARFUnitIndex>(DW_SECT_INFO);
   CUIndex->parse(CUIndexData);
   return *CUIndex;
 }
@@ -671,7 +671,7 @@ const DWARFUnitIndex &DWARFContext::getTUIndex() {
 
   DataExtractor TUIndexData(DObj->getTUIndexSection(), isLittleEndian(), 0);
 
-  TUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_TYPES);
+  TUIndex = std::make_unique<DWARFUnitIndex>(DW_SECT_TYPES);
   TUIndex->parse(TUIndexData);
   return *TUIndex;
 }
@@ -681,7 +681,7 @@ DWARFGdbIndex &DWARFContext::getGdbIndex() {
     return *GdbIndex;
 
   DataExtractor GdbIndexData(DObj->getGdbIndexSection(), true /*LE*/, 0);
-  GdbIndex = llvm::make_unique<DWARFGdbIndex>();
+  GdbIndex = std::make_unique<DWARFGdbIndex>();
   GdbIndex->parse(GdbIndexData);
   return *GdbIndex;
 }
@@ -1803,16 +1803,16 @@ std::unique_ptr<DWARFContext>
 DWARFContext::create(const object::ObjectFile &Obj, const LoadedObjectInfo *L,
                      function_ref<ErrorPolicy(Error)> HandleError,
                      std::string DWPName) {
-  auto DObj = llvm::make_unique<DWARFObjInMemory>(Obj, L, HandleError);
-  return llvm::make_unique<DWARFContext>(std::move(DObj), std::move(DWPName));
+  auto DObj = std::make_unique<DWARFObjInMemory>(Obj, L, HandleError);
+  return std::make_unique<DWARFContext>(std::move(DObj), std::move(DWPName));
 }
 
 std::unique_ptr<DWARFContext>
 DWARFContext::create(const StringMap<std::unique_ptr<MemoryBuffer>> &Sections,
                      uint8_t AddrSize, bool isLittleEndian) {
   auto DObj =
-      llvm::make_unique<DWARFObjInMemory>(Sections, AddrSize, isLittleEndian);
-  return llvm::make_unique<DWARFContext>(std::move(DObj), "");
+      std::make_unique<DWARFObjInMemory>(Sections, AddrSize, isLittleEndian);
+  return std::make_unique<DWARFContext>(std::move(DObj), "");
 }
 
 Error DWARFContext::loadRegisterInfo(const object::ObjectFile &Obj) {
index c073a1695444206603f27b6bafe529dab8682a92..81b00f65741b584b70e65c4b407ccf26a7471d90 100644 (file)
@@ -461,7 +461,7 @@ void DWARFDebugFrame::parse(DWARFDataExtractor Data) {
         }
       }
 
-      auto Cie = llvm::make_unique<CIE>(
+      auto Cie = std::make_unique<CIE>(
           StartOffset, Length, Version, AugmentationString, AddressSize,
           SegmentDescriptorSize, CodeAlignmentFactor, DataAlignmentFactor,
           ReturnAddressRegister, AugmentationData, FDEPointerEncoding,
index cc5a8d77ebc26719d341c9b5cc5b914af0ec458e..833377e14bb119bf1a9ae72b18a5b6dd6cdc2f5b 100644 (file)
@@ -83,11 +83,11 @@ void DWARFUnitVector::addUnitsImpl(
         return nullptr;
       std::unique_ptr<DWARFUnit> U;
       if (Header.isTypeUnit())
-        U = llvm::make_unique<DWARFTypeUnit>(Context, InfoSection, Header, DA,
+        U = std::make_unique<DWARFTypeUnit>(Context, InfoSection, Header, DA,
                                              RS, LocSection, SS, SOS, AOS, LS,
                                              LE, IsDWO, *this);
       else
-        U = llvm::make_unique<DWARFCompileUnit>(Context, InfoSection, Header,
+        U = std::make_unique<DWARFCompileUnit>(Context, InfoSection, Header,
                                                 DA, RS, LocSection, SS, SOS,
                                                 AOS, LS, LE, IsDWO, *this);
       return U;
index 7d0691dc4b27d1c82d2e09a1743158ceb0b4505b..f29c1e6cc5c74985b9423073c6e411559bf83850 100644 (file)
@@ -54,10 +54,10 @@ bool DWARFUnitIndex::parseImpl(DataExtractor IndexData) {
                       (2 * Header.NumUnits + 1) * 4 * Header.NumColumns))
     return false;
 
-  Rows = llvm::make_unique<Entry[]>(Header.NumBuckets);
+  Rows = std::make_unique<Entry[]>(Header.NumBuckets);
   auto Contribs =
-      llvm::make_unique<Entry::SectionContribution *[]>(Header.NumUnits);
-  ColumnKinds = llvm::make_unique<DWARFSectionKind[]>(Header.NumColumns);
+      std::make_unique<Entry::SectionContribution *[]>(Header.NumUnits);
+  ColumnKinds = std::make_unique<DWARFSectionKind[]>(Header.NumColumns);
 
   // Read Hash Table of Signatures
   for (unsigned i = 0; i != Header.NumBuckets; ++i)
@@ -70,7 +70,7 @@ bool DWARFUnitIndex::parseImpl(DataExtractor IndexData) {
       continue;
     Rows[i].Index = this;
     Rows[i].Contributions =
-        llvm::make_unique<Entry::SectionContribution[]>(Header.NumColumns);
+        std::make_unique<Entry::SectionContribution[]>(Header.NumColumns);
     Contribs[Index - 1] = Rows[i].Contributions.get();
   }
 
index 16fbcac4bfce4523ad007c6c3d5c4c838b730466..8ea27402bc4f6c2779492de38f898a4f14f3837a 100644 (file)
@@ -294,7 +294,7 @@ unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S,
       switch (UnitType) {
       case dwarf::DW_UT_type:
       case dwarf::DW_UT_split_type: {
-        Unit = TypeUnitVector.addUnit(llvm::make_unique<DWARFTypeUnit>(
+        Unit = TypeUnitVector.addUnit(std::make_unique<DWARFTypeUnit>(
             DCtx, S, Header, DCtx.getDebugAbbrev(), &DObj.getRangesSection(),
             &DObj.getLocSection(), DObj.getStrSection(),
             DObj.getStrOffsetsSection(), &DObj.getAppleObjCSection(),
@@ -308,7 +308,7 @@ unsigned DWARFVerifier::verifyUnitSection(const DWARFSection &S,
       case dwarf::DW_UT_partial:
       // UnitType = 0 means that we are verifying a compile unit in DWARF v4.
       case 0: {
-        Unit = CompileUnitVector.addUnit(llvm::make_unique<DWARFCompileUnit>(
+        Unit = CompileUnitVector.addUnit(std::make_unique<DWARFCompileUnit>(
             DCtx, S, Header, DCtx.getDebugAbbrev(), &DObj.getRangesSection(),
             &DObj.getLocSection(), DObj.getStrSection(),
             DObj.getStrOffsetsSection(), &DObj.getAppleObjCSection(),
index df925771f0d94d64c7be5c73a967d4b1a67fcc53..5dc9c86b34fd6f48dd55b0f21c52a9a646cc7ddb 100644 (file)
@@ -52,7 +52,7 @@ MappedBlockStream::MappedBlockStream(uint32_t BlockSize,
 std::unique_ptr<MappedBlockStream> MappedBlockStream::createStream(
     uint32_t BlockSize, const MSFStreamLayout &Layout, BinaryStreamRef MsfData,
     BumpPtrAllocator &Allocator) {
-  return llvm::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
+  return std::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
       BlockSize, Layout, MsfData, Allocator);
 }
 
@@ -63,7 +63,7 @@ std::unique_ptr<MappedBlockStream> MappedBlockStream::createIndexedStream(
   MSFStreamLayout SL;
   SL.Blocks = Layout.StreamMap[StreamIndex];
   SL.Length = Layout.StreamSizes[StreamIndex];
-  return llvm::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
+  return std::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
       Layout.SB->BlockSize, SL, MsfData, Allocator);
 }
 
@@ -318,7 +318,7 @@ WritableMappedBlockStream::createStream(uint32_t BlockSize,
                                         const MSFStreamLayout &Layout,
                                         WritableBinaryStreamRef MsfData,
                                         BumpPtrAllocator &Allocator) {
-  return llvm::make_unique<MappedBlockStreamImpl<WritableMappedBlockStream>>(
+  return std::make_unique<MappedBlockStreamImpl<WritableMappedBlockStream>>(
       BlockSize, Layout, MsfData, Allocator);
 }
 
index a8ae076e1d6c2c0082d170294bfceafda56ab3ef..c2552f55703ce2a3e147e394a6ebafc864e3ff6c 100644 (file)
@@ -405,7 +405,7 @@ DIARawSymbol::findChildren(PDB_SymType Type) const {
       return nullptr;
   }
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -423,7 +423,7 @@ DIARawSymbol::findChildren(PDB_SymType Type, StringRef Name,
       Symbol->findChildrenEx(EnumVal, Name16Str, CompareFlags, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -443,7 +443,7 @@ DIARawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name,
                                            Section, Offset, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -462,7 +462,7 @@ DIARawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name,
                                          &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -480,7 +480,7 @@ DIARawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
                                           &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -489,7 +489,7 @@ DIARawSymbol::findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const {
   if (S_OK != Symbol->findInlineFramesByAddr(Section, Offset, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -498,7 +498,7 @@ DIARawSymbol::findInlineFramesByRVA(uint32_t RVA) const {
   if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumSymbols>
@@ -507,7 +507,7 @@ DIARawSymbol::findInlineFramesByVA(uint64_t VA) const {
   if (S_OK != Symbol->findInlineFramesByVA(VA, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
+  return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
@@ -515,7 +515,7 @@ std::unique_ptr<IPDBEnumLineNumbers> DIARawSymbol::findInlineeLines() const {
   if (S_OK != Symbol->findInlineeLines(&DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
+  return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -526,7 +526,7 @@ DIARawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
       Symbol->findInlineeLinesByAddr(Section, Offset, Length, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
+  return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -535,7 +535,7 @@ DIARawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const {
   if (S_OK != Symbol->findInlineeLinesByRVA(RVA, Length, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
+  return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -544,7 +544,7 @@ DIARawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
   if (S_OK != Symbol->findInlineeLinesByVA(VA, Length, &DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
+  return std::make_unique<DIAEnumLineNumbers>(DiaEnumerator);
 }
 
 void DIARawSymbol::getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes) const {
@@ -776,7 +776,7 @@ std::unique_ptr<IPDBLineNumber> DIARawSymbol::getSrcLineOnTypeDefn() const {
   if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
     return nullptr;
 
-  return llvm::make_unique<DIALineNumber>(LineNumber);
+  return std::make_unique<DIALineNumber>(LineNumber);
 }
 
 uint32_t DIARawSymbol::getStride() const {
@@ -871,7 +871,7 @@ DIARawSymbol::getVirtualBaseTableType() const {
   if (FAILED(Symbol->get_virtualBaseTableType(&TableType)) || !TableType)
     return nullptr;
 
-  auto RawVT = llvm::make_unique<DIARawSymbol>(Session, TableType);
+  auto RawVT = std::make_unique<DIARawSymbol>(Session, TableType);
   auto Pointer =
       PDBSymbol::createAs<PDBSymbolTypePointer>(Session, std::move(RawVT));
   return unique_dyn_cast<PDBSymbolTypeBuiltin>(Pointer->getPointeeType());
index e2d928f2c4b2032f4fb728c4edae1844808ae7f8..4f0e078e6712cf18f755b9ae453328289a8d4619 100644 (file)
@@ -23,7 +23,7 @@ std::unique_ptr<PDBSymbolCompiland> DIASectionContrib::getCompiland() const {
   if (FAILED(Section->get_compiland(&Symbol)))
     return nullptr;
 
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(Session, Symbol);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(Session, Symbol);
   return PDBSymbol::createAs<PDBSymbolCompiland>(Session, std::move(RawSymbol));
 }
 
index 2544a88905617cfb1471570860a505c3abba28e1..64ffa776bbd6f8c7c9056e5df2531278d1569223 100644 (file)
@@ -150,7 +150,7 @@ std::unique_ptr<PDBSymbolExe> DIASession::getGlobalScope() {
   if (S_OK != Session->get_globalScope(&GlobalScope))
     return nullptr;
 
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, GlobalScope);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(*this, GlobalScope);
   auto PdbSymbol(PDBSymbol::create(*this, std::move(RawSymbol)));
   std::unique_ptr<PDBSymbolExe> ExeSymbol(
       static_cast<PDBSymbolExe *>(PdbSymbol.release()));
@@ -185,7 +185,7 @@ DIASession::getSymbolById(SymIndexId SymbolId) const {
   if (S_OK != Session->symbolById(SymbolId, &LocatedSymbol))
     return nullptr;
 
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, LocatedSymbol);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(*this, LocatedSymbol);
   return PDBSymbol::create(*this, std::move(RawSymbol));
 }
 
@@ -202,7 +202,7 @@ DIASession::findSymbolByAddress(uint64_t Address, PDB_SymType Type) const {
     if (S_OK != Session->findSymbolByRVA(RVA, EnumVal, &Symbol))
       return nullptr;
   }
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, Symbol);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(*this, Symbol);
   return PDBSymbol::create(*this, std::move(RawSymbol));
 }
 
@@ -214,7 +214,7 @@ std::unique_ptr<PDBSymbol> DIASession::findSymbolByRVA(uint32_t RVA,
   if (S_OK != Session->findSymbolByRVA(RVA, EnumVal, &Symbol))
     return nullptr;
 
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, Symbol);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(*this, Symbol);
   return PDBSymbol::create(*this, std::move(RawSymbol));
 }
 
@@ -227,7 +227,7 @@ DIASession::findSymbolBySectOffset(uint32_t Sect, uint32_t Offset,
   if (S_OK != Session->findSymbolByAddr(Sect, Offset, EnumVal, &Symbol))
     return nullptr;
 
-  auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, Symbol);
+  auto RawSymbol = std::make_unique<DIARawSymbol>(*this, Symbol);
   return PDBSymbol::create(*this, std::move(RawSymbol));
 }
 
@@ -243,7 +243,7 @@ DIASession::findLineNumbers(const PDBSymbolCompiland &Compiland,
                                  RawFile.getDiaFile(), &LineNumbers))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(LineNumbers);
+  return std::make_unique<DIAEnumLineNumbers>(LineNumbers);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -257,7 +257,7 @@ DIASession::findLineNumbersByAddress(uint64_t Address, uint32_t Length) const {
     if (S_OK != Session->findLinesByRVA(RVA, Length, &LineNumbers))
       return nullptr;
   }
-  return llvm::make_unique<DIAEnumLineNumbers>(LineNumbers);
+  return std::make_unique<DIAEnumLineNumbers>(LineNumbers);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -266,7 +266,7 @@ DIASession::findLineNumbersByRVA(uint32_t RVA, uint32_t Length) const {
   if (S_OK != Session->findLinesByRVA(RVA, Length, &LineNumbers))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(LineNumbers);
+  return std::make_unique<DIAEnumLineNumbers>(LineNumbers);
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
@@ -276,7 +276,7 @@ DIASession::findLineNumbersBySectOffset(uint32_t Section, uint32_t Offset,
   if (S_OK != Session->findLinesByAddr(Section, Offset, Length, &LineNumbers))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumLineNumbers>(LineNumbers);
+  return std::make_unique<DIAEnumLineNumbers>(LineNumbers);
 }
 
 std::unique_ptr<IPDBEnumSourceFiles>
@@ -298,7 +298,7 @@ DIASession::findSourceFiles(const PDBSymbolCompiland *Compiland,
   if (S_OK !=
       Session->findFile(DiaCompiland, Utf16Pattern.m_str, Flags, &SourceFiles))
     return nullptr;
-  return llvm::make_unique<DIAEnumSourceFiles>(*this, SourceFiles);
+  return std::make_unique<DIAEnumSourceFiles>(*this, SourceFiles);
 }
 
 std::unique_ptr<IPDBSourceFile>
@@ -334,7 +334,7 @@ std::unique_ptr<IPDBEnumSourceFiles> DIASession::getAllSourceFiles() const {
   if (S_OK != Session->findFile(nullptr, nullptr, nsNone, &Files))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSourceFiles>(*this, Files);
+  return std::make_unique<DIAEnumSourceFiles>(*this, Files);
 }
 
 std::unique_ptr<IPDBEnumSourceFiles> DIASession::getSourceFilesForCompiland(
@@ -347,7 +347,7 @@ std::unique_ptr<IPDBEnumSourceFiles> DIASession::getSourceFilesForCompiland(
       Session->findFile(RawSymbol.getDiaSymbol(), nullptr, nsNone, &Files))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSourceFiles>(*this, Files);
+  return std::make_unique<DIAEnumSourceFiles>(*this, Files);
 }
 
 std::unique_ptr<IPDBSourceFile>
@@ -356,7 +356,7 @@ DIASession::getSourceFileById(uint32_t FileId) const {
   if (S_OK != Session->findFileById(FileId, &LocatedFile))
     return nullptr;
 
-  return llvm::make_unique<DIASourceFile>(*this, LocatedFile);
+  return std::make_unique<DIASourceFile>(*this, LocatedFile);
 }
 
 std::unique_ptr<IPDBEnumDataStreams> DIASession::getDebugStreams() const {
@@ -364,7 +364,7 @@ std::unique_ptr<IPDBEnumDataStreams> DIASession::getDebugStreams() const {
   if (S_OK != Session->getEnumDebugStreams(&DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumDebugStreams>(DiaEnumerator);
+  return std::make_unique<DIAEnumDebugStreams>(DiaEnumerator);
 }
 
 std::unique_ptr<IPDBEnumTables> DIASession::getEnumTables() const {
@@ -372,7 +372,7 @@ std::unique_ptr<IPDBEnumTables> DIASession::getEnumTables() const {
   if (S_OK != Session->getEnumTables(&DiaEnumerator))
     return nullptr;
 
-  return llvm::make_unique<DIAEnumTables>(DiaEnumerator);
+  return std::make_unique<DIAEnumTables>(DiaEnumerator);
 }
 
 template <class T> static CComPtr<T> getTableEnumerator(IDiaSession &Session) {
@@ -399,7 +399,7 @@ DIASession::getInjectedSources() const {
   if (!Files)
     return nullptr;
 
-  return llvm::make_unique<DIAEnumInjectedSources>(Files);
+  return std::make_unique<DIAEnumInjectedSources>(Files);
 }
 
 std::unique_ptr<IPDBEnumSectionContribs>
@@ -409,7 +409,7 @@ DIASession::getSectionContribs() const {
   if (!Sections)
     return nullptr;
 
-  return llvm::make_unique<DIAEnumSectionContribs>(*this, Sections);
+  return std::make_unique<DIAEnumSectionContribs>(*this, Sections);
 }
 
 std::unique_ptr<IPDBEnumFrameData>
@@ -419,5 +419,5 @@ DIASession::getFrameData() const {
   if (!FD)
     return nullptr;
 
-  return llvm::make_unique<DIAEnumFrameData>(FD);
+  return std::make_unique<DIAEnumFrameData>(FD);
 }
index 20b6c61425478b9860cc879c5a5cc78e84a47e84..419734771ccd55581e48411b42193d3dd34b9280 100644 (file)
@@ -180,12 +180,12 @@ Error DbiModuleDescriptorBuilder::commit(BinaryStreamWriter &ModiWriter,
 void DbiModuleDescriptorBuilder::addDebugSubsection(
     std::shared_ptr<DebugSubsection> Subsection) {
   assert(Subsection);
-  C13Builders.push_back(llvm::make_unique<DebugSubsectionRecordBuilder>(
+  C13Builders.push_back(std::make_unique<DebugSubsectionRecordBuilder>(
       std::move(Subsection), CodeViewContainer::Pdb));
 }
 
 void DbiModuleDescriptorBuilder::addDebugSubsection(
     const DebugSubsectionRecord &SubsectionContents) {
-  C13Builders.push_back(llvm::make_unique<DebugSubsectionRecordBuilder>(
+  C13Builders.push_back(std::make_unique<DebugSubsectionRecordBuilder>(
       SubsectionContents, CodeViewContainer::Pdb));
 }
index b7ade0072ee5a884809967c0b21a1295d05fa542..0e00c2f7ff98ccde21966ac3c546d1b094eda3cd 100644 (file)
@@ -114,7 +114,7 @@ Expected<DbiModuleDescriptorBuilder &>
 DbiStreamBuilder::addModuleInfo(StringRef ModuleName) {
   uint32_t Index = ModiList.size();
   ModiList.push_back(
-      llvm::make_unique<DbiModuleDescriptorBuilder>(ModuleName, Index, Msf));
+      std::make_unique<DbiModuleDescriptorBuilder>(ModuleName, Index, Msf));
   return *ModiList.back();
 }
 
index 8ed5b8b44c592c1b055bbefe5ffc4bf8edca227d..432f1e9b24d3a80b7feaf1d6f1be5cbaa5cd6b3b 100644 (file)
@@ -183,8 +183,8 @@ void GSIHashStreamBuilder::finalizeBuckets(uint32_t RecordZeroOffset) {
 }
 
 GSIStreamBuilder::GSIStreamBuilder(msf::MSFBuilder &Msf)
-    : Msf(Msf), PSH(llvm::make_unique<GSIHashStreamBuilder>()),
-      GSH(llvm::make_unique<GSIHashStreamBuilder>()) {}
+    : Msf(Msf), PSH(std::make_unique<GSIHashStreamBuilder>()),
+      GSH(std::make_unique<GSIHashStreamBuilder>()) {}
 
 GSIStreamBuilder::~GSIStreamBuilder() {}
 
index f17ff5bb01f215fa327a7ac8205db5379820e6bf..065bb2c401e0c095ed5b081167c625ed0b2a12f5 100644 (file)
@@ -104,14 +104,14 @@ std::unique_ptr<IPDBInjectedSource>
 NativeEnumInjectedSources::getChildAtIndex(uint32_t N) const {
   if (N >= getChildCount())
     return nullptr;
-  return make_unique<NativeInjectedSource>(std::next(Stream.begin(), N)->second,
+  return std::make_unique<NativeInjectedSource>(std::next(Stream.begin(), N)->second,
                                            File, Strings);
 }
 
 std::unique_ptr<IPDBInjectedSource> NativeEnumInjectedSources::getNext() {
   if (Cur == Stream.end())
     return nullptr;
-  return make_unique<NativeInjectedSource>((Cur++)->second, File, Strings);
+  return std::make_unique<NativeInjectedSource>((Cur++)->second, File, Strings);
 }
 
 void NativeEnumInjectedSources::reset() { Cur = Stream.begin(); }
index 8e43cf24495a1ae33fb9f0baf290a0fd65650c4d..2ad552470b617e5b4703b62224c671c190d0f2bc 100644 (file)
@@ -30,68 +30,68 @@ void NativeRawSymbol::dump(raw_ostream &OS, int Indent,
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findChildren(PDB_SymType Type) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findChildren(PDB_SymType Type, StringRef Name,
     PDB_NameSearchFlags Flags) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name,
     PDB_NameSearchFlags Flags, uint32_t Section, uint32_t Offset) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name,
    PDB_NameSearchFlags Flags, uint64_t VA) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
     PDB_NameSearchFlags Flags, uint32_t RVA) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findInlineFramesByAddr(uint32_t Section,
                                         uint32_t Offset) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findInlineFramesByRVA(uint32_t RVA) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumSymbols>
 NativeRawSymbol::findInlineFramesByVA(uint64_t VA) const {
-  return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+  return std::make_unique<NullEnumerator<PDBSymbol>>();
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
 NativeRawSymbol::findInlineeLines() const {
-  return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
+  return std::make_unique<NullEnumerator<IPDBLineNumber>>();
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
 NativeRawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
                                         uint32_t Length) const {
-  return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
+  return std::make_unique<NullEnumerator<IPDBLineNumber>>();
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
 NativeRawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const {
-  return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
+  return std::make_unique<NullEnumerator<IPDBLineNumber>>();
 }
 
 std::unique_ptr<IPDBEnumLineNumbers>
 NativeRawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
-  return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
+  return std::make_unique<NullEnumerator<IPDBLineNumber>>();
 }
 
 void NativeRawSymbol::getDataBytes(SmallVector<uint8_t, 32> &bytes) const {
index 8a49cb1c5963e4df7e6c322e9f89e093c2795a54..b45a5881dcb5ca0a3449aeca555900792c77acbf 100644 (file)
@@ -59,18 +59,18 @@ NativeSession::~NativeSession() = default;
 Error NativeSession::createFromPdb(std::unique_ptr<MemoryBuffer> Buffer,
                                    std::unique_ptr<IPDBSession> &Session) {
   StringRef Path = Buffer->getBufferIdentifier();
-  auto Stream = llvm::make_unique<MemoryBufferByteStream>(
+  auto Stream = std::make_unique<MemoryBufferByteStream>(
       std::move(Buffer), llvm::support::little);
 
-  auto Allocator = llvm::make_unique<BumpPtrAllocator>();
-  auto File = llvm::make_unique<PDBFile>(Path, std::move(Stream), *Allocator);
+  auto Allocator = std::make_unique<BumpPtrAllocator>();
+  auto File = std::make_unique<PDBFile>(Path, std::move(Stream), *Allocator);
   if (auto EC = File->parseFileHeaders())
     return EC;
   if (auto EC = File->parseStreamData())
     return EC;
 
   Session =
-      llvm::make_unique<NativeSession>(std::move(File), std::move(Allocator));
+      std::make_unique<NativeSession>(std::move(File), std::move(Allocator));
 
   return Error::success();
 }
@@ -202,7 +202,7 @@ NativeSession::getInjectedSources() const {
     consumeError(Strings.takeError());
     return nullptr;
   }
-  return make_unique<NativeEnumInjectedSources>(*Pdb, *ISS, *Strings);
+  return std::make_unique<NativeEnumInjectedSources>(*Pdb, *ISS, *Strings);
 }
 
 std::unique_ptr<IPDBEnumSectionContribs>
index 9f5e86281a23a028f48db0561a57de4d00fce552..26ccb7daece0856dcd6b5db2ce00348552308ff3 100644 (file)
@@ -163,14 +163,14 @@ void NativeTypeEnum::dump(raw_ostream &OS, int Indent,
 std::unique_ptr<IPDBEnumSymbols>
 NativeTypeEnum::findChildren(PDB_SymType Type) const {
   if (Type != PDB_SymType::Data)
-    return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+    return std::make_unique<NullEnumerator<PDBSymbol>>();
 
   const NativeTypeEnum *ClassParent = nullptr;
   if (!Modifiers)
     ClassParent = this;
   else
     ClassParent = UnmodifiedType;
-  return llvm::make_unique<NativeEnumEnumEnumerators>(Session, *ClassParent);
+  return std::make_unique<NativeEnumEnumEnumerators>(Session, *ClassParent);
 }
 
 PDB_SymType NativeTypeEnum::getSymTag() const { return PDB_SymType::Enum; }
index 405303469c18c4e260ea6a5c89cfdc835dc6a763..f98a4c3043eb8b325cc16bf68b15fc008b6c2742 100644 (file)
@@ -65,7 +65,7 @@ private:
   std::unique_ptr<PDBSymbol> wrap(std::unique_ptr<PDBSymbol> S) const {
     if (!S)
       return nullptr;
-    auto NTFA = llvm::make_unique<NativeTypeFunctionArg>(Session, std::move(S));
+    auto NTFA = std::make_unique<NativeTypeFunctionArg>(Session, std::move(S));
     return PDBSymbol::create(Session, std::move(NTFA));
   }
   NativeSession &Session;
@@ -133,9 +133,9 @@ void NativeTypeFunctionSig::dump(raw_ostream &OS, int Indent,
 std::unique_ptr<IPDBEnumSymbols>
 NativeTypeFunctionSig::findChildren(PDB_SymType Type) const {
   if (Type != PDB_SymType::FunctionArg)
-    return llvm::make_unique<NullEnumerator<PDBSymbol>>();
+    return std::make_unique<NullEnumerator<PDBSymbol>>();
 
-  auto NET = llvm::make_unique<NativeEnumTypes>(Session,
+  auto NET = std::make_unique<NativeEnumTypes>(Session,
                                                 /* copy */ ArgList.ArgIndices);
   return std::unique_ptr<IPDBEnumSymbols>(
       new NativeEnumFunctionArgs(Session, std::move(NET)));
index 983031dfcb78a8c7cb8312b9b777965cd043853c..9ac226b89139b29b1259e277b274627e7892a11b 100644 (file)
@@ -264,7 +264,7 @@ Expected<GlobalsStream &> PDBFile::getPDBGlobalsStream() {
         safelyCreateIndexedStream(DbiS->getGlobalSymbolStreamIndex());
     if (!GlobalS)
       return GlobalS.takeError();
-    auto TempGlobals = llvm::make_unique<GlobalsStream>(std::move(*GlobalS));
+    auto TempGlobals = std::make_unique<GlobalsStream>(std::move(*GlobalS));
     if (auto EC = TempGlobals->reload())
       return std::move(EC);
     Globals = std::move(TempGlobals);
@@ -277,7 +277,7 @@ Expected<InfoStream &> PDBFile::getPDBInfoStream() {
     auto InfoS = safelyCreateIndexedStream(StreamPDB);
     if (!InfoS)
       return InfoS.takeError();
-    auto TempInfo = llvm::make_unique<InfoStream>(std::move(*InfoS));
+    auto TempInfo = std::make_unique<InfoStream>(std::move(*InfoS));
     if (auto EC = TempInfo->reload())
       return std::move(EC);
     Info = std::move(TempInfo);
@@ -290,7 +290,7 @@ Expected<DbiStream &> PDBFile::getPDBDbiStream() {
     auto DbiS = safelyCreateIndexedStream(StreamDBI);
     if (!DbiS)
       return DbiS.takeError();
-    auto TempDbi = llvm::make_unique<DbiStream>(std::move(*DbiS));
+    auto TempDbi = std::make_unique<DbiStream>(std::move(*DbiS));
     if (auto EC = TempDbi->reload(this))
       return std::move(EC);
     Dbi = std::move(TempDbi);
@@ -303,7 +303,7 @@ Expected<TpiStream &> PDBFile::getPDBTpiStream() {
     auto TpiS = safelyCreateIndexedStream(StreamTPI);
     if (!TpiS)
       return TpiS.takeError();
-    auto TempTpi = llvm::make_unique<TpiStream>(*this, std::move(*TpiS));
+    auto TempTpi = std::make_unique<TpiStream>(*this, std::move(*TpiS));
     if (auto EC = TempTpi->reload())
       return std::move(EC);
     Tpi = std::move(TempTpi);
@@ -319,7 +319,7 @@ Expected<TpiStream &> PDBFile::getPDBIpiStream() {
     auto IpiS = safelyCreateIndexedStream(StreamIPI);
     if (!IpiS)
       return IpiS.takeError();
-    auto TempIpi = llvm::make_unique<TpiStream>(*this, std::move(*IpiS));
+    auto TempIpi = std::make_unique<TpiStream>(*this, std::move(*IpiS));
     if (auto EC = TempIpi->reload())
       return std::move(EC);
     Ipi = std::move(TempIpi);
@@ -337,7 +337,7 @@ Expected<PublicsStream &> PDBFile::getPDBPublicsStream() {
         safelyCreateIndexedStream(DbiS->getPublicSymbolStreamIndex());
     if (!PublicS)
       return PublicS.takeError();
-    auto TempPublics = llvm::make_unique<PublicsStream>(std::move(*PublicS));
+    auto TempPublics = std::make_unique<PublicsStream>(std::move(*PublicS));
     if (auto EC = TempPublics->reload())
       return std::move(EC);
     Publics = std::move(TempPublics);
@@ -356,7 +356,7 @@ Expected<SymbolStream &> PDBFile::getPDBSymbolStream() {
     if (!SymbolS)
       return SymbolS.takeError();
 
-    auto TempSymbols = llvm::make_unique<SymbolStream>(std::move(*SymbolS));
+    auto TempSymbols = std::make_unique<SymbolStream>(std::move(*SymbolS));
     if (auto EC = TempSymbols->reload())
       return std::move(EC);
     Symbols = std::move(TempSymbols);
@@ -370,7 +370,7 @@ Expected<PDBStringTable &> PDBFile::getStringTable() {
     if (!NS)
       return NS.takeError();
 
-    auto N = llvm::make_unique<PDBStringTable>();
+    auto N = std::make_unique<PDBStringTable>();
     BinaryStreamReader Reader(**NS);
     if (auto EC = N->reload(Reader))
       return std::move(EC);
@@ -391,7 +391,7 @@ Expected<InjectedSourceStream &> PDBFile::getInjectedSourceStream() {
     if (!Strings)
       return Strings.takeError();
 
-    auto IJ = llvm::make_unique<InjectedSourceStream>(std::move(*IJS));
+    auto IJ = std::make_unique<InjectedSourceStream>(std::move(*IJS));
     if (auto EC = IJ->reload(*Strings))
       return std::move(EC);
     InjectedSources = std::move(IJ);
index 8f5a048ea4b567b0b6b7c8c694d8b4297489c70e..abeb7ae99c9efc22b44215fa454272a566db6a38 100644 (file)
@@ -42,7 +42,7 @@ Error PDBFileBuilder::initialize(uint32_t BlockSize) {
   auto ExpectedMsf = MSFBuilder::create(Allocator, BlockSize);
   if (!ExpectedMsf)
     return ExpectedMsf.takeError();
-  Msf = llvm::make_unique<MSFBuilder>(std::move(*ExpectedMsf));
+  Msf = std::make_unique<MSFBuilder>(std::move(*ExpectedMsf));
   return Error::success();
 }
 
@@ -50,25 +50,25 @@ MSFBuilder &PDBFileBuilder::getMsfBuilder() { return *Msf; }
 
 InfoStreamBuilder &PDBFileBuilder::getInfoBuilder() {
   if (!Info)
-    Info = llvm::make_unique<InfoStreamBuilder>(*Msf, NamedStreams);
+    Info = std::make_unique<InfoStreamBuilder>(*Msf, NamedStreams);
   return *Info;
 }
 
 DbiStreamBuilder &PDBFileBuilder::getDbiBuilder() {
   if (!Dbi)
-    Dbi = llvm::make_unique<DbiStreamBuilder>(*Msf);
+    Dbi = std::make_unique<DbiStreamBuilder>(*Msf);
   return *Dbi;
 }
 
 TpiStreamBuilder &PDBFileBuilder::getTpiBuilder() {
   if (!Tpi)
-    Tpi = llvm::make_unique<TpiStreamBuilder>(*Msf, StreamTPI);
+    Tpi = std::make_unique<TpiStreamBuilder>(*Msf, StreamTPI);
   return *Tpi;
 }
 
 TpiStreamBuilder &PDBFileBuilder::getIpiBuilder() {
   if (!Ipi)
-    Ipi = llvm::make_unique<TpiStreamBuilder>(*Msf, StreamIPI);
+    Ipi = std::make_unique<TpiStreamBuilder>(*Msf, StreamIPI);
   return *Ipi;
 }
 
@@ -78,7 +78,7 @@ PDBStringTableBuilder &PDBFileBuilder::getStringTableBuilder() {
 
 GSIStreamBuilder &PDBFileBuilder::getGsiBuilder() {
   if (!Gsi)
-    Gsi = llvm::make_unique<GSIStreamBuilder>(*Msf);
+    Gsi = std::make_unique<GSIStreamBuilder>(*Msf);
   return *Gsi;
 }
 
index 8ee7f897b8bb42b539533f06773634166d4ce49a..ac19db03fab2fac6cac8bc6901da70ce9d045edc 100644 (file)
@@ -112,7 +112,7 @@ Error TpiStream::reload() {
     HashStream = std::move(*HS);
   }
 
-  Types = llvm::make_unique<LazyRandomTypeCollection>(
+  Types = std::make_unique<LazyRandomTypeCollection>(
       TypeRecords, getNumTypeRecords(), getTypeIndexOffsets());
   return Error::success();
 }
index 6b308453c2dede8156a20271d470929e52dc946f..4f10f8524a9b171c576cebf3575c75d2adebbdf7 100644 (file)
@@ -135,7 +135,7 @@ Error TpiStreamBuilder::finalizeMsfLayout() {
         reinterpret_cast<const uint8_t *>(HashBuffer.data()),
         calculateHashBufferSize());
     HashValueStream =
-        llvm::make_unique<BinaryByteStream>(Bytes, llvm::support::little);
+        std::make_unique<BinaryByteStream>(Bytes, llvm::support::little);
   }
   return Error::success();
 }
index 7c3ba981fd6b6dd9c759f08c926d5db4ed959174..cb0329bc0ed72cd3b22012b92c596e15ff828665 100644 (file)
@@ -79,7 +79,7 @@ private:
 
 std::unique_ptr<IPDBEnumChildren<PDBSymbolData>>
 PDBSymbolFunc::getArguments() const {
-  return llvm::make_unique<FunctionArgEnumerator>(Session, *this);
+  return std::make_unique<FunctionArgEnumerator>(Session, *this);
 }
 
 void PDBSymbolFunc::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); }
index 292320a6fe6d20d0abc4a50214e164a583d8ac8c..1373615522eb249f3228a34fba93682a4f24106c 100644 (file)
@@ -63,7 +63,7 @@ private:
 
 std::unique_ptr<IPDBEnumSymbols>
 PDBSymbolTypeFunctionSig::getArguments() const {
-  return llvm::make_unique<FunctionArgEnumerator>(Session, *this);
+  return std::make_unique<FunctionArgEnumerator>(Session, *this);
 }
 
 void PDBSymbolTypeFunctionSig::dump(PDBSymDumper &Dumper) const {
index acb1599480b0e5b02a48ad8d08d07acffa0f4aea..d8bc3dc06e685f582db1661dd1f0bae5caef417d 100644 (file)
@@ -71,7 +71,7 @@ DataMemberLayoutItem::DataMemberLayoutItem(
       DataMember(std::move(Member)) {
   auto Type = DataMember->getType();
   if (auto UDT = unique_dyn_cast<PDBSymbolTypeUDT>(Type)) {
-    UdtLayout = llvm::make_unique<ClassLayout>(std::move(UDT));
+    UdtLayout = std::make_unique<ClassLayout>(std::move(UDT));
     UsedBytes = UdtLayout->usedBytes();
   }
 }
@@ -205,7 +205,7 @@ void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) {
   for (auto &Base : Bases) {
     uint32_t Offset = Base->getOffset();
     // Non-virtual bases never get elided.
-    auto BL = llvm::make_unique<BaseClassLayout>(*this, Offset, false,
+    auto BL = std::make_unique<BaseClassLayout>(*this, Offset, false,
                                                  std::move(Base));
 
     AllBases.push_back(BL.get());
@@ -216,7 +216,7 @@ void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) {
   assert(VTables.size() <= 1);
   if (!VTables.empty()) {
     auto VTLayout =
-        llvm::make_unique<VTableLayoutItem>(*this, std::move(VTables[0]));
+        std::make_unique<VTableLayoutItem>(*this, std::move(VTables[0]));
 
     VTable = VTLayout.get();
 
@@ -224,7 +224,7 @@ void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) {
   }
 
   for (auto &Data : Members) {
-    auto DM = llvm::make_unique<DataMemberLayoutItem>(*this, std::move(Data));
+    auto DM = std::make_unique<DataMemberLayoutItem>(*this, std::move(Data));
 
     addChildToLayout(std::move(DM));
   }
@@ -236,7 +236,7 @@ void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) {
     int VBPO = VB->getVirtualBasePointerOffset();
     if (!hasVBPtrAtOffset(VBPO)) {
       if (auto VBP = VB->getRawSymbol().getVirtualBaseTableType()) {
-        auto VBPL = llvm::make_unique<VBPtrLayoutItem>(*this, std::move(VBP),
+        auto VBPL = std::make_unique<VBPtrLayoutItem>(*this, std::move(VBP),
                                                        VBPO, VBP->getLength());
         VBPtr = VBPL.get();
         addChildToLayout(std::move(VBPL));
@@ -250,7 +250,7 @@ void UDTLayoutBase::initializeChildren(const PDBSymbol &Sym) {
     uint32_t Offset = UsedBytes.find_last() + 1;
     bool Elide = (Parent != nullptr);
     auto BL =
-        llvm::make_unique<BaseClassLayout>(*this, Offset, Elide, std::move(VB));
+        std::make_unique<BaseClassLayout>(*this, Offset, Elide, std::move(VB));
     AllBases.push_back(BL.get());
 
     // Only lay this virtual base out directly inside of *this* class if this
index 75ac80f4b75541aa516722d57ff7beff5d2adf2b..a425c61210898ef0f357571d6cee1b749c8a0429 100644 (file)
@@ -340,14 +340,14 @@ void *ArgvArray::reset(LLVMContext &C, ExecutionEngine *EE,
   Values.clear();  // Free the old contents.
   Values.reserve(InputArgv.size());
   unsigned PtrSize = EE->getDataLayout().getPointerSize();
-  Array = make_unique<char[]>((InputArgv.size()+1)*PtrSize);
+  Array = std::make_unique<char[]>((InputArgv.size()+1)*PtrSize);
 
   LLVM_DEBUG(dbgs() << "JIT: ARGV = " << (void *)Array.get() << "\n");
   Type *SBytePtr = Type::getInt8PtrTy(C);
 
   for (unsigned i = 0; i != InputArgv.size(); ++i) {
     unsigned Size = InputArgv[i].size()+1;
-    auto Dest = make_unique<char[]>(Size);
+    auto Dest = std::make_unique<char[]>(Size);
     LLVM_DEBUG(dbgs() << "JIT: ARGV[" << i << "] = " << (void *)Dest.get()
                       << "\n");
 
index e6fd6e38f7a61e5f0aa1d0a50c727636af1e5720..eeb2527bd1b778198557f8602fe8758ffbe2bd70 100644 (file)
@@ -121,7 +121,7 @@ public:
   /// Link should be called with the constructor arguments for LinkerImpl, which
   /// will be forwarded to the constructor.
   template <typename... ArgTs> static void link(ArgTs &&... Args) {
-    auto L = llvm::make_unique<LinkerImpl>(std::forward<ArgTs>(Args)...);
+    auto L = std::make_unique<LinkerImpl>(std::forward<ArgTs>(Args)...);
 
     // Ownership of the linker is passed into the linker's doLink function to
     // allow it to be passed on to async continuations.
index 92c7e49039a9d3c8af5370b7fffa0e827f172dbe..c1040c942b27f3354e6773ae60a00eef5a901293 100644 (file)
@@ -34,7 +34,7 @@ Expected<std::unique_ptr<AtomGraph>> MachOAtomGraphBuilder::buildGraph() {
 
 MachOAtomGraphBuilder::MachOAtomGraphBuilder(const object::MachOObjectFile &Obj)
     : Obj(Obj),
-      G(llvm::make_unique<AtomGraph>(Obj.getFileName(), getPointerSize(Obj),
+      G(std::make_unique<AtomGraph>(Obj.getFileName(), getPointerSize(Obj),
                                      getEndianness(Obj))) {}
 
 void MachOAtomGraphBuilder::addCustomAtomizer(StringRef SectionName,
index 2ad9d24555f3dbe312e694b820275e4786aa87c9..bb5d96051da942e1923ef9c400f92c0b53312ff4 100644 (file)
@@ -177,7 +177,7 @@ void OProfileJITEventListener::notifyFreeingObject(ObjectKey Key) {
 
 namespace llvm {
 JITEventListener *JITEventListener::createOProfileJITEventListener() {
-  return new OProfileJITEventListener(llvm::make_unique<OProfileWrapper>());
+  return new OProfileJITEventListener(std::make_unique<OProfileWrapper>());
 }
 
 } // namespace llvm
index a91dd4e796e76301283ea575628fae5c252a3bdf..75ddbc30445d29c350484fbca506b88a51ddae1b 100644 (file)
@@ -155,7 +155,7 @@ void CompileOnDemandLayer::emit(MaterializationResponsibility R,
   // Create a partitioning materialization unit and lodge it with the
   // implementation dylib.
   if (auto Err = PDR.getImplDylib().define(
-          llvm::make_unique<PartitioningIRMaterializationUnit>(
+          std::make_unique<PartitioningIRMaterializationUnit>(
               ES, std::move(TSM), R.getVModuleKey(), *this))) {
     ES.reportError(std::move(Err));
     R.failMaterialization();
@@ -267,7 +267,7 @@ void CompileOnDemandLayer::emitPartition(
 
   // If the partition is empty, return the whole module to the symbol table.
   if (GVsToExtract->empty()) {
-    R.replace(llvm::make_unique<PartitioningIRMaterializationUnit>(
+    R.replace(std::make_unique<PartitioningIRMaterializationUnit>(
         std::move(TSM), R.getSymbols(), std::move(Defs), *this));
     return;
   }
@@ -310,7 +310,7 @@ void CompileOnDemandLayer::emitPartition(
     return;
   }
 
-  R.replace(llvm::make_unique<PartitioningIRMaterializationUnit>(
+  R.replace(std::make_unique<PartitioningIRMaterializationUnit>(
       ES, std::move(TSM), R.getVModuleKey(), *this));
   BaseLayer.emit(std::move(R), std::move(*ExtractedTSM));
 }
index d46b6fcf9a5fa8eb3c1617b9fa53a55f3693563b..f8251627a4efdc621a0f3ee97cb2bf0438542d23 100644 (file)
@@ -42,7 +42,7 @@ SimpleCompiler::CompileResult SimpleCompiler::operator()(Module &M) {
     PM.run(M);
   }
 
-  auto ObjBuffer = llvm::make_unique<SmallVectorMemoryBuffer>(
+  auto ObjBuffer = std::make_unique<SmallVectorMemoryBuffer>(
       std::move(ObjBufferSV),
       "<in memory object compiled from " + M.getModuleIdentifier() + ">");
 
index 044e7eede0817c42a6ab8bafdfcf630ca4f4064f..990fc1342d535b1a6b3c65d6a16308edc61e1f6c 100644 (file)
@@ -186,7 +186,7 @@ DynamicLibrarySearchGenerator::Load(const char *FileName, char GlobalPrefix,
   auto Lib = sys::DynamicLibrary::getPermanentLibrary(FileName, &ErrMsg);
   if (!Lib.isValid())
     return make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode());
-  return llvm::make_unique<DynamicLibrarySearchGenerator>(
+  return std::make_unique<DynamicLibrarySearchGenerator>(
       std::move(Lib), GlobalPrefix, std::move(Allow));
 }
 
index cc3656fe5dc51a1693b467c7049a4a10f55004ac..382a6a2951c8a8f3d58b0f0ee4ec641f5d4187a9 100644 (file)
@@ -66,7 +66,7 @@ JITCompileCallbackManager::getCompileCallback(CompileFunction Compile) {
     std::lock_guard<std::mutex> Lock(CCMgrMutex);
     AddrToSymbol[*TrampolineAddr] = CallbackName;
     cantFail(CallbacksJD.define(
-        llvm::make_unique<CompileCallbackMaterializationUnit>(
+        std::make_unique<CompileCallbackMaterializationUnit>(
             std::move(CallbackName), std::move(Compile),
             ES.allocateVModule())));
     return *TrampolineAddr;
@@ -162,50 +162,50 @@ createLocalIndirectStubsManagerBuilder(const Triple &T) {
   switch (T.getArch()) {
     default:
       return [](){
-        return llvm::make_unique<
+        return std::make_unique<
                        orc::LocalIndirectStubsManager<orc::OrcGenericABI>>();
       };
 
     case Triple::aarch64:
       return [](){
-        return llvm::make_unique<
+        return std::make_unique<
                        orc::LocalIndirectStubsManager<orc::OrcAArch64>>();
       };
 
     case Triple::x86:
       return [](){
-        return llvm::make_unique<
+        return std::make_unique<
                        orc::LocalIndirectStubsManager<orc::OrcI386>>();
       };
 
     case Triple::mips:
       return [](){
-          return llvm::make_unique<
+          return std::make_unique<
                       orc::LocalIndirectStubsManager<orc::OrcMips32Be>>();
       };
 
     case Triple::mipsel:
       return [](){
-          return llvm::make_unique<
+          return std::make_unique<
                       orc::LocalIndirectStubsManager<orc::OrcMips32Le>>();
       };
 
     case Triple::mips64:
     case Triple::mips64el:
       return [](){
-          return llvm::make_unique<
+          return std::make_unique<
                       orc::LocalIndirectStubsManager<orc::OrcMips64>>();
       };
       
     case Triple::x86_64:
       if (T.getOS() == Triple::OSType::Win32) {
         return [](){
-          return llvm::make_unique<
+          return std::make_unique<
                      orc::LocalIndirectStubsManager<orc::OrcX86_64_Win32>>();
         };
       } else {
         return [](){
-          return llvm::make_unique<
+          return std::make_unique<
                      orc::LocalIndirectStubsManager<orc::OrcX86_64_SysV>>();
         };
       }
index 05ebb746985a3edb5e9ff92b6691cd37c79bdbef..a80f78afe80f9c6d91c4a8d54747f0427a108a62 100644 (file)
@@ -68,9 +68,9 @@ LLJIT::createObjectLinkingLayer(LLJITBuilderState &S, ExecutionSession &ES) {
 
   // Otherwise default to creating an RTDyldObjectLinkingLayer that constructs
   // a new SectionMemoryManager for each object.
-  auto GetMemMgr = []() { return llvm::make_unique<SectionMemoryManager>(); };
+  auto GetMemMgr = []() { return std::make_unique<SectionMemoryManager>(); };
   auto ObjLinkingLayer =
-      llvm::make_unique<RTDyldObjectLinkingLayer>(ES, std::move(GetMemMgr));
+      std::make_unique<RTDyldObjectLinkingLayer>(ES, std::move(GetMemMgr));
 
   if (S.JTMB->getTargetTriple().isOSBinFormatCOFF())
     ObjLinkingLayer->setOverrideObjectFlagsWithResponsibilityFlags(true);
@@ -102,7 +102,7 @@ LLJIT::createCompileFunction(LLJITBuilderState &S,
 }
 
 LLJIT::LLJIT(LLJITBuilderState &S, Error &Err)
-    : ES(S.ES ? std::move(S.ES) : llvm::make_unique<ExecutionSession>()),
+    : ES(S.ES ? std::move(S.ES) : std::make_unique<ExecutionSession>()),
       Main(this->ES->getMainJITDylib()), DL(""), CtorRunner(Main),
       DtorRunner(Main) {
 
@@ -123,13 +123,13 @@ LLJIT::LLJIT(LLJITBuilderState &S, Error &Err)
       Err = CompileFunction.takeError();
       return;
     }
-    CompileLayer = llvm::make_unique<IRCompileLayer>(
+    CompileLayer = std::make_unique<IRCompileLayer>(
         *ES, *ObjLinkingLayer, std::move(*CompileFunction));
   }
 
   if (S.NumCompileThreads > 0) {
     CompileLayer->setCloneToNewContextOnEmit(true);
-    CompileThreads = llvm::make_unique<ThreadPool>(S.NumCompileThreads);
+    CompileThreads = std::make_unique<ThreadPool>(S.NumCompileThreads);
     ES->setDispatchMaterialization(
         [this](JITDylib &JD, std::unique_ptr<MaterializationUnit> MU) {
           // FIXME: Switch to move capture once we have c++14.
@@ -226,10 +226,10 @@ LLLazyJIT::LLLazyJIT(LLLazyJITBuilderState &S, Error &Err) : LLJIT(S, Err) {
   }
 
   // Create the transform layer.
-  TransformLayer = llvm::make_unique<IRTransformLayer>(*ES, *CompileLayer);
+  TransformLayer = std::make_unique<IRTransformLayer>(*ES, *CompileLayer);
 
   // Create the COD layer.
-  CODLayer = llvm::make_unique<CompileOnDemandLayer>(
+  CODLayer = std::make_unique<CompileOnDemandLayer>(
       *ES, *TransformLayer, *LCTMgr, std::move(ISMBuilder));
 
   if (S.NumCompileThreads > 0)
index 2126ecb07334468f4091542a33e7f51b3a98cf4d..ba2ec32da78b5f559bf66cf034e8913b0598518c 100644 (file)
@@ -19,7 +19,7 @@ IRLayer::IRLayer(ExecutionSession &ES) : ES(ES) {}
 IRLayer::~IRLayer() {}
 
 Error IRLayer::add(JITDylib &JD, ThreadSafeModule TSM, VModuleKey K) {
-  return JD.define(llvm::make_unique<BasicIRLayerMaterializationUnit>(
+  return JD.define(std::make_unique<BasicIRLayerMaterializationUnit>(
       *this, std::move(K), std::move(TSM)));
 }
 
index def0b300eca180044a871ec30d7c6fb4a302eaee..ff9b55dbbcbd08288194b5ba10419ee8176923cf 100644 (file)
@@ -330,7 +330,7 @@ ObjectLinkingLayer::~ObjectLinkingLayer() {
 void ObjectLinkingLayer::emit(MaterializationResponsibility R,
                               std::unique_ptr<MemoryBuffer> O) {
   assert(O && "Object must not be null");
-  jitLink(llvm::make_unique<ObjectLinkingLayerJITLinkContext>(
+  jitLink(std::make_unique<ObjectLinkingLayerJITLinkContext>(
       *this, std::move(R), std::move(O)));
 }
 
index 21b65bdd66db017810e648ff2891d11d57b5b680..e0af3df9d010f0f87caeb5462fb0993f4d05f273 100644 (file)
@@ -97,7 +97,7 @@ public:
 
   template <typename LayerT>
   std::unique_ptr<GenericLayerImpl<LayerT>> createGenericLayer(LayerT &Layer) {
-    return llvm::make_unique<GenericLayerImpl<LayerT>>(Layer);
+    return std::make_unique<GenericLayerImpl<LayerT>>(Layer);
   }
 
 } // end namespace detail
@@ -327,7 +327,7 @@ public:
                    LLVMOrcSymbolResolverFn ExternalResolver,
                    void *ExternalResolverCtx) {
     return addIRModule(CompileLayer, std::move(M),
-                       llvm::make_unique<SectionMemoryManager>(),
+                       std::make_unique<SectionMemoryManager>(),
                        std::move(ExternalResolver), ExternalResolverCtx);
   }
 
@@ -341,7 +341,7 @@ public:
                                      inconvertibleErrorCode());
 
     return addIRModule(*CODLayer, std::move(M),
-                       llvm::make_unique<SectionMemoryManager>(),
+                       std::make_unique<SectionMemoryManager>(),
                        std::move(ExternalResolver), ExternalResolverCtx);
   }
 
@@ -469,7 +469,7 @@ private:
     if (!CCMgr)
       return nullptr;
 
-    return llvm::make_unique<CODLayerT>(
+    return std::make_unique<CODLayerT>(
         AcknowledgeORCv1Deprecation, ES, CompileLayer,
         [&Resolvers](orc::VModuleKey K) {
           auto ResolverI = Resolvers.find(K);
index 14419b6ca18cfc1c48254c889116cf29f1db5294..1f4e6f1321150d836113982c3acdf0eb407a3bfe 100644 (file)
@@ -51,7 +51,7 @@ ThreadSafeModule cloneToNewContext(ThreadSafeModule &TSM,
     MemoryBufferRef ClonedModuleBufferRef(
         StringRef(ClonedModuleBuffer.data(), ClonedModuleBuffer.size()),
         "cloned module buffer");
-    ThreadSafeContext NewTSCtx(llvm::make_unique<LLVMContext>());
+    ThreadSafeContext NewTSCtx(std::make_unique<LLVMContext>());
 
     auto ClonedModule = cantFail(
         parseBitcodeFile(ClonedModuleBufferRef, *NewTSCtx.getContext()));
index 5a898d96d7db2acc6869fe5fca3d28686fe8b93e..184388dc4d7a7b3fa78494cdcc22812d224322b4 100644 (file)
@@ -203,7 +203,7 @@ PerfJITEventListener::PerfJITEventListener() : Pid(::getpid()) {
     return;
   }
 
-  Dumpstream = make_unique<raw_fd_ostream>(DumpFd, true);
+  Dumpstream = std::make_unique<raw_fd_ostream>(DumpFd, true);
 
   LLVMPerfJitHeader Header = {0};
   if (!FillMachine(Header))
index d4e3b0ba7670ab486380a8e1b677d827f0989f22..27a7690db34fcac78a9faa37bfa6b645c93ba237 100644 (file)
@@ -50,18 +50,18 @@ llvm::RuntimeDyldCOFF::create(Triple::ArchType Arch,
   switch (Arch) {
   default: llvm_unreachable("Unsupported target for RuntimeDyldCOFF.");
   case Triple::x86:
-    return make_unique<RuntimeDyldCOFFI386>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldCOFFI386>(MemMgr, Resolver);
   case Triple::thumb:
-    return make_unique<RuntimeDyldCOFFThumb>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldCOFFThumb>(MemMgr, Resolver);
   case Triple::x86_64:
-    return make_unique<RuntimeDyldCOFFX86_64>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldCOFFX86_64>(MemMgr, Resolver);
   }
 }
 
 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
 RuntimeDyldCOFF::loadObject(const object::ObjectFile &O) {
   if (auto ObjSectionToIDOrErr = loadObjectImpl(O)) {
-    return llvm::make_unique<LoadedCOFFObjectInfo>(*this, *ObjSectionToIDOrErr);
+    return std::make_unique<LoadedCOFFObjectInfo>(*this, *ObjSectionToIDOrErr);
   } else {
     HasError = true;
     raw_string_ostream ErrStream(ErrorStr);
index ec31ea4e573c3b22352613d5f76e2d21e90de180..b9c5a12e08d8b4bdf6fcadb2ad71e26dde70c13d 100644 (file)
@@ -851,7 +851,7 @@ RuntimeDyldChecker::RuntimeDyldChecker(
     GetGOTInfoFunction GetGOTInfo, support::endianness Endianness,
     MCDisassembler *Disassembler, MCInstPrinter *InstPrinter,
     raw_ostream &ErrStream)
-    : Impl(::llvm::make_unique<RuntimeDyldCheckerImpl>(
+    : Impl(::std::make_unique<RuntimeDyldCheckerImpl>(
           std::move(IsSymbolValid), std::move(GetSymbolInfo),
           std::move(GetSectionInfo), std::move(GetStubInfo),
           std::move(GetGOTInfo), Endianness, Disassembler, InstPrinter,
index e3ace265f9c439fecd4cfaabff7ad8e075c8b70f..8de3f7ef46740d2695723f22d21722469ea2d26f 100644 (file)
@@ -242,19 +242,19 @@ llvm::RuntimeDyldELF::create(Triple::ArchType Arch,
                              JITSymbolResolver &Resolver) {
   switch (Arch) {
   default:
-    return make_unique<RuntimeDyldELF>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldELF>(MemMgr, Resolver);
   case Triple::mips:
   case Triple::mipsel:
   case Triple::mips64:
   case Triple::mips64el:
-    return make_unique<RuntimeDyldELFMips>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldELFMips>(MemMgr, Resolver);
   }
 }
 
 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
 RuntimeDyldELF::loadObject(const object::ObjectFile &O) {
   if (auto ObjSectionToIDOrErr = loadObjectImpl(O))
-    return llvm::make_unique<LoadedELFObjectInfo>(*this, *ObjSectionToIDOrErr);
+    return std::make_unique<LoadedELFObjectInfo>(*this, *ObjSectionToIDOrErr);
   else {
     HasError = true;
     raw_string_ostream ErrStream(ErrorStr);
index fbdfb8d5c3aaa10f62bd454a6a4ecb8fc1a956a2..a6a818601c6c42def64fbc705e37b50e94f0ac24 100644 (file)
@@ -354,20 +354,20 @@ RuntimeDyldMachO::create(Triple::ArchType Arch,
     llvm_unreachable("Unsupported target for RuntimeDyldMachO.");
     break;
   case Triple::arm:
-    return make_unique<RuntimeDyldMachOARM>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldMachOARM>(MemMgr, Resolver);
   case Triple::aarch64:
-    return make_unique<RuntimeDyldMachOAArch64>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldMachOAArch64>(MemMgr, Resolver);
   case Triple::x86:
-    return make_unique<RuntimeDyldMachOI386>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldMachOI386>(MemMgr, Resolver);
   case Triple::x86_64:
-    return make_unique<RuntimeDyldMachOX86_64>(MemMgr, Resolver);
+    return std::make_unique<RuntimeDyldMachOX86_64>(MemMgr, Resolver);
   }
 }
 
 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
 RuntimeDyldMachO::loadObject(const object::ObjectFile &O) {
   if (auto ObjSectionToIDOrErr = loadObjectImpl(O))
-    return llvm::make_unique<LoadedMachOObjectInfo>(*this,
+    return std::make_unique<LoadedMachOObjectInfo>(*this,
                                                     *ObjSectionToIDOrErr);
   else {
     HasError = true;
index 63d31c035390a065ad4520cadb53016b531763aa..f2368ea7f26b70a39c22dcfaf5ad1d0e6758c78f 100644 (file)
@@ -171,7 +171,7 @@ std::unique_ptr<Module> llvm::parseModule(
 
   if (Size <= 1)
     // We get bogus data given an empty corpus - just create a new module.
-    return llvm::make_unique<Module>("M", Context);
+    return std::make_unique<Module>("M", Context);
 
   auto Buffer = MemoryBuffer::getMemBuffer(
       StringRef(reinterpret_cast<const char *>(Data), Size), "Fuzzer input",
index 2462e933ba4a8c1c84826ac592172dfa61ba9c3b..3f140ba01d82297324a7809aa8b6b1b086c21e2c 100644 (file)
@@ -835,7 +835,7 @@ SlotTracker *ModuleSlotTracker::getMachine() {
 
   ShouldCreateStorage = false;
   MachineStorage =
-      llvm::make_unique<SlotTracker>(M, ShouldInitializeAllMetadata);
+      std::make_unique<SlotTracker>(M, ShouldInitializeAllMetadata);
   Machine = MachineStorage.get();
   return Machine;
 }
@@ -2312,7 +2312,7 @@ static void WriteAsOperandInternal(raw_ostream &Out, const Metadata *MD,
   if (const MDNode *N = dyn_cast<MDNode>(MD)) {
     std::unique_ptr<SlotTracker> MachineStorage;
     if (!Machine) {
-      MachineStorage = make_unique<SlotTracker>(Context);
+      MachineStorage = std::make_unique<SlotTracker>(Context);
       Machine = MachineStorage.get();
     }
     int Slot = Machine->getMetadataSlot(N);
index dc28d22548ddbb060cf0ada7a03796ad6def1a78..462458d7065272f18080504d09b58787bcb12a5c 100644 (file)
@@ -251,7 +251,7 @@ Function::Function(FunctionType *Ty, LinkageTypes Linkage, unsigned AddrSpace,
 
   // We only need a symbol table for a function if the context keeps value names
   if (!getContext().shouldDiscardValueNames())
-    SymTab = make_unique<ValueSymbolTable>();
+    SymTab = std::make_unique<ValueSymbolTable>();
 
   // If the function has arguments, mark them as lazily built.
   if (Ty->getNumParams())
index c6ab2c6f213a1d0e028d52eafad6cd9efb5e8370..5f978271417059630ae57fc7cb736e03056ece09 100644 (file)
@@ -21,7 +21,7 @@
 using namespace llvm;
 
 LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
-  : DiagHandler(llvm::make_unique<DiagnosticHandler>()),
+  : DiagHandler(std::make_unique<DiagnosticHandler>()),
     VoidTy(C, Type::VoidTyID),
     LabelTy(C, Type::LabelTyID),
     HalfTy(C, Type::HalfTyID),
index a8650c694aab831da3f438276ea12f39f12fcb29..73387ecbac1a75a08b429a903f4c92ba82254e34 100644 (file)
@@ -126,7 +126,7 @@ llvm::setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
 
   std::error_code EC;
   auto RemarksFile =
-      llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::OF_None);
+      std::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::OF_None);
   // We don't use llvm::FileError here because some diagnostics want the file
   // name separately.
   if (EC)
@@ -141,7 +141,7 @@ llvm::setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
   if (Error E = RemarkSerializer.takeError())
     return make_error<RemarkSetupFormatError>(std::move(E));
 
-  Context.setRemarkStreamer(llvm::make_unique<RemarkStreamer>(
+  Context.setRemarkStreamer(std::make_unique<RemarkStreamer>(
       RemarksFilename, std::move(*RemarkSerializer)));
 
   if (!RemarksPasses.empty())
index 2e109c5f6d929efb81c51f951eed7635e0340901..6fa58741be17368f65d553d1cf208dd389221e28 100644 (file)
@@ -5067,7 +5067,7 @@ struct VerifierLegacyPass : public FunctionPass {
   }
 
   bool doInitialization(Module &M) override {
-    V = llvm::make_unique<Verifier>(
+    V = std::make_unique<Verifier>(
         &dbgs(), /*ShouldTreatBrokenDebugInfoAsError=*/false, M);
     return false;
   }
index 000ab91dba7ca36b8c8cccaf3e8b1c193c89f603..12dcd182de2d0ff01b3110710b14eec69dae151b 100644 (file)
@@ -142,8 +142,8 @@ Expected<NativeObjectCache> lto::localCache(StringRef CacheDirectoryPath,
       }
 
       // This CacheStream will move the temporary file into the cache when done.
-      return llvm::make_unique<CacheStream>(
-          llvm::make_unique<raw_fd_ostream>(Temp->FD, /* ShouldClose */ false),
+      return std::make_unique<CacheStream>(
+          std::make_unique<raw_fd_ostream>(Temp->FD, /* ShouldClose */ false),
           AddBuffer, std::move(*Temp), EntryPath.str(), Task);
     };
   };
index a67fa941696da6a9e2c225dcd48bb30739c91a7d..0ada5015c0a927bda00a1a58ee6f60dd5c045f55 100644 (file)
@@ -460,8 +460,8 @@ BitcodeModule &InputFile::getSingleBitcodeModule() {
 LTO::RegularLTOState::RegularLTOState(unsigned ParallelCodeGenParallelismLevel,
                                       Config &Conf)
     : ParallelCodeGenParallelismLevel(ParallelCodeGenParallelismLevel),
-      Ctx(Conf), CombinedModule(llvm::make_unique<Module>("ld-temp.o", Ctx)),
-      Mover(llvm::make_unique<IRMover>(*CombinedModule)) {}
+      Ctx(Conf), CombinedModule(std::make_unique<Module>("ld-temp.o", Ctx)),
+      Mover(std::make_unique<IRMover>(*CombinedModule)) {}
 
 LTO::ThinLTOState::ThinLTOState(ThinBackend Backend)
     : Backend(Backend), CombinedIndex(/*HaveGVs*/ false) {
@@ -1142,7 +1142,7 @@ ThinBackend lto::createInProcessThinBackend(unsigned ParallelismLevel) {
   return [=](Config &Conf, ModuleSummaryIndex &CombinedIndex,
              const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
              AddStreamFn AddStream, NativeObjectCache Cache) {
-    return llvm::make_unique<InProcessThinBackend>(
+    return std::make_unique<InProcessThinBackend>(
         Conf, CombinedIndex, ParallelismLevel, ModuleToDefinedGVSummaries,
         AddStream, Cache);
   };
@@ -1232,7 +1232,7 @@ ThinBackend lto::createWriteIndexesThinBackend(
   return [=](Config &Conf, ModuleSummaryIndex &CombinedIndex,
              const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
              AddStreamFn AddStream, NativeObjectCache Cache) {
-    return llvm::make_unique<WriteIndexesThinBackend>(
+    return std::make_unique<WriteIndexesThinBackend>(
         Conf, CombinedIndex, ModuleToDefinedGVSummaries, OldPrefix, NewPrefix,
         ShouldEmitImportsFiles, LinkedObjectsFile, OnWrite);
   };
@@ -1382,7 +1382,7 @@ lto::setupStatsFile(StringRef StatsFilename) {
   llvm::EnableStatistics(false);
   std::error_code EC;
   auto StatsFile =
-      llvm::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::OF_None);
+      std::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::OF_None);
   if (EC)
     return errorCodeToError(EC);
 
index 1879b40808ac0d6231827af2beff42c10ffb4efd..1f4ecf0fe61d89fbfd7adc9e96a5b44235b77342 100644 (file)
@@ -57,7 +57,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
   ShouldDiscardValueNames = false;
 
   std::error_code EC;
-  ResolutionFile = llvm::make_unique<raw_fd_ostream>(
+  ResolutionFile = std::make_unique<raw_fd_ostream>(
       OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return errorCodeToError(EC);
@@ -329,7 +329,7 @@ void codegen(Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
 
   if (!DwoFile.empty()) {
     std::error_code EC;
-    DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
+    DwoOut = std::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
     if (EC)
       report_fatal_error("Failed to open " + DwoFile + ": " + EC.message());
   }
index c1a19fae90f215fbb670b6c4cafb7f0321bcf288..bd03184b03c2f75042704412a418efccd0163c1b 100644 (file)
@@ -174,7 +174,7 @@ void LTOCodeGenerator::setModule(std::unique_ptr<LTOModule> Mod) {
   AsmUndefinedRefs.clear();
 
   MergedModule = Mod->takeModule();
-  TheLinker = make_unique<Linker>(*MergedModule);
+  TheLinker = std::make_unique<Linker>(*MergedModule);
   setAsmUndefinedRefs(&*Mod);
 
   // We've just changed the input, so let's make sure we verify it.
@@ -690,7 +690,7 @@ LTOCodeGenerator::setDiagnosticHandler(lto_diagnostic_handler_t DiagHandler,
     return Context.setDiagnosticHandler(nullptr);
   // Register the LTOCodeGenerator stub in the LLVMContext to forward the
   // diagnostic to the external DiagHandler.
-  Context.setDiagnosticHandler(llvm::make_unique<LTODiagnosticHandler>(this),
+  Context.setDiagnosticHandler(std::make_unique<LTODiagnosticHandler>(this),
                                true);
 }
 
index 70d61c97c72e8d55524225366a0b5891f7fa73f3..eada2529e82372ad0e14dc3d37aa18354e8cd1ac 100644 (file)
@@ -295,7 +295,7 @@ std::unique_ptr<MemoryBuffer> codegenModule(Module &TheModule,
     // Run codegen now. resulting binary is in OutputBuffer.
     PM.run(TheModule);
   }
-  return make_unique<SmallVectorMemoryBuffer>(std::move(OutputBuffer));
+  return std::make_unique<SmallVectorMemoryBuffer>(std::move(OutputBuffer));
 }
 
 /// Manage caching for a single Module.
@@ -442,7 +442,7 @@ ProcessThinLTOModule(Module &TheModule, ModuleSummaryIndex &Index,
       auto Index = buildModuleSummaryIndex(TheModule, nullptr, &PSI);
       WriteBitcodeToFile(TheModule, OS, true, &Index);
     }
-    return make_unique<SmallVectorMemoryBuffer>(std::move(OutputBuffer));
+    return std::make_unique<SmallVectorMemoryBuffer>(std::move(OutputBuffer));
   }
 
   return codegenModule(TheModule, TM);
@@ -557,7 +557,7 @@ std::unique_ptr<TargetMachine> TargetMachineBuilder::create() const {
  */
 std::unique_ptr<ModuleSummaryIndex> ThinLTOCodeGenerator::linkCombinedIndex() {
   std::unique_ptr<ModuleSummaryIndex> CombinedIndex =
-      llvm::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
+      std::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
   uint64_t NextModuleId = 0;
   for (auto &Mod : Modules) {
     auto &M = Mod->getSingleBitcodeModule();
index 2c68723a12f89f1b9b908b0a27147c712a9f82d5..10a9fe87aa2d7f93f29665403c0be0c37e13eb27 100644 (file)
@@ -1551,7 +1551,7 @@ bool ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
 std::unique_ptr<MCObjectWriter>
 llvm::createELFObjectWriter(std::unique_ptr<MCELFObjectTargetWriter> MOTW,
                             raw_pwrite_stream &OS, bool IsLittleEndian) {
-  return llvm::make_unique<ELFSingleObjectWriter>(std::move(MOTW), OS,
+  return std::make_unique<ELFSingleObjectWriter>(std::move(MOTW), OS,
                                                   IsLittleEndian);
 }
 
@@ -1559,6 +1559,6 @@ std::unique_ptr<MCObjectWriter>
 llvm::createELFDwoObjectWriter(std::unique_ptr<MCELFObjectTargetWriter> MOTW,
                                raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS,
                                bool IsLittleEndian) {
-  return llvm::make_unique<ELFDwoObjectWriter>(std::move(MOTW), OS, DwoOS,
+  return std::make_unique<ELFDwoObjectWriter>(std::move(MOTW), OS, DwoOS,
                                                IsLittleEndian);
 }
index 81a57c67d3741a729fefadc597377082197dad37..e20ba2f96e3bcd6eb721bb534f3c7ca32851a9da 100644 (file)
@@ -66,7 +66,7 @@ public:
                 std::unique_ptr<MCAsmBackend> asmbackend, bool showInst)
       : MCStreamer(Context), OSOwner(std::move(os)), OS(*OSOwner),
         MAI(Context.getAsmInfo()), InstPrinter(printer),
-        Assembler(llvm::make_unique<MCAssembler>(
+        Assembler(std::make_unique<MCAssembler>(
             Context, std::move(asmbackend), std::move(emitter),
             (asmbackend) ? asmbackend->createObjectWriter(NullStream)
                          : nullptr)),
index 1587d8498666f8ebe952274e07275cc823b2e90a..b418c2d33d9512273d12aac49183f8b6bfa2653f 100644 (file)
@@ -27,7 +27,7 @@ MCObjectStreamer::MCObjectStreamer(MCContext &Context,
                                    std::unique_ptr<MCObjectWriter> OW,
                                    std::unique_ptr<MCCodeEmitter> Emitter)
     : MCStreamer(Context),
-      Assembler(llvm::make_unique<MCAssembler>(
+      Assembler(std::make_unique<MCAssembler>(
           Context, std::move(TAB), std::move(Emitter), std::move(OW))),
       EmitEHFrame(true), EmitDebugFrame(false) {}
 
index 9c064207c7cb086547c8ec329c036ef8dedc0d1a..bd66e5f39c0d24a922f553d0b9994c06162d03a5 100644 (file)
@@ -778,7 +778,7 @@ bool DarwinAsmParser::parseDirectiveSecureLogUnique(StringRef, SMLoc IDLoc) {
   raw_fd_ostream *OS = getContext().getSecureLog();
   if (!OS) {
     std::error_code EC;
-    auto NewOS = llvm::make_unique<raw_fd_ostream>(
+    auto NewOS = std::make_unique<raw_fd_ostream>(
         StringRef(SecureLogFile), EC, sys::fs::OF_Append | sys::fs::OF_Text);
     if (EC)
        return Error(IDLoc, Twine("can't open secure log file: ") +
index 2e36fe77b5915feace42673be5527332169a8dd6..3a52cd9e18affc499e39afb50c3aa25a474ffa4e 100644 (file)
@@ -677,7 +677,7 @@ void MCStreamer::EmitWinCFIStartProc(const MCSymbol *Symbol, SMLoc Loc) {
   MCSymbol *StartProc = EmitCFILabel();
 
   WinFrameInfos.emplace_back(
-      llvm::make_unique<WinEH::FrameInfo>(Symbol, StartProc));
+      std::make_unique<WinEH::FrameInfo>(Symbol, StartProc));
   CurrentWinFrameInfo = WinFrameInfos.back().get();
   CurrentWinFrameInfo->TextSection = getCurrentSectionOnly();
 }
@@ -711,7 +711,7 @@ void MCStreamer::EmitWinCFIStartChained(SMLoc Loc) {
 
   MCSymbol *StartProc = EmitCFILabel();
 
-  WinFrameInfos.emplace_back(llvm::make_unique<WinEH::FrameInfo>(
+  WinFrameInfos.emplace_back(std::make_unique<WinEH::FrameInfo>(
       CurFrame->Function, StartProc, CurFrame));
   CurrentWinFrameInfo = WinFrameInfos.back().get();
   CurrentWinFrameInfo->TextSection = getCurrentSectionOnly();
index f0ceb86b25af4201dd2bf0987c75f93be5a07e05..251fe5abbcfcbd556d48fad8ba428ad0d4d0bad2 100644 (file)
@@ -1043,6 +1043,6 @@ uint64_t MachObjectWriter::writeObject(MCAssembler &Asm,
 std::unique_ptr<MCObjectWriter>
 llvm::createMachObjectWriter(std::unique_ptr<MCMachObjectTargetWriter> MOTW,
                              raw_pwrite_stream &OS, bool IsLittleEndian) {
-  return llvm::make_unique<MachObjectWriter>(std::move(MOTW), OS,
+  return std::make_unique<MachObjectWriter>(std::move(MOTW), OS,
                                              IsLittleEndian);
 }
index 098343cd0107b385a9f1c13f8f1d4ff07a560cc2..a38633038382013c00a0f43b8df828eb4b58dacc 100644 (file)
@@ -1296,12 +1296,12 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &Asm,
 
       // Separate out the producers and target features sections
       if (Name == "producers") {
-        ProducersSection = llvm::make_unique<WasmCustomSection>(Name, &Section);
+        ProducersSection = std::make_unique<WasmCustomSection>(Name, &Section);
         continue;
       }
       if (Name == "target_features") {
         TargetFeaturesSection =
-            llvm::make_unique<WasmCustomSection>(Name, &Section);
+            std::make_unique<WasmCustomSection>(Name, &Section);
         continue;
       }
 
@@ -1618,5 +1618,5 @@ uint64_t WasmObjectWriter::writeObject(MCAssembler &Asm,
 std::unique_ptr<MCObjectWriter>
 llvm::createWasmObjectWriter(std::unique_ptr<MCWasmObjectTargetWriter> MOTW,
                              raw_pwrite_stream &OS) {
-  return llvm::make_unique<WasmObjectWriter>(std::move(MOTW), OS);
+  return std::make_unique<WasmObjectWriter>(std::move(MOTW), OS);
 }
index 0e6c05bc726d3e2c4509a9963ba974305d32b27f..fa9722768186967c2fe13e0b5a986f4c6fc9917b 100644 (file)
@@ -239,7 +239,7 @@ WinCOFFObjectWriter::WinCOFFObjectWriter(
 }
 
 COFFSymbol *WinCOFFObjectWriter::createSymbol(StringRef Name) {
-  Symbols.push_back(make_unique<COFFSymbol>(Name));
+  Symbols.push_back(std::make_unique<COFFSymbol>(Name));
   return Symbols.back().get();
 }
 
@@ -251,7 +251,7 @@ COFFSymbol *WinCOFFObjectWriter::GetOrCreateCOFFSymbol(const MCSymbol *Symbol) {
 }
 
 COFFSection *WinCOFFObjectWriter::createSection(StringRef Name) {
-  Sections.emplace_back(make_unique<COFFSection>(Name));
+  Sections.emplace_back(std::make_unique<COFFSection>(Name));
   return Sections.back().get();
 }
 
@@ -1098,5 +1098,5 @@ void MCWinCOFFObjectTargetWriter::anchor() {}
 
 std::unique_ptr<MCObjectWriter> llvm::createWinCOFFObjectWriter(
     std::unique_ptr<MCWinCOFFObjectTargetWriter> MOTW, raw_pwrite_stream &OS) {
-  return llvm::make_unique<WinCOFFObjectWriter>(std::move(MOTW), OS);
+  return std::make_unique<WinCOFFObjectWriter>(std::move(MOTW), OS);
 }
index 9b9a7b6c118ca40278ee98610d6a633508e8eee7..8f67c927f81d44e80ee9e95780ea16e79f374d41 100644 (file)
@@ -90,5 +90,5 @@ uint64_t XCOFFObjectWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &) {
 std::unique_ptr<MCObjectWriter>
 llvm::createXCOFFObjectWriter(std::unique_ptr<MCXCOFFObjectTargetWriter> MOTW,
                               raw_pwrite_stream &OS) {
-  return llvm::make_unique<XCOFFObjectWriter>(std::move(MOTW), OS);
+  return std::make_unique<XCOFFObjectWriter>(std::move(MOTW), OS);
 }
index 3bcabb6a235595ff6203448ce71f345e2812dfbd..546c82c6dd9873136adf2eb7efe4b36e647cee9a 100644 (file)
@@ -32,19 +32,19 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, SourceMgr &SrcMgr) {
   const MCSchedModel &SM = STI.getSchedModel();
 
   // Create the hardware units defining the backend.
-  auto RCU = llvm::make_unique<RetireControlUnit>(SM);
-  auto PRF = llvm::make_unique<RegisterFile>(SM, MRI, Opts.RegisterFileSize);
-  auto LSU = llvm::make_unique<LSUnit>(SM, Opts.LoadQueueSize,
+  auto RCU = std::make_unique<RetireControlUnit>(SM);
+  auto PRF = std::make_unique<RegisterFile>(SM, MRI, Opts.RegisterFileSize);
+  auto LSU = std::make_unique<LSUnit>(SM, Opts.LoadQueueSize,
                                        Opts.StoreQueueSize, Opts.AssumeNoAlias);
-  auto HWS = llvm::make_unique<Scheduler>(SM, *LSU);
+  auto HWS = std::make_unique<Scheduler>(SM, *LSU);
 
   // Create the pipeline stages.
-  auto Fetch = llvm::make_unique<EntryStage>(SrcMgr);
-  auto Dispatch = llvm::make_unique<DispatchStage>(STI, MRI, Opts.DispatchWidth,
+  auto Fetch = std::make_unique<EntryStage>(SrcMgr);
+  auto Dispatch = std::make_unique<DispatchStage>(STI, MRI, Opts.DispatchWidth,
                                                    *RCU, *PRF);
   auto Execute =
-      llvm::make_unique<ExecuteStage>(*HWS, Opts.EnableBottleneckAnalysis);
-  auto Retire = llvm::make_unique<RetireStage>(*RCU, *PRF);
+      std::make_unique<ExecuteStage>(*HWS, Opts.EnableBottleneckAnalysis);
+  auto Retire = std::make_unique<RetireStage>(*RCU, *PRF);
 
   // Pass the ownership of all the hardware units to this Context.
   addHardwareUnit(std::move(RCU));
@@ -53,10 +53,10 @@ Context::createDefaultPipeline(const PipelineOptions &Opts, SourceMgr &SrcMgr) {
   addHardwareUnit(std::move(HWS));
 
   // Build the pipeline.
-  auto StagePipeline = llvm::make_unique<Pipeline>();
+  auto StagePipeline = std::make_unique<Pipeline>();
   StagePipeline->appendStage(std::move(Fetch));
   if (Opts.MicroOpQueueSize)
-    StagePipeline->appendStage(llvm::make_unique<MicroOpQueueStage>(
+    StagePipeline->appendStage(std::make_unique<MicroOpQueueStage>(
         Opts.MicroOpQueueSize, Opts.DecodersThroughput));
   StagePipeline->appendStage(std::move(Dispatch));
   StagePipeline->appendStage(std::move(Execute));
index 5c91198362ad9fc38bc0f955025092e594b62884..088aea3e23c6ecfc44d644b23c6416ea2bf3963a 100644 (file)
@@ -104,7 +104,7 @@ void ResourceState::dump() const {
 static std::unique_ptr<ResourceStrategy>
 getStrategyFor(const ResourceState &RS) {
   if (RS.isAResourceGroup() || RS.getNumUnits() > 1)
-    return llvm::make_unique<DefaultResourceStrategy>(RS.getReadyMask());
+    return std::make_unique<DefaultResourceStrategy>(RS.getReadyMask());
   return std::unique_ptr<ResourceStrategy>(nullptr);
 }
 
@@ -128,7 +128,7 @@ ResourceManager::ResourceManager(const MCSchedModel &SM)
     uint64_t Mask = ProcResID2Mask[I];
     unsigned Index = getResourceStateIndex(Mask);
     Resources[Index] =
-        llvm::make_unique<ResourceState>(*SM.getProcResource(I), I, Mask);
+        std::make_unique<ResourceState>(*SM.getProcResource(I), I, Mask);
     Strategies[Index] = getStrategyFor(*Resources[Index]);
   }
 
index c793130af2ab67b88dedb74a25e0a852fbdcd169..8730336c6669b1d9aaf7011874dd30a14ab682f9 100644 (file)
@@ -21,7 +21,7 @@ namespace mca {
 
 void Scheduler::initializeStrategy(std::unique_ptr<SchedulerStrategy> S) {
   // Ensure we have a valid (non-null) strategy object.
-  Strategy = S ? std::move(S) : llvm::make_unique<DefaultSchedulerStrategy>();
+  Strategy = S ? std::move(S) : std::make_unique<DefaultSchedulerStrategy>();
 }
 
 // Anchor the vtable of SchedulerStrategy and DefaultSchedulerStrategy.
index ee9e2bcda18d022e86f4ef94595dcdad37391e4c..2a177f6314e854af6fa6eea85203b652d0b20f66 100644 (file)
@@ -544,7 +544,7 @@ InstrBuilder::createInstrDescImpl(const MCInst &MCI) {
   LLVM_DEBUG(dbgs() << "\t\tSchedClassID=" << SchedClassID << '\n');
 
   // Create a new empty descriptor.
-  std::unique_ptr<InstrDesc> ID = llvm::make_unique<InstrDesc>();
+  std::unique_ptr<InstrDesc> ID = std::make_unique<InstrDesc>();
   ID->NumMicroOps = SCDesc.NumMicroOps;
   ID->SchedClassID = SchedClassID;
 
@@ -613,7 +613,7 @@ InstrBuilder::createInstruction(const MCInst &MCI) {
   if (!DescOrErr)
     return DescOrErr.takeError();
   const InstrDesc &D = *DescOrErr;
-  std::unique_ptr<Instruction> NewIS = llvm::make_unique<Instruction>(D);
+  std::unique_ptr<Instruction> NewIS = std::make_unique<Instruction>(D);
 
   // Check if this is a dependency breaking instruction.
   APInt Mask;
index d2f5613a0fb6e19ab9792a47ff55c43b39bcb3ee..66135790a4cd75fc42c334302d5009178820d759 100644 (file)
@@ -33,7 +33,7 @@ void EntryStage::getNextInstruction() {
   if (!SM.hasNext())
     return;
   SourceRef SR = SM.peekNext();
-  std::unique_ptr<Instruction> Inst = llvm::make_unique<Instruction>(SR.second);
+  std::unique_ptr<Instruction> Inst = std::make_unique<Instruction>(SR.second);
   CurrentInstruction = InstRef(SR.first, Inst.get());
   Instructions.emplace_back(std::move(Inst));
   SM.updateNext();
index f3b0347088a4fbfcd80c827c624231861429227b..82e9b89f13e6430aba35817e8cbd783a4f1e76b6 100644 (file)
@@ -63,7 +63,7 @@ createPtr(MemoryBufferRef Object) {
   auto Ret = ELFObjectFile<ELFT>::create(Object);
   if (Error E = Ret.takeError())
     return std::move(E);
-  return make_unique<ELFObjectFile<ELFT>>(std::move(*Ret));
+  return std::make_unique<ELFObjectFile<ELFT>>(std::move(*Ret));
 }
 
 Expected<std::unique_ptr<ObjectFile>>
index 179166ddbd39dd3330ad58c92c851d894a7160b6..be1950e08edeb7879fc5cfe89f74b1e198465622 100644 (file)
@@ -3428,7 +3428,7 @@ iterator_range<rebase_iterator>
 MachOObjectFile::rebaseTable(Error &Err, MachOObjectFile *O,
                              ArrayRef<uint8_t> Opcodes, bool is64) {
   if (O->BindRebaseSectionTable == nullptr)
-    O->BindRebaseSectionTable = llvm::make_unique<BindRebaseSegInfo>(O);
+    O->BindRebaseSectionTable = std::make_unique<BindRebaseSegInfo>(O);
   MachORebaseEntry Start(&Err, O, Opcodes, is64);
   Start.moveToFirst();
 
@@ -4099,7 +4099,7 @@ MachOObjectFile::bindTable(Error &Err, MachOObjectFile *O,
                            ArrayRef<uint8_t> Opcodes, bool is64,
                            MachOBindEntry::Kind BKind) {
   if (O->BindRebaseSectionTable == nullptr)
-    O->BindRebaseSectionTable = llvm::make_unique<BindRebaseSegInfo>(O);
+    O->BindRebaseSectionTable = std::make_unique<BindRebaseSegInfo>(O);
   MachOBindEntry Start(&Err, O, Opcodes, is64, BKind);
   Start.moveToFirst();
 
index cdcb17992802b301640ecb62cd8a8bd0d5ae57e6..470283efb294d326284c351c48323c52230762d5 100644 (file)
@@ -56,7 +56,7 @@ LLVM_DUMP_METHOD void WasmSymbol::dump() const { print(dbgs()); }
 Expected<std::unique_ptr<WasmObjectFile>>
 ObjectFile::createWasmObjectFile(MemoryBufferRef Buffer) {
   Error Err = Error::success();
-  auto ObjectFile = llvm::make_unique<WasmObjectFile>(Buffer, Err);
+  auto ObjectFile = std::make_unique<WasmObjectFile>(Buffer, Err);
   if (Err)
     return std::move(Err);
 
index 65ccee1ff29ca976553dc0b12cfad04628cfe719..7e3e8f96a41437b3aeb425ad812a84f78dafc14a 100644 (file)
@@ -502,7 +502,7 @@ XCOFFObjectFile::parseStringTable(const XCOFFObjectFile *Obj, uint64_t Offset) {
 
 Expected<std::unique_ptr<XCOFFObjectFile>>
 XCOFFObjectFile::create(unsigned Type, MemoryBufferRef MBR) {
-  // Can't use make_unique because of the private constructor.
+  // Can't use std::make_unique because of the private constructor.
   std::unique_ptr<XCOFFObjectFile> Obj;
   Obj.reset(new XCOFFObjectFile(Type, MBR));
 
index d2ceb40e2c106396f8b2ecc7c24f06877f7a066d..5e53baf5fa4e788fc3a9417e8787ed08811f50a1 100644 (file)
@@ -188,7 +188,7 @@ template <class ELFT> ELFState<ELFT>::ELFState(ELFYAML::Object &D) : Doc(D) {
   if (Doc.Sections.empty() || Doc.Sections.front()->Type != ELF::SHT_NULL)
     Doc.Sections.insert(
         Doc.Sections.begin(),
-        llvm::make_unique<ELFYAML::Section>(
+        std::make_unique<ELFYAML::Section>(
             ELFYAML::Section::SectionKind::RawContent, /*IsImplicit=*/true));
 
   std::vector<StringRef> ImplicitSections = {".symtab", ".strtab", ".shstrtab"};
@@ -201,7 +201,7 @@ template <class ELFT> ELFState<ELFT>::ELFState(ELFYAML::Object &D) : Doc(D) {
     if (DocSections.count(SecName))
       continue;
 
-    std::unique_ptr<ELFYAML::Section> Sec = llvm::make_unique<ELFYAML::Section>(
+    std::unique_ptr<ELFYAML::Section> Sec = std::make_unique<ELFYAML::Section>(
         ELFYAML::Section::SectionKind::RawContent, true /*IsImplicit*/);
     Sec->Name = SecName;
     Doc.Sections.push_back(std::move(Sec));
index f5f2acd0cc4bd2c84948a20d8f7b66e54d203fea..62995de5da2c467d8e00afa5dfe0e52bca06dda0 100644 (file)
@@ -193,17 +193,17 @@ std::unique_ptr<Stream> Stream::create(StreamType Type) {
   StreamKind Kind = getKind(Type);
   switch (Kind) {
   case StreamKind::MemoryList:
-    return llvm::make_unique<MemoryListStream>();
+    return std::make_unique<MemoryListStream>();
   case StreamKind::ModuleList:
-    return llvm::make_unique<ModuleListStream>();
+    return std::make_unique<ModuleListStream>();
   case StreamKind::RawContent:
-    return llvm::make_unique<RawContentStream>(Type);
+    return std::make_unique<RawContentStream>(Type);
   case StreamKind::SystemInfo:
-    return llvm::make_unique<SystemInfoStream>();
+    return std::make_unique<SystemInfoStream>();
   case StreamKind::TextContent:
-    return llvm::make_unique<TextContentStream>(Type);
+    return std::make_unique<TextContentStream>(Type);
   case StreamKind::ThreadList:
-    return llvm::make_unique<ThreadListStream>();
+    return std::make_unique<ThreadListStream>();
   }
   llvm_unreachable("Unhandled stream kind!");
 }
@@ -602,7 +602,7 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) {
         return ExpectedContent.takeError();
       Ranges.push_back({MD, *ExpectedContent});
     }
-    return llvm::make_unique<MemoryListStream>(std::move(Ranges));
+    return std::make_unique<MemoryListStream>(std::move(Ranges));
   }
   case StreamKind::ModuleList: {
     auto ExpectedList = File.getModuleList();
@@ -622,10 +622,10 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) {
       Modules.push_back(
           {M, std::move(*ExpectedName), *ExpectedCv, *ExpectedMisc});
     }
-    return llvm::make_unique<ModuleListStream>(std::move(Modules));
+    return std::make_unique<ModuleListStream>(std::move(Modules));
   }
   case StreamKind::RawContent:
-    return llvm::make_unique<RawContentStream>(StreamDesc.Type,
+    return std::make_unique<RawContentStream>(StreamDesc.Type,
                                                File.getRawStream(StreamDesc));
   case StreamKind::SystemInfo: {
     auto ExpectedInfo = File.getSystemInfo();
@@ -634,11 +634,11 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) {
     auto ExpectedCSDVersion = File.getString(ExpectedInfo->CSDVersionRVA);
     if (!ExpectedCSDVersion)
       return ExpectedInfo.takeError();
-    return llvm::make_unique<SystemInfoStream>(*ExpectedInfo,
+    return std::make_unique<SystemInfoStream>(*ExpectedInfo,
                                                std::move(*ExpectedCSDVersion));
   }
   case StreamKind::TextContent:
-    return llvm::make_unique<TextContentStream>(
+    return std::make_unique<TextContentStream>(
         StreamDesc.Type, toStringRef(File.getRawStream(StreamDesc)));
   case StreamKind::ThreadList: {
     auto ExpectedList = File.getThreadList();
@@ -654,7 +654,7 @@ Stream::create(const Directory &StreamDesc, const object::MinidumpFile &File) {
         return ExpectedContext.takeError();
       Threads.push_back({T, *ExpectedStack, *ExpectedContext});
     }
-    return llvm::make_unique<ThreadListStream>(std::move(Threads));
+    return std::make_unique<ThreadListStream>(std::move(Threads));
   }
   }
   llvm_unreachable("Unhandled stream kind!");
index f37c142da69ba9d07c3be5d6d9b5434b458755f1..09e921502eb6709ae8c63928a7dfdaa71be1daf2 100644 (file)
@@ -241,7 +241,7 @@ void DerivedArgList::AddSynthesizedArg(Arg *A) {
 
 Arg *DerivedArgList::MakeFlagArg(const Arg *BaseArg, const Option Opt) const {
   SynthesizedArgs.push_back(
-      make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
+      std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
                        BaseArgs.MakeIndex(Opt.getName()), BaseArg));
   return SynthesizedArgs.back().get();
 }
@@ -250,7 +250,7 @@ Arg *DerivedArgList::MakePositionalArg(const Arg *BaseArg, const Option Opt,
                                        StringRef Value) const {
   unsigned Index = BaseArgs.MakeIndex(Value);
   SynthesizedArgs.push_back(
-      make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
+      std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
                        Index, BaseArgs.getArgString(Index), BaseArg));
   return SynthesizedArgs.back().get();
 }
@@ -259,7 +259,7 @@ Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option Opt,
                                      StringRef Value) const {
   unsigned Index = BaseArgs.MakeIndex(Opt.getName(), Value);
   SynthesizedArgs.push_back(
-      make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
+      std::make_unique<Arg>(Opt, MakeArgString(Opt.getPrefix() + Opt.getName()),
                        Index, BaseArgs.getArgString(Index + 1), BaseArg));
   return SynthesizedArgs.back().get();
 }
@@ -267,7 +267,7 @@ Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option Opt,
 Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option Opt,
                                    StringRef Value) const {
   unsigned Index = BaseArgs.MakeIndex((Opt.getName() + Value).str());
-  SynthesizedArgs.push_back(make_unique<Arg>(
+  SynthesizedArgs.push_back(std::make_unique<Arg>(
       Opt, MakeArgString(Opt.getPrefix() + Opt.getName()), Index,
       BaseArgs.getArgString(Index) + Opt.getName().size(), BaseArg));
   return SynthesizedArgs.back().get();
index e70bc318b84ccb016501ca760e318219a5e16139..4e0b911c142241ff6885eea189367cf573e5b457 100644 (file)
@@ -539,7 +539,7 @@ Expected<std::unique_ptr<CovMapFuncRecordReader>> CovMapFuncRecordReader::get(
 
   switch (Version) {
   case CovMapVersion::Version1:
-    return llvm::make_unique<VersionedCovMapFuncRecordReader<
+    return std::make_unique<VersionedCovMapFuncRecordReader<
         CovMapVersion::Version1, IntPtrT, Endian>>(P, R, F);
   case CovMapVersion::Version2:
   case CovMapVersion::Version3:
@@ -547,10 +547,10 @@ Expected<std::unique_ptr<CovMapFuncRecordReader>> CovMapFuncRecordReader::get(
     if (Error E = P.create(P.getNameData()))
       return std::move(E);
     if (Version == CovMapVersion::Version2)
-      return llvm::make_unique<VersionedCovMapFuncRecordReader<
+      return std::make_unique<VersionedCovMapFuncRecordReader<
           CovMapVersion::Version2, IntPtrT, Endian>>(P, R, F);
     else
-      return llvm::make_unique<VersionedCovMapFuncRecordReader<
+      return std::make_unique<VersionedCovMapFuncRecordReader<
           CovMapVersion::Version3, IntPtrT, Endian>>(P, R, F);
   }
   llvm_unreachable("Unsupported version");
index 47c8cfbbf4d0fa0373e67fb7cadcfaa215ce57b0..00e6294c57a6da18d48946e9ec47b0b2f3272eff 100644 (file)
@@ -40,7 +40,7 @@ bool GCOVFile::readGCNO(GCOVBuffer &Buffer) {
   while (true) {
     if (!Buffer.readFunctionTag())
       break;
-    auto GFun = make_unique<GCOVFunction>(*this);
+    auto GFun = std::make_unique<GCOVFunction>(*this);
     if (!GFun->readGCNO(Buffer, Version))
       return false;
     Functions.push_back(std::move(GFun));
@@ -164,7 +164,7 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
   for (uint32_t i = 0, e = BlockCount; i != e; ++i) {
     if (!Buff.readInt(Dummy))
       return false; // Block flags;
-    Blocks.push_back(make_unique<GCOVBlock>(*this, i));
+    Blocks.push_back(std::make_unique<GCOVBlock>(*this, i));
   }
 
   // read edges.
@@ -185,7 +185,7 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) {
       uint32_t Dst;
       if (!Buff.readInt(Dst))
         return false;
-      Edges.push_back(make_unique<GCOVEdge>(*Blocks[BlockNo], *Blocks[Dst]));
+      Edges.push_back(std::make_unique<GCOVEdge>(*Blocks[BlockNo], *Blocks[Dst]));
       GCOVEdge *Edge = Edges.back().get();
       Blocks[BlockNo]->addDstEdge(Edge);
       Blocks[Dst]->addSrcEdge(Edge);
@@ -702,14 +702,14 @@ std::string FileInfo::getCoveragePath(StringRef Filename,
 std::unique_ptr<raw_ostream>
 FileInfo::openCoveragePath(StringRef CoveragePath) {
   if (Options.NoOutput)
-    return llvm::make_unique<raw_null_ostream>();
+    return std::make_unique<raw_null_ostream>();
 
   std::error_code EC;
   auto OS =
-      llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text);
+      std::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text);
   if (EC) {
     errs() << EC.message() << "\n";
-    return llvm::make_unique<raw_null_ostream>();
+    return std::make_unique<raw_null_ostream>();
   }
   return std::move(OS);
 }
index fec1c152991cb48ec0789125460235d539876396..b97601ce17246869af5de1ffc3b2fd5eef915721 100644 (file)
@@ -119,7 +119,7 @@ IndexedInstrProfReader::create(std::unique_ptr<MemoryBuffer> Buffer,
   // Create the reader.
   if (!IndexedInstrProfReader::hasFormat(*Buffer))
     return make_error<InstrProfError>(instrprof_error::bad_magic);
-  auto Result = llvm::make_unique<IndexedInstrProfReader>(
+  auto Result = std::make_unique<IndexedInstrProfReader>(
       std::move(Buffer), std::move(RemappingBuffer));
 
   // Initialize the reader and return the result.
@@ -385,7 +385,7 @@ Error RawInstrProfReader<IntPtrT>::readHeader(
   NamesStart = Start + NamesOffset;
   ValueDataStart = reinterpret_cast<const uint8_t *>(Start + ValueDataOffset);
 
-  std::unique_ptr<InstrProfSymtab> NewSymtab = make_unique<InstrProfSymtab>();
+  std::unique_ptr<InstrProfSymtab> NewSymtab = std::make_unique<InstrProfSymtab>();
   if (Error E = createSymtab(*NewSymtab.get()))
     return E;
 
@@ -767,7 +767,7 @@ IndexedInstrProfReader::readSummary(IndexedInstrProf::ProfVersion Version,
         UseCS ? this->CS_Summary : this->Summary;
 
     // initialize InstrProfSummary using the SummaryData from disk.
-    Summary = llvm::make_unique<ProfileSummary>(
+    Summary = std::make_unique<ProfileSummary>(
         UseCS ? ProfileSummary::PSK_CSInstr : ProfileSummary::PSK_Instr,
         DetailedSummary, SummaryData->get(Summary::TotalBlockCount),
         SummaryData->get(Summary::MaxBlockCount),
@@ -827,18 +827,18 @@ Error IndexedInstrProfReader::readHeader() {
 
   // The rest of the file is an on disk hash table.
   auto IndexPtr =
-      llvm::make_unique<InstrProfReaderIndex<OnDiskHashTableImplV3>>(
+      std::make_unique<InstrProfReaderIndex<OnDiskHashTableImplV3>>(
           Start + HashOffset, Cur, Start, HashType, FormatVersion);
 
   // Load the remapping table now if requested.
   if (RemappingBuffer) {
-    Remapper = llvm::make_unique<
+    Remapper = std::make_unique<
         InstrProfReaderItaniumRemapper<OnDiskHashTableImplV3>>(
         std::move(RemappingBuffer), *IndexPtr);
     if (Error E = Remapper->populateRemappings())
       return E;
   } else {
-    Remapper = llvm::make_unique<InstrProfReaderNullRemapper>(*IndexPtr);
+    Remapper = std::make_unique<InstrProfReaderNullRemapper>(*IndexPtr);
   }
   Index = std::move(IndexPtr);
 
@@ -849,7 +849,7 @@ InstrProfSymtab &IndexedInstrProfReader::getSymtab() {
   if (Symtab.get())
     return *Symtab.get();
 
-  std::unique_ptr<InstrProfSymtab> NewSymtab = make_unique<InstrProfSymtab>();
+  std::unique_ptr<InstrProfSymtab> NewSymtab = std::make_unique<InstrProfSymtab>();
   if (Error E = Index->populateSymtab(*NewSymtab.get())) {
     consumeError(error(InstrProfError::take(std::move(E))));
   }
index 4d5b00935742b6d6de6bc64523df324c9aaf7b2c..3299b5f9206949ba816c48d6727968d5fec7f497 100644 (file)
@@ -93,14 +93,14 @@ void ProfileSummaryBuilder::computeDetailedSummary() {
 
 std::unique_ptr<ProfileSummary> SampleProfileSummaryBuilder::getSummary() {
   computeDetailedSummary();
-  return llvm::make_unique<ProfileSummary>(
+  return std::make_unique<ProfileSummary>(
       ProfileSummary::PSK_Sample, DetailedSummary, TotalCount, MaxCount, 0,
       MaxFunctionCount, NumCounts, NumFunctions);
 }
 
 std::unique_ptr<ProfileSummary> InstrProfSummaryBuilder::getSummary() {
   computeDetailedSummary();
-  return llvm::make_unique<ProfileSummary>(
+  return std::make_unique<ProfileSummary>(
       ProfileSummary::PSK_Instr, DetailedSummary, TotalCount, MaxCount,
       MaxInternalBlockCount, MaxFunctionCount, NumCounts, NumFunctions);
 }
index 659d6db6c6fa17d047069b077b8d30deadd89a30..2bac3e92cb00acda3ad5d2bf2fe37954c28b3256 100644 (file)
@@ -660,7 +660,7 @@ std::error_code SampleProfileReaderBinary::readSummary() {
     if (EC != sampleprof_error::success)
       return EC;
   }
-  Summary = llvm::make_unique<ProfileSummary>(
+  Summary = std::make_unique<ProfileSummary>(
       ProfileSummary::PSK_Sample, Entries, *TotalCount, *MaxBlockCount, 0,
       *MaxFunctionCount, *NumBlocks, *NumFunctions);
 
@@ -1007,7 +1007,7 @@ SampleProfileReaderItaniumRemapper::create(
   auto BufferOrError = setupMemoryBuffer(Filename);
   if (std::error_code EC = BufferOrError.getError())
     return EC;
-  return llvm::make_unique<SampleProfileReaderItaniumRemapper>(
+  return std::make_unique<SampleProfileReaderItaniumRemapper>(
       std::move(BufferOrError.get()), C, std::move(Underlying));
 }
 
index b374a7be1e5ae5cd4492c247fb209d27fefcab42..03c5697109eb4440967c3cf5116a59d0cc2992ed 100644 (file)
@@ -371,7 +371,7 @@ std::unique_ptr<MetaSerializer> BitstreamRemarkSerializer::metaSerializer(
          BitstreamRemarkContainerType::SeparateRemarksMeta);
   bool IsStandalone =
       Helper.ContainerType == BitstreamRemarkContainerType::Standalone;
-  return llvm::make_unique<BitstreamMetaSerializer>(
+  return std::make_unique<BitstreamMetaSerializer>(
       OS,
       IsStandalone ? BitstreamRemarkContainerType::Standalone
                    : BitstreamRemarkContainerType::SeparateRemarksMeta,
index 5cfca96fd9d0771b1ee226e4474b24ba93a1b26d..5c441ca343f11afe90a1285abfa5051b5fef7a4a 100644 (file)
@@ -51,7 +51,7 @@ Expected<std::unique_ptr<RemarkParser>>
 llvm::remarks::createRemarkParser(Format ParserFormat, StringRef Buf) {
   switch (ParserFormat) {
   case Format::YAML:
-    return llvm::make_unique<YAMLRemarkParser>(Buf);
+    return std::make_unique<YAMLRemarkParser>(Buf);
   case Format::YAMLStrTab:
     return createStringError(
         std::make_error_code(std::errc::invalid_argument),
@@ -75,7 +75,7 @@ llvm::remarks::createRemarkParser(Format ParserFormat, StringRef Buf,
                              "The YAML format can't be used with a string "
                              "table. Use yaml-strtab instead.");
   case Format::YAMLStrTab:
-    return llvm::make_unique<YAMLStrTabRemarkParser>(Buf, std::move(StrTab));
+    return std::make_unique<YAMLStrTabRemarkParser>(Buf, std::move(StrTab));
   case Format::Bitstream:
     return createStringError(std::make_error_code(std::errc::invalid_argument),
                              "Parsing bitstream remarks is not supported.");
index 0d5acbe3ca71b5043d355dd738e7a9254d029a08..caba7bbdc0ebf6175d2500ac7f83abc3a584726b 100644 (file)
@@ -25,11 +25,11 @@ remarks::createRemarkSerializer(Format RemarksFormat, SerializerMode Mode,
     return createStringError(std::errc::invalid_argument,
                              "Unknown remark serializer format.");
   case Format::YAML:
-    return llvm::make_unique<YAMLRemarkSerializer>(OS, Mode);
+    return std::make_unique<YAMLRemarkSerializer>(OS, Mode);
   case Format::YAMLStrTab:
-    return llvm::make_unique<YAMLStrTabRemarkSerializer>(OS, Mode);
+    return std::make_unique<YAMLStrTabRemarkSerializer>(OS, Mode);
   case Format::Bitstream:
-    return llvm::make_unique<BitstreamRemarkSerializer>(OS, Mode);
+    return std::make_unique<BitstreamRemarkSerializer>(OS, Mode);
   }
   llvm_unreachable("Unknown remarks::Format enum");
 }
@@ -46,10 +46,10 @@ remarks::createRemarkSerializer(Format RemarksFormat, SerializerMode Mode,
                              "Unable to use a string table with the yaml "
                              "format. Use 'yaml-strtab' instead.");
   case Format::YAMLStrTab:
-    return llvm::make_unique<YAMLStrTabRemarkSerializer>(OS, Mode,
+    return std::make_unique<YAMLStrTabRemarkSerializer>(OS, Mode,
                                                          std::move(StrTab));
   case Format::Bitstream:
-    return llvm::make_unique<BitstreamRemarkSerializer>(OS, Mode,
+    return std::make_unique<BitstreamRemarkSerializer>(OS, Mode,
                                                         std::move(StrTab));
   }
   llvm_unreachable("Unknown remarks::Format enum");
index 7b1e4d72dddbf70711d7e8380ca210cbc672bef2..69e8a0dfd766c800ce1b97f8877f1ac10a95b14b 100644 (file)
@@ -152,8 +152,8 @@ remarks::createYAMLParserFromMeta(StringRef Buf,
 
   std::unique_ptr<YAMLRemarkParser> Result =
       StrTab
-          ? llvm::make_unique<YAMLStrTabRemarkParser>(Buf, std::move(*StrTab))
-          : llvm::make_unique<YAMLRemarkParser>(Buf);
+          ? std::make_unique<YAMLStrTabRemarkParser>(Buf, std::move(*StrTab))
+          : std::make_unique<YAMLRemarkParser>(Buf);
   if (SeparateBuf)
     Result->SeparateBuf = std::move(SeparateBuf);
   return std::move(Result);
@@ -194,7 +194,7 @@ YAMLRemarkParser::parseRemark(yaml::Document &RemarkEntry) {
   if (!Root)
     return error("document root is not of mapping type.", *YAMLRoot);
 
-  std::unique_ptr<Remark> Result = llvm::make_unique<Remark>();
+  std::unique_ptr<Remark> Result = std::make_unique<Remark>();
   Remark &TheRemark = *Result;
 
   // First, the type. It needs special handling since is not part of the
index c4a5bccda5b21d28e7748fefd1c01dc74d1758a6..28f9150cb9f4d224ffff5abc4e5ac75698e6080b 100644 (file)
@@ -171,13 +171,13 @@ void YAMLRemarkSerializer::emit(const Remark &Remark) {
 std::unique_ptr<MetaSerializer>
 YAMLRemarkSerializer::metaSerializer(raw_ostream &OS,
                                      Optional<StringRef> ExternalFilename) {
-  return llvm::make_unique<YAMLMetaSerializer>(OS, ExternalFilename);
+  return std::make_unique<YAMLMetaSerializer>(OS, ExternalFilename);
 }
 
 std::unique_ptr<MetaSerializer> YAMLStrTabRemarkSerializer::metaSerializer(
     raw_ostream &OS, Optional<StringRef> ExternalFilename) {
   assert(StrTab);
-  return llvm::make_unique<YAMLStrTabMetaSerializer>(OS, ExternalFilename,
+  return std::make_unique<YAMLStrTabMetaSerializer>(OS, ExternalFilename,
                                                      std::move(*StrTab));
 }
 
index 902736c13d40ea3eaa41dc54ae8ad7895c361a52..2db4193ce3825fc64f58c9386f8652e21ba68923 100644 (file)
@@ -103,7 +103,7 @@ bool CodeGenCoverage::emit(StringRef CoveragePrefix,
     std::error_code EC;
     sys::fs::OpenFlags OpenFlags = sys::fs::OF_Append;
     std::unique_ptr<ToolOutputFile> CoverageFile =
-        llvm::make_unique<ToolOutputFile>(CoverageFilename, EC, OpenFlags);
+        std::make_unique<ToolOutputFile>(CoverageFilename, EC, OpenFlags);
     if (EC)
       return false;
 
index 72bc08af2ddb51de3bc530a92982142487524d4d..ae0e4b0c044b7b21a4fb36fa12cebb808004d9f3 100644 (file)
@@ -87,7 +87,7 @@ std::error_code FileError::convertToErrorCode() const {
 Error errorCodeToError(std::error_code EC) {
   if (!EC)
     return Error::success();
-  return Error(llvm::make_unique<ECError>(ECError(EC)));
+  return Error(std::make_unique<ECError>(ECError(EC)));
 }
 
 std::error_code errorToErrorCode(Error Err) {
index 16a04bc627de85bf886c71dffeb0e5a254bad3e2..143f7a46f846c90a33b6a3050386f2f02958f7cf 100644 (file)
@@ -209,7 +209,7 @@ FileCheckPattern::parseNumericVariableUse(StringRef Name, bool IsPseudo,
         "numeric variable '" + Name +
             "' defined from input on the same line as used");
 
-  return llvm::make_unique<FileCheckNumericVariableUse>(Name, NumericVariable);
+  return std::make_unique<FileCheckNumericVariableUse>(Name, NumericVariable);
 }
 
 Expected<std::unique_ptr<FileCheckExpressionAST>>
@@ -234,7 +234,7 @@ FileCheckPattern::parseNumericOperand(StringRef &Expr, AllowedOperand AO,
   // Otherwise, parse it as a literal.
   uint64_t LiteralValue;
   if (!Expr.consumeInteger(/*Radix=*/10, LiteralValue))
-    return llvm::make_unique<FileCheckExpressionLiteral>(LiteralValue);
+    return std::make_unique<FileCheckExpressionLiteral>(LiteralValue);
 
   return FileCheckErrorDiagnostic::get(SM, Expr,
                                        "invalid operand format '" + Expr + "'");
@@ -287,7 +287,7 @@ Expected<std::unique_ptr<FileCheckExpressionAST>> FileCheckPattern::parseBinop(
     return RightOpResult;
 
   Expr = Expr.ltrim(SpaceChars);
-  return llvm::make_unique<FileCheckASTBinop>(EvalBinop, std::move(LeftOp),
+  return std::make_unique<FileCheckASTBinop>(EvalBinop, std::move(LeftOp),
                                               std::move(*RightOpResult));
 }
 
@@ -862,7 +862,7 @@ template <class... Types>
 FileCheckNumericVariable *
 FileCheckPatternContext::makeNumericVariable(Types... args) {
   NumericVariables.push_back(
-      llvm::make_unique<FileCheckNumericVariable>(args...));
+      std::make_unique<FileCheckNumericVariable>(args...));
   return NumericVariables.back().get();
 }
 
@@ -870,14 +870,14 @@ FileCheckSubstitution *
 FileCheckPatternContext::makeStringSubstitution(StringRef VarName,
                                                 size_t InsertIdx) {
   Substitutions.push_back(
-      llvm::make_unique<FileCheckStringSubstitution>(this, VarName, InsertIdx));
+      std::make_unique<FileCheckStringSubstitution>(this, VarName, InsertIdx));
   return Substitutions.back().get();
 }
 
 FileCheckSubstitution *FileCheckPatternContext::makeNumericSubstitution(
     StringRef ExpressionStr,
     std::unique_ptr<FileCheckExpressionAST> ExpressionAST, size_t InsertIdx) {
-  Substitutions.push_back(llvm::make_unique<FileCheckNumericSubstitution>(
+  Substitutions.push_back(std::make_unique<FileCheckNumericSubstitution>(
       this, ExpressionStr, std::move(ExpressionAST), InsertIdx));
   return Substitutions.back().get();
 }
index 3d6b569f2993cb8c411c8a340fa52a0a899ed7fd..024dd3e57a407caddc96ef291d5788371ad0a89f 100644 (file)
@@ -121,7 +121,7 @@ createInMemoryBuffer(StringRef Path, size_t Size, unsigned Mode) {
       Size, nullptr, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC);
   if (EC)
     return errorCodeToError(EC);
-  return llvm::make_unique<InMemoryBuffer>(Path, MB, Size, Mode);
+  return std::make_unique<InMemoryBuffer>(Path, MB, Size, Mode);
 }
 
 static Expected<std::unique_ptr<FileOutputBuffer>>
@@ -146,7 +146,7 @@ createOnDiskBuffer(StringRef Path, size_t Size, unsigned Mode) {
 
   // Mmap it.
   std::error_code EC;
-  auto MappedFile = llvm::make_unique<fs::mapped_file_region>(
+  auto MappedFile = std::make_unique<fs::mapped_file_region>(
       fs::convertFDToNativeFile(File.FD), fs::mapped_file_region::readwrite,
       Size, 0, EC);
 
@@ -157,7 +157,7 @@ createOnDiskBuffer(StringRef Path, size_t Size, unsigned Mode) {
     return createInMemoryBuffer(Path, Size, Mode);
   }
 
-  return llvm::make_unique<OnDiskBuffer>(Path, std::move(File),
+  return std::make_unique<OnDiskBuffer>(Path, std::move(File),
                                          std::move(MappedFile));
 }
 
index 95e5ed6542771c7ccc38085e05d5bd486df83414..16b1d11efd0852e3b70ab122f97944a402fffeac 100644 (file)
@@ -502,7 +502,7 @@ bool Parser::parseError(const char *Msg) {
     }
   }
   Err.emplace(
-      llvm::make_unique<ParseError>(Msg, Line, P - StartOfLine, P - Start));
+      std::make_unique<ParseError>(Msg, Line, P - StartOfLine, P - Start));
   return false;
 }
 } // namespace
index 96e09f9552bbcef20911603517aedd61ab9c136f..9bd1f18a4ee7d9a06d36ce6397aed70025c417d7 100644 (file)
@@ -53,7 +53,7 @@ bool SpecialCaseList::Matcher::insert(std::string Regexp,
     return false;
 
   RegExes.emplace_back(
-      std::make_pair(make_unique<Regex>(std::move(CheckRE)), LineNumber));
+      std::make_pair(std::make_unique<Regex>(std::move(CheckRE)), LineNumber));
   return true;
 }
 
@@ -175,7 +175,7 @@ bool SpecialCaseList::parse(const MemoryBuffer *MB,
 
     // Create this section if it has not been seen before.
     if (SectionsMap.find(Section) == SectionsMap.end()) {
-      std::unique_ptr<Matcher> M = make_unique<Matcher>();
+      std::unique_ptr<Matcher> M = std::make_unique<Matcher>();
       std::string REError;
       if (!M->insert(Section, LineNo, REError)) {
         Error = (Twine("malformed section ") + Section + ": '" + REError).str();
index 17de654a1def4713e739486c9dcdc3e0ab61ae65..10c9b8e0b329cb612d01f56ef8503635d476ff97 100644 (file)
@@ -58,23 +58,23 @@ namespace {
 std::unique_ptr<raw_fd_ostream> llvm::CreateInfoOutputFile() {
   const std::string &OutputFilename = getLibSupportInfoOutputFilename();
   if (OutputFilename.empty())
-    return llvm::make_unique<raw_fd_ostream>(2, false); // stderr.
+    return std::make_unique<raw_fd_ostream>(2, false); // stderr.
   if (OutputFilename == "-")
-    return llvm::make_unique<raw_fd_ostream>(1, false); // stdout.
+    return std::make_unique<raw_fd_ostream>(1, false); // stdout.
 
   // Append mode is used because the info output file is opened and closed
   // each time -stats or -time-passes wants to print output to it. To
   // compensate for this, the test-suite Makefiles have code to delete the
   // info output file before running commands which write to it.
   std::error_code EC;
-  auto Result = llvm::make_unique<raw_fd_ostream>(
+  auto Result = std::make_unique<raw_fd_ostream>(
       OutputFilename, EC, sys::fs::OF_Append | sys::fs::OF_Text);
   if (!EC)
     return Result;
 
   errs() << "Error opening info-output-file '"
     << OutputFilename << " for appending!\n";
-  return llvm::make_unique<raw_fd_ostream>(2, false); // stderr.
+  return std::make_unique<raw_fd_ostream>(2, false); // stderr.
 }
 
 namespace {
index bf277aa3069d6d56283fbcb503c1f634b48d28b7..cbc03821940499608441085e93b0414559c4ea81 100644 (file)
@@ -443,7 +443,7 @@ static bool is_local_impl(struct STATVFS &Vfs) {
   std::unique_ptr<char[]> Buf;
   int Tries = 3;
   while (Tries--) {
-    Buf = llvm::make_unique<char[]>(BufSize);
+    Buf = std::make_unique<char[]>(BufSize);
     Ret = mntctl(MCTL_QUERY, BufSize, Buf.get());
     if (Ret != 0)
       break;
index 5d3480e97148d1f10bb9306c0b13b49347daee2b..e4197c18cc99cd3f26a1b09ce29660573e61115b 100644 (file)
@@ -349,7 +349,7 @@ IntrusiveRefCntPtr<FileSystem> vfs::getRealFileSystem() {
 }
 
 std::unique_ptr<FileSystem> vfs::createPhysicalFileSystem() {
-  return llvm::make_unique<RealFileSystem>(false);
+  return std::make_unique<RealFileSystem>(false);
 }
 
 namespace {
@@ -754,7 +754,7 @@ bool InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
           ResolvedUser, ResolvedGroup, 0, sys::fs::file_type::directory_file,
           NewDirectoryPerms);
       Dir = cast<detail::InMemoryDirectory>(Dir->addChild(
-          Name, llvm::make_unique<detail::InMemoryDirectory>(std::move(Stat))));
+          Name, std::make_unique<detail::InMemoryDirectory>(std::move(Stat))));
       continue;
     }
 
@@ -1209,7 +1209,7 @@ class llvm::vfs::RedirectingFileSystemParser {
 
     // ... or create a new one
     std::unique_ptr<RedirectingFileSystem::Entry> E =
-        llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
+        std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
             Name, Status("", getNextVirtualUniqueID(),
                          std::chrono::system_clock::now(), 0, 0, 0,
                          file_type::directory_file, sys::fs::all_all));
@@ -1252,7 +1252,7 @@ class llvm::vfs::RedirectingFileSystemParser {
       auto *DE = dyn_cast<RedirectingFileSystem::RedirectingDirectoryEntry>(
           NewParentE);
       DE->addContent(
-          llvm::make_unique<RedirectingFileSystem::RedirectingFileEntry>(
+          std::make_unique<RedirectingFileSystem::RedirectingFileEntry>(
               Name, FE->getExternalContentsPath(), FE->getUseName()));
       break;
     }
@@ -1423,12 +1423,12 @@ class llvm::vfs::RedirectingFileSystemParser {
     std::unique_ptr<RedirectingFileSystem::Entry> Result;
     switch (Kind) {
     case RedirectingFileSystem::EK_File:
-      Result = llvm::make_unique<RedirectingFileSystem::RedirectingFileEntry>(
+      Result = std::make_unique<RedirectingFileSystem::RedirectingFileEntry>(
           LastComponent, std::move(ExternalContentsPath), UseExternalName);
       break;
     case RedirectingFileSystem::EK_Directory:
       Result =
-          llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
+          std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
               LastComponent, std::move(EntryArrayContents),
               Status("", getNextVirtualUniqueID(),
                      std::chrono::system_clock::now(), 0, 0, 0,
@@ -1447,7 +1447,7 @@ class llvm::vfs::RedirectingFileSystemParser {
       std::vector<std::unique_ptr<RedirectingFileSystem::Entry>> Entries;
       Entries.push_back(std::move(Result));
       Result =
-          llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
+          std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>(
               *I, std::move(Entries),
               Status("", getNextVirtualUniqueID(),
                      std::chrono::system_clock::now(), 0, 0, 0,
@@ -1763,7 +1763,7 @@ RedirectingFileSystem::openFileForRead(const Twine &Path) {
   Status S = getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames),
                                      *ExternalStatus);
   return std::unique_ptr<File>(
-      llvm::make_unique<FileWithFixedStatus>(std::move(*Result), S));
+      std::make_unique<FileWithFixedStatus>(std::move(*Result), S));
 }
 
 std::error_code
index 09eb36943de9f7d5c882bc1648628c0ce8139630..7706fc3c1f23f1b374c86be21b8e49b33eec17cb 100644 (file)
@@ -377,12 +377,12 @@ std::unique_ptr<Input::HNode> Input::createHNodes(Node *N) {
       // Copy string to permanent storage
       KeyStr = StringStorage.str().copy(StringAllocator);
     }
-    return llvm::make_unique<ScalarHNode>(N, KeyStr);
+    return std::make_unique<ScalarHNode>(N, KeyStr);
   } else if (BlockScalarNode *BSN = dyn_cast<BlockScalarNode>(N)) {
     StringRef ValueCopy = BSN->getValue().copy(StringAllocator);
-    return llvm::make_unique<ScalarHNode>(N, ValueCopy);
+    return std::make_unique<ScalarHNode>(N, ValueCopy);
   } else if (SequenceNode *SQ = dyn_cast<SequenceNode>(N)) {
-    auto SQHNode = llvm::make_unique<SequenceHNode>(N);
+    auto SQHNode = std::make_unique<SequenceHNode>(N);
     for (Node &SN : *SQ) {
       auto Entry = createHNodes(&SN);
       if (EC)
@@ -391,7 +391,7 @@ std::unique_ptr<Input::HNode> Input::createHNodes(Node *N) {
     }
     return std::move(SQHNode);
   } else if (MappingNode *Map = dyn_cast<MappingNode>(N)) {
-    auto mapHNode = llvm::make_unique<MapHNode>(N);
+    auto mapHNode = std::make_unique<MapHNode>(N);
     for (KeyValueNode &KVN : *Map) {
       Node *KeyNode = KVN.getKey();
       ScalarNode *Key = dyn_cast<ScalarNode>(KeyNode);
@@ -416,7 +416,7 @@ std::unique_ptr<Input::HNode> Input::createHNodes(Node *N) {
     }
     return std::move(mapHNode);
   } else if (isa<NullNode>(N)) {
-    return llvm::make_unique<EmptyHNode>(N);
+    return std::make_unique<EmptyHNode>(N);
   } else {
     setError(N, "unknown node kind");
     return nullptr;
index f1a6fdf87cf2b7f6dbec12d22801bdcfd6e98c8f..a83d0f441a4bde5969d32b15e6fc09915c7c44e3 100644 (file)
@@ -886,7 +886,7 @@ public:
 
 llvm::SMTSolverRef llvm::CreateZ3Solver() {
 #if LLVM_WITH_Z3
-  return llvm::make_unique<Z3Solver>();
+  return std::make_unique<Z3Solver>();
 #else
   llvm::report_fatal_error("LLVM was not compiled with Z3 support, rebuild "
                            "with -DLLVM_ENABLE_Z3_SOLVER=ON",
index 27d1bdc7f4c300b4f567f3397c2719755be65b24..e4ab39df0873f08fcb2112ede01e985a06ee1296 100644 (file)
@@ -1616,7 +1616,7 @@ void VarDefInit::Profile(FoldingSetNodeID &ID) const {
 DefInit *VarDefInit::instantiate() {
   if (!Def) {
     RecordKeeper &Records = Class->getRecords();
-    auto NewRecOwner = make_unique<Record>(Records.getNewAnonymousName(),
+    auto NewRecOwner = std::make_unique<Record>(Records.getNewAnonymousName(),
                                            Class->getLoc(), Records,
                                            /*IsAnonymous=*/true);
     Record *NewRec = NewRecOwner.get();
index a870e41d58f8da0251924744bd303d16c77da1aa..5a30ee98cce93ff276525f52b9fadfb1209a14ec 100644 (file)
@@ -255,16 +255,16 @@ void SetTheory::Operator::anchor() {}
 void SetTheory::Expander::anchor() {}
 
 SetTheory::SetTheory() {
-  addOperator("add", llvm::make_unique<AddOp>());
-  addOperator("sub", llvm::make_unique<SubOp>());
-  addOperator("and", llvm::make_unique<AndOp>());
-  addOperator("shl", llvm::make_unique<ShlOp>());
-  addOperator("trunc", llvm::make_unique<TruncOp>());
-  addOperator("rotl", llvm::make_unique<RotOp>(false));
-  addOperator("rotr", llvm::make_unique<RotOp>(true));
-  addOperator("decimate", llvm::make_unique<DecimateOp>());
-  addOperator("interleave", llvm::make_unique<InterleaveOp>());
-  addOperator("sequence", llvm::make_unique<SequenceOp>());
+  addOperator("add", std::make_unique<AddOp>());
+  addOperator("sub", std::make_unique<SubOp>());
+  addOperator("and", std::make_unique<AndOp>());
+  addOperator("shl", std::make_unique<ShlOp>());
+  addOperator("trunc", std::make_unique<TruncOp>());
+  addOperator("rotl", std::make_unique<RotOp>(false));
+  addOperator("rotr", std::make_unique<RotOp>(true));
+  addOperator("decimate", std::make_unique<DecimateOp>());
+  addOperator("interleave", std::make_unique<InterleaveOp>());
+  addOperator("sequence", std::make_unique<SequenceOp>());
 }
 
 void SetTheory::addOperator(StringRef Name, std::unique_ptr<Operator> Op) {
@@ -276,7 +276,7 @@ void SetTheory::addExpander(StringRef ClassName, std::unique_ptr<Expander> E) {
 }
 
 void SetTheory::addFieldExpander(StringRef ClassName, StringRef FieldName) {
-  addExpander(ClassName, llvm::make_unique<FieldExpander>(FieldName));
+  addExpander(ClassName, std::make_unique<FieldExpander>(FieldName));
 }
 
 void SetTheory::evaluate(Init *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) {
index d28c62b3133d34444cd0e93d3ff2d46db596f3cb..da2286e41fe594fe79787f242c0de9762c624c5d 100644 (file)
@@ -51,7 +51,7 @@ TGLexer::TGLexer(SourceMgr &SM, ArrayRef<std::string> Macros) : SrcMgr(SM) {
 
   // Pretend that we enter the "top-level" include file.
   PrepIncludeStack.push_back(
-      make_unique<std::vector<PreprocessorControlDesc>>());
+      std::make_unique<std::vector<PreprocessorControlDesc>>());
 
   // Put all macros defined in the command line into the DefinedMacros set.
   std::for_each(Macros.begin(), Macros.end(),
@@ -393,7 +393,7 @@ bool TGLexer::LexInclude() {
   CurPtr = CurBuf.begin();
 
   PrepIncludeStack.push_back(
-      make_unique<std::vector<PreprocessorControlDesc>>());
+      std::make_unique<std::vector<PreprocessorControlDesc>>());
   return false;
 }
 
index a9ace152d59ee012df3a0e007edad6aee022a707..a076966aff0cb4d5e774526e9dadf9368237f584 100644 (file)
@@ -378,7 +378,7 @@ bool TGParser::resolve(const ForeachLoop &Loop, SubstStack &Substs,
   auto LI = dyn_cast<ListInit>(List);
   if (!LI) {
     if (!Final) {
-      Dest->emplace_back(make_unique<ForeachLoop>(Loop.Loc, Loop.IterVar,
+      Dest->emplace_back(std::make_unique<ForeachLoop>(Loop.Loc, Loop.IterVar,
                                                   List));
       return resolve(Loop.Entries, Substs, Final, &Dest->back().Loop->Entries,
                      Loc);
@@ -413,7 +413,7 @@ bool TGParser::resolve(const std::vector<RecordsEntry> &Source,
     if (E.Loop) {
       Error = resolve(*E.Loop, Substs, Final, Dest);
     } else {
-      auto Rec = make_unique<Record>(*E.Rec);
+      auto Rec = std::make_unique<Record>(*E.Rec);
       if (Loc)
         Rec->appendLoc(*Loc);
 
@@ -1330,7 +1330,7 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
     std::unique_ptr<Record> ParseRecTmp;
     Record *ParseRec = CurRec;
     if (!ParseRec) {
-      ParseRecTmp = make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
+      ParseRecTmp = std::make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
       ParseRec = ParseRecTmp.get();
     }
 
@@ -1597,7 +1597,7 @@ Init *TGParser::ParseOperation(Record *CurRec, RecTy *ItemType) {
     std::unique_ptr<Record> ParseRecTmp;
     Record *ParseRec = CurRec;
     if (!ParseRec) {
-      ParseRecTmp = make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
+      ParseRecTmp = std::make_unique<Record>(".parse", ArrayRef<SMLoc>{}, Records);
       ParseRec = ParseRecTmp.get();
     }
 
@@ -2702,10 +2702,10 @@ bool TGParser::ParseDef(MultiClass *CurMultiClass) {
     return true;
 
   if (isa<UnsetInit>(Name))
-    CurRec = make_unique<Record>(Records.getNewAnonymousName(), DefLoc, Records,
+    CurRec = std::make_unique<Record>(Records.getNewAnonymousName(), DefLoc, Records,
                                  /*Anonymous=*/true);
   else
-    CurRec = make_unique<Record>(Name, DefLoc, Records);
+    CurRec = std::make_unique<Record>(Name, DefLoc, Records);
 
   if (ParseObjectBody(CurRec.get()))
     return true;
@@ -2783,7 +2783,7 @@ bool TGParser::ParseForeach(MultiClass *CurMultiClass) {
   Lex.Lex();  // Eat the in
 
   // Create a loop object and remember it.
-  Loops.push_back(llvm::make_unique<ForeachLoop>(Loc, IterName, ListValue));
+  Loops.push_back(std::make_unique<ForeachLoop>(Loc, IterName, ListValue));
 
   if (Lex.getCode() != tgtok::l_brace) {
     // FOREACH Declaration IN Object
@@ -2834,7 +2834,7 @@ bool TGParser::ParseClass() {
   } else {
     // If this is the first reference to this class, create and add it.
     auto NewRec =
-        llvm::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
+        std::make_unique<Record>(Lex.getCurStrVal(), Lex.getLoc(), Records,
                                   /*Class=*/true);
     CurRec = NewRec.get();
     Records.addClass(std::move(NewRec));
@@ -2963,7 +2963,7 @@ bool TGParser::ParseMultiClass() {
 
   auto Result =
     MultiClasses.insert(std::make_pair(Name,
-                    llvm::make_unique<MultiClass>(Name, Lex.getLoc(),Records)));
+                    std::make_unique<MultiClass>(Name, Lex.getLoc(),Records)));
 
   if (!Result.second)
     return TokError("multiclass '" + Name + "' already defined");
index 9b28a0b69a7348a46f23a1f581cf50a4203393ad..13d389cec7a0776d53fbe2d37fc2a034290e7a5f 100644 (file)
@@ -616,7 +616,7 @@ void AArch64A57FPLoadBalancing::scanInstruction(
     LLVM_DEBUG(dbgs() << "New chain started for register "
                       << printReg(DestReg, TRI) << " at " << *MI);
 
-    auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
+    auto G = std::make_unique<Chain>(MI, Idx, getColor(DestReg));
     ActiveChains[DestReg] = G.get();
     AllChains.push_back(std::move(G));
 
@@ -661,7 +661,7 @@ void AArch64A57FPLoadBalancing::scanInstruction(
 
     LLVM_DEBUG(dbgs() << "Creating new chain for dest register "
                       << printReg(DestReg, TRI) << "\n");
-    auto G = llvm::make_unique<Chain>(MI, Idx, getColor(DestReg));
+    auto G = std::make_unique<Chain>(MI, Idx, getColor(DestReg));
     ActiveChains[DestReg] = G.get();
     AllChains.push_back(std::move(G));
 
index f368a570ad268d358a6fbf8ddcf029b9d69e5a0e..05112afb4172d3d666b15b12a95ff968eb724255 100644 (file)
@@ -291,7 +291,7 @@ bool AArch64Subtarget::supportsAddressTopByteIgnored() const {
 
 std::unique_ptr<PBQPRAConstraint>
 AArch64Subtarget::getCustomPBQPConstraints() const {
-  return balanceFPOps() ? llvm::make_unique<A57ChainingConstraint>() : nullptr;
+  return balanceFPOps() ? std::make_unique<A57ChainingConstraint>() : nullptr;
 }
 
 void AArch64Subtarget::mirFileLoaded(MachineFunction &MF) const {
index 86546148049977fcc96fbfda347b429cfcf11b52..f7a90759a206d33d2860af9335cb874fb22cd980 100644 (file)
@@ -187,11 +187,11 @@ extern "C" void LLVMInitializeAArch64Target() {
 //===----------------------------------------------------------------------===//
 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
   if (TT.isOSBinFormatMachO())
-    return llvm::make_unique<AArch64_MachoTargetObjectFile>();
+    return std::make_unique<AArch64_MachoTargetObjectFile>();
   if (TT.isOSBinFormatCOFF())
-    return llvm::make_unique<AArch64_COFFTargetObjectFile>();
+    return std::make_unique<AArch64_COFFTargetObjectFile>();
 
-  return llvm::make_unique<AArch64_ELFTargetObjectFile>();
+  return std::make_unique<AArch64_ELFTargetObjectFile>();
 }
 
 // Helper function to build a DataLayout string
@@ -310,7 +310,7 @@ AArch64TargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<AArch64Subtarget>(TargetTriple, CPU, FS, *this,
+    I = std::make_unique<AArch64Subtarget>(TargetTriple, CPU, FS, *this,
                                             isLittle);
   }
   return I.get();
index d4af242512a479fa83afb39de56b15c88152089c..94ce04c6e34716b57e4faeebd70cc1d5416f8a79 100644 (file)
@@ -1800,7 +1800,7 @@ public:
 
   static std::unique_ptr<AArch64Operand>
   CreateToken(StringRef Str, bool IsSuffix, SMLoc S, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_Token, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_Token, Ctx);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->Tok.IsSuffix = IsSuffix;
@@ -1815,7 +1815,7 @@ public:
             AArch64_AM::ShiftExtendType ExtTy = AArch64_AM::LSL,
             unsigned ShiftAmount = 0,
             unsigned HasExplicitAmount = false) {
-    auto Op = make_unique<AArch64Operand>(k_Register, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_Register, Ctx);
     Op->Reg.RegNum = RegNum;
     Op->Reg.Kind = Kind;
     Op->Reg.ElementWidth = 0;
@@ -1847,7 +1847,7 @@ public:
   CreateVectorList(unsigned RegNum, unsigned Count, unsigned NumElements,
                    unsigned ElementWidth, RegKind RegisterKind, SMLoc S, SMLoc E,
                    MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_VectorList, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_VectorList, Ctx);
     Op->VectorList.RegNum = RegNum;
     Op->VectorList.Count = Count;
     Op->VectorList.NumElements = NumElements;
@@ -1860,7 +1860,7 @@ public:
 
   static std::unique_ptr<AArch64Operand>
   CreateVectorIndex(unsigned Idx, SMLoc S, SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_VectorIndex, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_VectorIndex, Ctx);
     Op->VectorIndex.Val = Idx;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -1869,7 +1869,7 @@ public:
 
   static std::unique_ptr<AArch64Operand> CreateImm(const MCExpr *Val, SMLoc S,
                                                    SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_Immediate, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_Immediate, Ctx);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -1880,7 +1880,7 @@ public:
                                                           unsigned ShiftAmount,
                                                           SMLoc S, SMLoc E,
                                                           MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_ShiftedImm, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_ShiftedImm, Ctx);
     Op->ShiftedImm .Val = Val;
     Op->ShiftedImm.ShiftAmount = ShiftAmount;
     Op->StartLoc = S;
@@ -1890,7 +1890,7 @@ public:
 
   static std::unique_ptr<AArch64Operand>
   CreateCondCode(AArch64CC::CondCode Code, SMLoc S, SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_CondCode, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_CondCode, Ctx);
     Op->CondCode.Code = Code;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -1899,7 +1899,7 @@ public:
 
   static std::unique_ptr<AArch64Operand>
   CreateFPImm(APFloat Val, bool IsExact, SMLoc S, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_FPImm, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_FPImm, Ctx);
     Op->FPImm.Val = Val.bitcastToAPInt().getSExtValue();
     Op->FPImm.IsExact = IsExact;
     Op->StartLoc = S;
@@ -1911,7 +1911,7 @@ public:
                                                        StringRef Str,
                                                        SMLoc S,
                                                        MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_Barrier, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_Barrier, Ctx);
     Op->Barrier.Val = Val;
     Op->Barrier.Data = Str.data();
     Op->Barrier.Length = Str.size();
@@ -1925,7 +1925,7 @@ public:
                                                       uint32_t MSRReg,
                                                       uint32_t PStateField,
                                                       MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_SysReg, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_SysReg, Ctx);
     Op->SysReg.Data = Str.data();
     Op->SysReg.Length = Str.size();
     Op->SysReg.MRSReg = MRSReg;
@@ -1938,7 +1938,7 @@ public:
 
   static std::unique_ptr<AArch64Operand> CreateSysCR(unsigned Val, SMLoc S,
                                                      SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_SysCR, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_SysCR, Ctx);
     Op->SysCRImm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -1949,7 +1949,7 @@ public:
                                                         StringRef Str,
                                                         SMLoc S,
                                                         MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_Prefetch, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_Prefetch, Ctx);
     Op->Prefetch.Val = Val;
     Op->Barrier.Data = Str.data();
     Op->Barrier.Length = Str.size();
@@ -1962,7 +1962,7 @@ public:
                                                        StringRef Str,
                                                        SMLoc S,
                                                        MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_PSBHint, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_PSBHint, Ctx);
     Op->PSBHint.Val = Val;
     Op->PSBHint.Data = Str.data();
     Op->PSBHint.Length = Str.size();
@@ -1975,7 +1975,7 @@ public:
                                                        StringRef Str,
                                                        SMLoc S,
                                                        MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_BTIHint, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_BTIHint, Ctx);
     Op->BTIHint.Val = Val << 1 | 32;
     Op->BTIHint.Data = Str.data();
     Op->BTIHint.Length = Str.size();
@@ -1987,7 +1987,7 @@ public:
   static std::unique_ptr<AArch64Operand>
   CreateShiftExtend(AArch64_AM::ShiftExtendType ShOp, unsigned Val,
                     bool HasExplicitAmount, SMLoc S, SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<AArch64Operand>(k_ShiftExtend, Ctx);
+    auto Op = std::make_unique<AArch64Operand>(k_ShiftExtend, Ctx);
     Op->ShiftExtend.Type = ShOp;
     Op->ShiftExtend.Amount = Val;
     Op->ShiftExtend.HasExplicitAmount = HasExplicitAmount;
index d951683153edee5fad3d98ac907fb149bc7cd06a..81d1448a02c4aaee7916c698df26a2233d0546b2 100644 (file)
@@ -448,5 +448,5 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createAArch64ELFObjectWriter(uint8_t OSABI, bool IsILP32) {
-  return llvm::make_unique<AArch64ELFObjectWriter>(OSABI, IsILP32);
+  return std::make_unique<AArch64ELFObjectWriter>(OSABI, IsILP32);
 }
index b3ce5ef22eef5f38d48793f45532f3c31d42cb41..cb6eaeceeed8c791dc5d1c99a5286c4b46511e2b 100644 (file)
@@ -406,6 +406,6 @@ void AArch64MachObjectWriter::recordRelocation(
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createAArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype,
                                     bool IsILP32) {
-  return llvm::make_unique<AArch64MachObjectWriter>(CPUType, CPUSubtype,
+  return std::make_unique<AArch64MachObjectWriter>(CPUType, CPUSubtype,
                                                     IsILP32);
 }
index a45880a074272104e5ae22ffabba7c3a901e24d1..aa50bd05cb71b005659ef4fa8c7f989f1f3d814c 100644 (file)
@@ -120,7 +120,7 @@ bool AArch64WinCOFFObjectWriter::recordRelocation(const MCFixup &Fixup) const {
 namespace llvm {
 
 std::unique_ptr<MCObjectTargetWriter> createAArch64WinCOFFObjectWriter() {
-  return llvm::make_unique<AArch64WinCOFFObjectWriter>();
+  return std::make_unique<AArch64WinCOFFObjectWriter>();
 }
 
 } // end namespace llvm
index 2eecddbd7b01345ac22e1310a9580cad3748da10..80ac8ca67bcd1eddd251e44b1e06e039201ec698 100644 (file)
@@ -52,7 +52,7 @@ public:
 class MetadataStreamerV3 final : public MetadataStreamer {
 private:
   std::unique_ptr<msgpack::Document> HSAMetadataDoc =
-      llvm::make_unique<msgpack::Document>();
+      std::make_unique<msgpack::Document>();
 
   void dump(StringRef HSAMetadataString) const;
 
index a5bac25701a0fee2f5f0032f6d8678c3f9cd7946..ec2257f32f3fdf821d3b899f0f8c47920eddb95c 100644 (file)
@@ -682,9 +682,9 @@ bool AMDGPULibFunc::parse(StringRef FuncName, AMDGPULibFunc &F) {
   }
 
   if (eatTerm(FuncName, "_Z"))
-    F.Impl = make_unique<AMDGPUMangledLibFunc>();
+    F.Impl = std::make_unique<AMDGPUMangledLibFunc>();
   else
-    F.Impl = make_unique<AMDGPUUnmangledLibFunc>();
+    F.Impl = std::make_unique<AMDGPUUnmangledLibFunc>();
   if (F.Impl->parseFuncName(FuncName))
     return true;
 
index f9a9679ac68c5641536f0528faa1754f30ce61c4..e2cdb659a2319be04e92274d671df73e20512d17 100644 (file)
@@ -881,8 +881,8 @@ struct FillMFMAShadowMutation : ScheduleDAGMutation {
 
 void GCNSubtarget::getPostRAMutations(
     std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const {
-  Mutations.push_back(llvm::make_unique<MemOpClusterMutation>(&InstrInfo));
-  Mutations.push_back(llvm::make_unique<FillMFMAShadowMutation>(&InstrInfo));
+  Mutations.push_back(std::make_unique<MemOpClusterMutation>(&InstrInfo));
+  Mutations.push_back(std::make_unique<FillMFMAShadowMutation>(&InstrInfo));
 }
 
 const AMDGPUSubtarget &AMDGPUSubtarget::get(const MachineFunction &MF) {
index 8a64ee477650c52253c12170834b313bd28d7772..ed947d0d38b59904f2bb14ba69b17424720f1d96 100644 (file)
@@ -244,11 +244,11 @@ extern "C" void LLVMInitializeAMDGPUTarget() {
 }
 
 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
-  return llvm::make_unique<AMDGPUTargetObjectFile>();
+  return std::make_unique<AMDGPUTargetObjectFile>();
 }
 
 static ScheduleDAGInstrs *createR600MachineScheduler(MachineSchedContext *C) {
-  return new ScheduleDAGMILive(C, llvm::make_unique<R600SchedStrategy>());
+  return new ScheduleDAGMILive(C, std::make_unique<R600SchedStrategy>());
 }
 
 static ScheduleDAGInstrs *createSIMachineScheduler(MachineSchedContext *C) {
@@ -258,7 +258,7 @@ static ScheduleDAGInstrs *createSIMachineScheduler(MachineSchedContext *C) {
 static ScheduleDAGInstrs *
 createGCNMaxOccupancyMachineScheduler(MachineSchedContext *C) {
   ScheduleDAGMILive *DAG =
-    new GCNScheduleDAGMILive(C, make_unique<GCNMaxOccupancySchedStrategy>(C));
+    new GCNScheduleDAGMILive(C, std::make_unique<GCNMaxOccupancySchedStrategy>(C));
   DAG->addMutation(createLoadClusterDAGMutation(DAG->TII, DAG->TRI));
   DAG->addMutation(createStoreClusterDAGMutation(DAG->TII, DAG->TRI));
   DAG->addMutation(createAMDGPUMacroFusionDAGMutation());
@@ -484,7 +484,7 @@ const R600Subtarget *R600TargetMachine::getSubtargetImpl(
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<R600Subtarget>(TargetTriple, GPU, FS, *this);
+    I = std::make_unique<R600Subtarget>(TargetTriple, GPU, FS, *this);
   }
 
   return I.get();
@@ -520,7 +520,7 @@ const GCNSubtarget *GCNTargetMachine::getSubtargetImpl(const Function &F) const
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<GCNSubtarget>(TargetTriple, GPU, FS, *this);
+    I = std::make_unique<GCNSubtarget>(TargetTriple, GPU, FS, *this);
   }
 
   I->setScalarizeGlobalBehavior(ScalarizeGlobal);
index 43d71425a3d2699b946014c34c75171f1fefd3ae..2ec44bdb910f40bbec816d5b33f1ca24e05023e3 100644 (file)
@@ -889,7 +889,7 @@ public:
                                       int64_t Val, SMLoc Loc,
                                       ImmTy Type = ImmTyNone,
                                       bool IsFPImm = false) {
-    auto Op = llvm::make_unique<AMDGPUOperand>(Immediate, AsmParser);
+    auto Op = std::make_unique<AMDGPUOperand>(Immediate, AsmParser);
     Op->Imm.Val = Val;
     Op->Imm.IsFPImm = IsFPImm;
     Op->Imm.Type = Type;
@@ -902,7 +902,7 @@ public:
   static AMDGPUOperand::Ptr CreateToken(const AMDGPUAsmParser *AsmParser,
                                         StringRef Str, SMLoc Loc,
                                         bool HasExplicitEncodingSize = true) {
-    auto Res = llvm::make_unique<AMDGPUOperand>(Token, AsmParser);
+    auto Res = std::make_unique<AMDGPUOperand>(Token, AsmParser);
     Res->Tok.Data = Str.data();
     Res->Tok.Length = Str.size();
     Res->StartLoc = Loc;
@@ -913,7 +913,7 @@ public:
   static AMDGPUOperand::Ptr CreateReg(const AMDGPUAsmParser *AsmParser,
                                       unsigned RegNo, SMLoc S,
                                       SMLoc E) {
-    auto Op = llvm::make_unique<AMDGPUOperand>(Register, AsmParser);
+    auto Op = std::make_unique<AMDGPUOperand>(Register, AsmParser);
     Op->Reg.RegNo = RegNo;
     Op->Reg.Mods = Modifiers();
     Op->StartLoc = S;
@@ -923,7 +923,7 @@ public:
 
   static AMDGPUOperand::Ptr CreateExpr(const AMDGPUAsmParser *AsmParser,
                                        const class MCExpr *Expr, SMLoc S) {
-    auto Op = llvm::make_unique<AMDGPUOperand>(Expression, AsmParser);
+    auto Op = std::make_unique<AMDGPUOperand>(Expression, AsmParser);
     Op->Expr = Expr;
     Op->StartLoc = S;
     Op->EndLoc = S;
index 3525174223bdc317c8142a7ad13ff856f0610b31..90ab6a14ce20dad11c7eca3f6becb72f0eb86bda 100644 (file)
@@ -237,7 +237,7 @@ public:
 
 GCNIterativeScheduler::GCNIterativeScheduler(MachineSchedContext *C,
                                              StrategyKind S)
-  : BaseClass(C, llvm::make_unique<SchedStrategyStub>())
+  : BaseClass(C, std::make_unique<SchedStrategyStub>())
   , Context(C)
   , Strategy(S)
   , UPTracker(*LIS) {
index 6549a8d7d59246bb88bc15c8914cab280857ea9f..d352219a7a98229d42a3c3bba07d0ea70d40efa9 100644 (file)
@@ -87,7 +87,7 @@ std::unique_ptr<MCObjectTargetWriter>
 llvm::createAMDGPUELFObjectWriter(bool Is64Bit, uint8_t OSABI,
                                   bool HasRelocationAddend,
                                   uint8_t ABIVersion) {
-  return llvm::make_unique<AMDGPUELFObjectWriter>(Is64Bit, OSABI,
+  return std::make_unique<AMDGPUELFObjectWriter>(Is64Bit, OSABI,
                                                   HasRelocationAddend,
                                                   ABIVersion);
 }
index c89d5b71ec5c3ccd5fbc77692278579acca2b203..dcb04e426584f5008a44c5f58bd48483ac1cd371 100644 (file)
@@ -1483,12 +1483,12 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) {
 
       if (BI.Incoming) {
         if (!Brackets)
-          Brackets = llvm::make_unique<WaitcntBrackets>(*BI.Incoming);
+          Brackets = std::make_unique<WaitcntBrackets>(*BI.Incoming);
         else
           *Brackets = *BI.Incoming;
       } else {
         if (!Brackets)
-          Brackets = llvm::make_unique<WaitcntBrackets>(ST);
+          Brackets = std::make_unique<WaitcntBrackets>(ST);
         else
           Brackets->clear();
       }
@@ -1508,7 +1508,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) {
             if (!MoveBracketsToSucc) {
               MoveBracketsToSucc = &SuccBI;
             } else {
-              SuccBI.Incoming = llvm::make_unique<WaitcntBrackets>(*Brackets);
+              SuccBI.Incoming = std::make_unique<WaitcntBrackets>(*Brackets);
             }
           } else if (SuccBI.Incoming->merge(*Brackets)) {
             SuccBI.Dirty = true;
index f19b20ceb5da0d2a095623a3906b3b5a0949b6d8..6e4111eca1a9ca769f032a535323830d13c50c5a 100644 (file)
@@ -873,7 +873,7 @@ public:
     assert(BufferRsrc);
     auto PSV = BufferPSVs.try_emplace(
       BufferRsrc,
-      llvm::make_unique<AMDGPUBufferPseudoSourceValue>(TII));
+      std::make_unique<AMDGPUBufferPseudoSourceValue>(TII));
     return PSV.first->second.get();
   }
 
@@ -882,14 +882,14 @@ public:
     assert(ImgRsrc);
     auto PSV = ImagePSVs.try_emplace(
       ImgRsrc,
-      llvm::make_unique<AMDGPUImagePseudoSourceValue>(TII));
+      std::make_unique<AMDGPUImagePseudoSourceValue>(TII));
     return PSV.first->second.get();
   }
 
   const AMDGPUGWSResourcePseudoSourceValue *getGWSPSV(const SIInstrInfo &TII) {
     if (!GWSResourcePSV) {
       GWSResourcePSV =
-          llvm::make_unique<AMDGPUGWSResourcePseudoSourceValue>(TII);
+          std::make_unique<AMDGPUGWSResourcePseudoSourceValue>(TII);
     }
 
     return GWSResourcePSV.get();
index 6372f2df399b298db4f62d6c0987ec523d44df51..c072ba6b2d1c353012280a62286a22926649783f 100644 (file)
@@ -1228,7 +1228,7 @@ void SIScheduleBlockCreator::createBlocksForVariant(SISchedulerBlockCreatorVaria
     unsigned Color = CurrentColoring[SU->NodeNum];
     if (RealID.find(Color) == RealID.end()) {
       int ID = CurrentBlocks.size();
-      BlockPtrs.push_back(llvm::make_unique<SIScheduleBlock>(DAG, this, ID));
+      BlockPtrs.push_back(std::make_unique<SIScheduleBlock>(DAG, this, ID));
       CurrentBlocks.push_back(BlockPtrs.rbegin()->get());
       RealID[Color] = ID;
     }
@@ -1801,7 +1801,7 @@ SIScheduler::scheduleVariant(SISchedulerBlockCreatorVariant BlockVariant,
 // SIScheduleDAGMI //
 
 SIScheduleDAGMI::SIScheduleDAGMI(MachineSchedContext *C) :
-  ScheduleDAGMILive(C, llvm::make_unique<GenericScheduler>(C)) {
+  ScheduleDAGMILive(C, std::make_unique<GenericScheduler>(C)) {
   SITII = static_cast<const SIInstrInfo*>(TII);
   SITRI = static_cast<const SIRegisterInfo*>(TRI);
 
index 4320e6c957a0eefd6729f736571a8966b866a019..e914573306ae0aef995b7a8eb50e26cff7bc04f3 100644 (file)
@@ -656,10 +656,10 @@ SICacheControl::SICacheControl(const GCNSubtarget &ST) {
 std::unique_ptr<SICacheControl> SICacheControl::create(const GCNSubtarget &ST) {
   GCNSubtarget::Generation Generation = ST.getGeneration();
   if (Generation <= AMDGPUSubtarget::SOUTHERN_ISLANDS)
-    return make_unique<SIGfx6CacheControl>(ST);
+    return std::make_unique<SIGfx6CacheControl>(ST);
   if (Generation < AMDGPUSubtarget::GFX10)
-    return make_unique<SIGfx7CacheControl>(ST);
-  return make_unique<SIGfx10CacheControl>(ST, ST.isCuModeEnabled());
+    return std::make_unique<SIGfx7CacheControl>(ST);
+  return std::make_unique<SIGfx10CacheControl>(ST, ST.isCuModeEnabled());
 }
 
 bool SIGfx6CacheControl::enableLoadCacheBypass(
index a5edd7b3554a28e26d42287d36e985dbe0298075..52989a280e806135f4b3884a99381e333eddcd5c 100644 (file)
@@ -226,7 +226,7 @@ void SIModeRegister::insertSetreg(MachineBasicBlock &MBB, MachineInstr *MI,
 // - on exit we have set the Require, Change, and initial Exit modes.
 void SIModeRegister::processBlockPhase1(MachineBasicBlock &MBB,
                                         const SIInstrInfo *TII) {
-  auto NewInfo = llvm::make_unique<BlockData>();
+  auto NewInfo = std::make_unique<BlockData>();
   MachineInstr *InsertionPoint = nullptr;
   // RequirePending is used to indicate whether we are collecting the initial
   // requirements for the block, and need to defer the first InsertionPoint to
index 7888086085f982efd8d90bc82b0f8be8b462ed00..afb047c24dfd91317709c82824056c5028ea332f 100644 (file)
@@ -580,10 +580,10 @@ SIPeepholeSDWA::matchSDWAOperand(MachineInstr &MI) {
 
     if (Opcode == AMDGPU::V_LSHLREV_B32_e32 ||
         Opcode == AMDGPU::V_LSHLREV_B32_e64) {
-      return make_unique<SDWADstOperand>(
+      return std::make_unique<SDWADstOperand>(
           Dst, Src1, *Imm == 16 ? WORD_1 : BYTE_3, UNUSED_PAD);
     } else {
-      return make_unique<SDWASrcOperand>(
+      return std::make_unique<SDWASrcOperand>(
           Src1, Dst, *Imm == 16 ? WORD_1 : BYTE_3, false, false,
           Opcode != AMDGPU::V_LSHRREV_B32_e32 &&
           Opcode != AMDGPU::V_LSHRREV_B32_e64);
@@ -619,9 +619,9 @@ SIPeepholeSDWA::matchSDWAOperand(MachineInstr &MI) {
 
     if (Opcode == AMDGPU::V_LSHLREV_B16_e32 ||
         Opcode == AMDGPU::V_LSHLREV_B16_e64) {
-      return make_unique<SDWADstOperand>(Dst, Src1, BYTE_1, UNUSED_PAD);
+      return std::make_unique<SDWADstOperand>(Dst, Src1, BYTE_1, UNUSED_PAD);
     } else {
-      return make_unique<SDWASrcOperand>(
+      return std::make_unique<SDWASrcOperand>(
             Src1, Dst, BYTE_1, false, false,
             Opcode != AMDGPU::V_LSHRREV_B16_e32 &&
             Opcode != AMDGPU::V_LSHRREV_B16_e64);
@@ -681,7 +681,7 @@ SIPeepholeSDWA::matchSDWAOperand(MachineInstr &MI) {
         Register::isPhysicalRegister(Dst->getReg()))
       break;
 
-    return make_unique<SDWASrcOperand>(
+    return std::make_unique<SDWASrcOperand>(
           Src0, Dst, SrcSel, false, false, Opcode != AMDGPU::V_BFE_U32);
   }
 
@@ -710,7 +710,7 @@ SIPeepholeSDWA::matchSDWAOperand(MachineInstr &MI) {
         Register::isPhysicalRegister(Dst->getReg()))
       break;
 
-    return make_unique<SDWASrcOperand>(
+    return std::make_unique<SDWASrcOperand>(
         ValSrc, Dst, *Imm == 0x0000ffff ? WORD_0 : BYTE_0);
   }
 
@@ -840,7 +840,7 @@ SIPeepholeSDWA::matchSDWAOperand(MachineInstr &MI) {
     MachineOperand *OrDst = TII->getNamedOperand(MI, AMDGPU::OpName::vdst);
     assert(OrDst && OrDst->isReg());
 
-    return make_unique<SDWADstPreserveOperand>(
+    return std::make_unique<SDWADstPreserveOperand>(
       OrDst, OrSDWADef, OrOtherDef, DstSel);
 
   }
index 9fb45d686c268ca271ccc4991164f7580f6a6dda..34700dc22c54a85fc9e3cbd1a65195ca1cacc382 100644 (file)
@@ -38,7 +38,7 @@ ARCTargetMachine::ARCTargetMachine(const Target &T, const Triple &TT,
                         "f32:32:32-i64:32-f64:32-a:0:32-n32",
                         TT, CPU, FS, Options, getRelocModel(RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
-      TLOF(make_unique<TargetLoweringObjectFileELF>()),
+      TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
       Subtarget(TT, CPU, FS, *this) {
   initAsmInfo();
 }
index 6ef03c644d1ac0b07e3e1503655db88da99a3706..1f15ddb85d46b9bf7c4a4a6e5537f2c9ebd66434 100644 (file)
@@ -92,7 +92,7 @@ namespace {
     /// Record a MulCandidate, rooted at a Mul instruction, that is a part of
     /// this reduction.
     void InsertMul(Instruction *I, Value *LHS, Value *RHS) {
-      Muls.push_back(make_unique<MulCandidate>(I, LHS, RHS));
+      Muls.push_back(std::make_unique<MulCandidate>(I, LHS, RHS));
     }
 
     /// Add the incoming accumulator value, returns true if a value had not
@@ -707,7 +707,7 @@ LoadInst* ARMParallelDSP::CreateWideLoad(MemInstList &Loads,
   OffsetSExt->replaceAllUsesWith(NewOffsetSExt);
 
   WideLoads.emplace(std::make_pair(Base,
-                                   make_unique<WidenedLoad>(Loads, WideLoad)));
+                                   std::make_unique<WidenedLoad>(Loads, WideLoad)));
   return WideLoad;
 }
 
index 7f0aae1739b3342df128edc2e546f7ee36feec4b..a8b324cd0832eb42e8a85b1c88b7594073c92a08 100644 (file)
@@ -101,10 +101,10 @@ extern "C" void LLVMInitializeARMTarget() {
 
 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
   if (TT.isOSBinFormatMachO())
-    return llvm::make_unique<TargetLoweringObjectFileMachO>();
+    return std::make_unique<TargetLoweringObjectFileMachO>();
   if (TT.isOSWindows())
-    return llvm::make_unique<TargetLoweringObjectFileCOFF>();
-  return llvm::make_unique<ARMElfTargetObjectFile>();
+    return std::make_unique<TargetLoweringObjectFileCOFF>();
+  return std::make_unique<ARMElfTargetObjectFile>();
 }
 
 static ARMBaseTargetMachine::ARMABI
@@ -282,7 +282,7 @@ ARMBaseTargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<ARMSubtarget>(TargetTriple, CPU, FS, *this, isLittle,
+    I = std::make_unique<ARMSubtarget>(TargetTriple, CPU, FS, *this, isLittle,
                                         F.hasMinSize());
 
     if (!I->isThumb() && !I->hasARMOps())
index 6b571add7f76a2961fac217947ffde56d9447e39..93b5254084a3b9956004b4798af310d3764f3aef 100644 (file)
@@ -3389,7 +3389,7 @@ public:
   void print(raw_ostream &OS) const override;
 
   static std::unique_ptr<ARMOperand> CreateITMask(unsigned Mask, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_ITCondMask);
+    auto Op = std::make_unique<ARMOperand>(k_ITCondMask);
     Op->ITMask.Mask = Mask;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3398,7 +3398,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateCondCode(ARMCC::CondCodes CC,
                                                     SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_CondCode);
+    auto Op = std::make_unique<ARMOperand>(k_CondCode);
     Op->CC.Val = CC;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3407,7 +3407,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateVPTPred(ARMVCC::VPTCodes CC,
                                                    SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_VPTPred);
+    auto Op = std::make_unique<ARMOperand>(k_VPTPred);
     Op->VCC.Val = CC;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3415,7 +3415,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateCoprocNum(unsigned CopVal, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_CoprocNum);
+    auto Op = std::make_unique<ARMOperand>(k_CoprocNum);
     Op->Cop.Val = CopVal;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3423,7 +3423,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateCoprocReg(unsigned CopVal, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_CoprocReg);
+    auto Op = std::make_unique<ARMOperand>(k_CoprocReg);
     Op->Cop.Val = CopVal;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3432,7 +3432,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateCoprocOption(unsigned Val, SMLoc S,
                                                         SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_CoprocOption);
+    auto Op = std::make_unique<ARMOperand>(k_CoprocOption);
     Op->Cop.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3440,7 +3440,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateCCOut(unsigned RegNum, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_CCOut);
+    auto Op = std::make_unique<ARMOperand>(k_CCOut);
     Op->Reg.RegNum = RegNum;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3448,7 +3448,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateToken(StringRef Str, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_Token);
+    auto Op = std::make_unique<ARMOperand>(k_Token);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->StartLoc = S;
@@ -3458,7 +3458,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateReg(unsigned RegNum, SMLoc S,
                                                SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_Register);
+    auto Op = std::make_unique<ARMOperand>(k_Register);
     Op->Reg.RegNum = RegNum;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3469,7 +3469,7 @@ public:
   CreateShiftedRegister(ARM_AM::ShiftOpc ShTy, unsigned SrcReg,
                         unsigned ShiftReg, unsigned ShiftImm, SMLoc S,
                         SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_ShiftedRegister);
+    auto Op = std::make_unique<ARMOperand>(k_ShiftedRegister);
     Op->RegShiftedReg.ShiftTy = ShTy;
     Op->RegShiftedReg.SrcReg = SrcReg;
     Op->RegShiftedReg.ShiftReg = ShiftReg;
@@ -3482,7 +3482,7 @@ public:
   static std::unique_ptr<ARMOperand>
   CreateShiftedImmediate(ARM_AM::ShiftOpc ShTy, unsigned SrcReg,
                          unsigned ShiftImm, SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_ShiftedImmediate);
+    auto Op = std::make_unique<ARMOperand>(k_ShiftedImmediate);
     Op->RegShiftedImm.ShiftTy = ShTy;
     Op->RegShiftedImm.SrcReg = SrcReg;
     Op->RegShiftedImm.ShiftImm = ShiftImm;
@@ -3493,7 +3493,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateShifterImm(bool isASR, unsigned Imm,
                                                       SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_ShifterImmediate);
+    auto Op = std::make_unique<ARMOperand>(k_ShifterImmediate);
     Op->ShifterImm.isASR = isASR;
     Op->ShifterImm.Imm = Imm;
     Op->StartLoc = S;
@@ -3503,7 +3503,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateRotImm(unsigned Imm, SMLoc S,
                                                   SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_RotateImmediate);
+    auto Op = std::make_unique<ARMOperand>(k_RotateImmediate);
     Op->RotImm.Imm = Imm;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3512,7 +3512,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateModImm(unsigned Bits, unsigned Rot,
                                                   SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_ModifiedImmediate);
+    auto Op = std::make_unique<ARMOperand>(k_ModifiedImmediate);
     Op->ModImm.Bits = Bits;
     Op->ModImm.Rot = Rot;
     Op->StartLoc = S;
@@ -3522,7 +3522,7 @@ public:
 
   static std::unique_ptr<ARMOperand>
   CreateConstantPoolImm(const MCExpr *Val, SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_ConstantPoolImmediate);
+    auto Op = std::make_unique<ARMOperand>(k_ConstantPoolImmediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3531,7 +3531,7 @@ public:
 
   static std::unique_ptr<ARMOperand>
   CreateBitfield(unsigned LSB, unsigned Width, SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_BitfieldDescriptor);
+    auto Op = std::make_unique<ARMOperand>(k_BitfieldDescriptor);
     Op->Bitfield.LSB = LSB;
     Op->Bitfield.Width = Width;
     Op->StartLoc = S;
@@ -3565,7 +3565,7 @@ public:
     assert(std::is_sorted(Regs.begin(), Regs.end()) &&
            "Register list must be sorted by encoding");
 
-    auto Op = make_unique<ARMOperand>(Kind);
+    auto Op = std::make_unique<ARMOperand>(Kind);
     for (const auto &P : Regs)
       Op->Registers.push_back(P.second);
 
@@ -3578,7 +3578,7 @@ public:
                                                       unsigned Count,
                                                       bool isDoubleSpaced,
                                                       SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_VectorList);
+    auto Op = std::make_unique<ARMOperand>(k_VectorList);
     Op->VectorList.RegNum = RegNum;
     Op->VectorList.Count = Count;
     Op->VectorList.isDoubleSpaced = isDoubleSpaced;
@@ -3590,7 +3590,7 @@ public:
   static std::unique_ptr<ARMOperand>
   CreateVectorListAllLanes(unsigned RegNum, unsigned Count, bool isDoubleSpaced,
                            SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_VectorListAllLanes);
+    auto Op = std::make_unique<ARMOperand>(k_VectorListAllLanes);
     Op->VectorList.RegNum = RegNum;
     Op->VectorList.Count = Count;
     Op->VectorList.isDoubleSpaced = isDoubleSpaced;
@@ -3602,7 +3602,7 @@ public:
   static std::unique_ptr<ARMOperand>
   CreateVectorListIndexed(unsigned RegNum, unsigned Count, unsigned Index,
                           bool isDoubleSpaced, SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_VectorListIndexed);
+    auto Op = std::make_unique<ARMOperand>(k_VectorListIndexed);
     Op->VectorList.RegNum = RegNum;
     Op->VectorList.Count = Count;
     Op->VectorList.LaneIndex = Index;
@@ -3614,7 +3614,7 @@ public:
 
   static std::unique_ptr<ARMOperand>
   CreateVectorIndex(unsigned Idx, SMLoc S, SMLoc E, MCContext &Ctx) {
-    auto Op = make_unique<ARMOperand>(k_VectorIndex);
+    auto Op = std::make_unique<ARMOperand>(k_VectorIndex);
     Op->VectorIndex.Val = Idx;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3623,7 +3623,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateImm(const MCExpr *Val, SMLoc S,
                                                SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_Immediate);
+    auto Op = std::make_unique<ARMOperand>(k_Immediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -3635,7 +3635,7 @@ public:
             unsigned OffsetRegNum, ARM_AM::ShiftOpc ShiftType,
             unsigned ShiftImm, unsigned Alignment, bool isNegative, SMLoc S,
             SMLoc E, SMLoc AlignmentLoc = SMLoc()) {
-    auto Op = make_unique<ARMOperand>(k_Memory);
+    auto Op = std::make_unique<ARMOperand>(k_Memory);
     Op->Memory.BaseRegNum = BaseRegNum;
     Op->Memory.OffsetImm = OffsetImm;
     Op->Memory.OffsetRegNum = OffsetRegNum;
@@ -3652,7 +3652,7 @@ public:
   static std::unique_ptr<ARMOperand>
   CreatePostIdxReg(unsigned RegNum, bool isAdd, ARM_AM::ShiftOpc ShiftTy,
                    unsigned ShiftImm, SMLoc S, SMLoc E) {
-    auto Op = make_unique<ARMOperand>(k_PostIndexRegister);
+    auto Op = std::make_unique<ARMOperand>(k_PostIndexRegister);
     Op->PostIdxReg.RegNum = RegNum;
     Op->PostIdxReg.isAdd = isAdd;
     Op->PostIdxReg.ShiftTy = ShiftTy;
@@ -3664,7 +3664,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateMemBarrierOpt(ARM_MB::MemBOpt Opt,
                                                          SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_MemBarrierOpt);
+    auto Op = std::make_unique<ARMOperand>(k_MemBarrierOpt);
     Op->MBOpt.Val = Opt;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3673,7 +3673,7 @@ public:
 
   static std::unique_ptr<ARMOperand>
   CreateInstSyncBarrierOpt(ARM_ISB::InstSyncBOpt Opt, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_InstSyncBarrierOpt);
+    auto Op = std::make_unique<ARMOperand>(k_InstSyncBarrierOpt);
     Op->ISBOpt.Val = Opt;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3682,7 +3682,7 @@ public:
 
   static std::unique_ptr<ARMOperand>
   CreateTraceSyncBarrierOpt(ARM_TSB::TraceSyncBOpt Opt, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_TraceSyncBarrierOpt);
+    auto Op = std::make_unique<ARMOperand>(k_TraceSyncBarrierOpt);
     Op->TSBOpt.Val = Opt;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3691,7 +3691,7 @@ public:
 
   static std::unique_ptr<ARMOperand> CreateProcIFlags(ARM_PROC::IFlags IFlags,
                                                       SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_ProcIFlags);
+    auto Op = std::make_unique<ARMOperand>(k_ProcIFlags);
     Op->IFlags.Val = IFlags;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3699,7 +3699,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateMSRMask(unsigned MMask, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_MSRMask);
+    auto Op = std::make_unique<ARMOperand>(k_MSRMask);
     Op->MMask.Val = MMask;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -3707,7 +3707,7 @@ public:
   }
 
   static std::unique_ptr<ARMOperand> CreateBankedReg(unsigned Reg, SMLoc S) {
-    auto Op = make_unique<ARMOperand>(k_BankedReg);
+    auto Op = std::make_unique<ARMOperand>(k_BankedReg);
     Op->BankedReg.Val = Reg;
     Op->StartLoc = S;
     Op->EndLoc = S;
index fda19eea1de6fa3823ad7b6e4b9b63f563346982..3f5b5b8113836a9a278e2c0c3e6f93f520a491bf 100644 (file)
@@ -263,5 +263,5 @@ void ARMELFObjectWriter::addTargetSectionFlags(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createARMELFObjectWriter(uint8_t OSABI) {
-  return llvm::make_unique<ARMELFObjectWriter>(OSABI);
+  return std::make_unique<ARMELFObjectWriter>(OSABI);
 }
index c49885023cb27816755af0573b430d4ba0f7ec9f..756b0b909c3b7f176f9d28d161784a94da331ae9 100644 (file)
@@ -506,5 +506,5 @@ void ARMMachObjectWriter::recordRelocation(MachObjectWriter *Writer,
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createARMMachObjectWriter(bool Is64Bit, uint32_t CPUType,
                                 uint32_t CPUSubtype) {
-  return llvm::make_unique<ARMMachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
+  return std::make_unique<ARMMachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
 }
index 054a95dd1e12308ab4f76e100dd4418ed30ed573..900c5fe30364c6333852b23bd970694d1b564f13 100644 (file)
@@ -92,7 +92,7 @@ namespace llvm {
 
 std::unique_ptr<MCObjectTargetWriter>
 createARMWinCOFFObjectWriter(bool Is64Bit) {
-  return llvm::make_unique<ARMWinCOFFObjectWriter>(Is64Bit);
+  return std::make_unique<ARMWinCOFFObjectWriter>(Is64Bit);
 }
 
 } // end namespace llvm
index a36c8b0f964935f0e732081e244750fbbe76ebe6..25304280d00246f32505b66041b11bfbef3a685e 100644 (file)
@@ -50,7 +50,7 @@ AVRTargetMachine::AVRTargetMachine(const Target &T, const Triple &TT,
                         getEffectiveRelocModel(RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
       SubTarget(TT, getCPU(CPU), FS, *this) {
-  this->TLOF = make_unique<AVRTargetObjectFile>();
+  this->TLOF = std::make_unique<AVRTargetObjectFile>();
   initAsmInfo();
 }
 
index aac5644711e2157f93734013dcd399aa632229df..af60bc4fdc90015d5e45032f680fdaf2abb63077 100644 (file)
@@ -199,22 +199,22 @@ public:
   }
 
   static std::unique_ptr<AVROperand> CreateToken(StringRef Str, SMLoc S) {
-    return make_unique<AVROperand>(Str, S);
+    return std::make_unique<AVROperand>(Str, S);
   }
 
   static std::unique_ptr<AVROperand> CreateReg(unsigned RegNum, SMLoc S,
                                                SMLoc E) {
-    return make_unique<AVROperand>(RegNum, S, E);
+    return std::make_unique<AVROperand>(RegNum, S, E);
   }
 
   static std::unique_ptr<AVROperand> CreateImm(const MCExpr *Val, SMLoc S,
                                                SMLoc E) {
-    return make_unique<AVROperand>(Val, S, E);
+    return std::make_unique<AVROperand>(Val, S, E);
   }
 
   static std::unique_ptr<AVROperand>
   CreateMemri(unsigned RegNum, const MCExpr *Val, SMLoc S, SMLoc E) {
-    return make_unique<AVROperand>(RegNum, Val, S, E);
+    return std::make_unique<AVROperand>(RegNum, Val, S, E);
   }
 
   void makeToken(StringRef Token) {
index 6025e4b2437ca574deabc44133d6e025b22bd234..1c69fea5962def7d3aff17400b533961a10465e1 100644 (file)
@@ -152,7 +152,7 @@ unsigned AVRELFObjectWriter::getRelocType(MCContext &Ctx,
 }
 
 std::unique_ptr<MCObjectTargetWriter> createAVRELFObjectWriter(uint8_t OSABI) {
-  return make_unique<AVRELFObjectWriter>(OSABI);
+  return std::make_unique<AVRELFObjectWriter>(OSABI);
 }
 
 } // end of namespace llvm
index 75885fd058a746909a4a2479f76fafc17041a8f3..ce1d2ecd9d266dd1a3f64b646a8aa79e5f66712c 100644 (file)
@@ -194,7 +194,7 @@ public:
   }
 
   static std::unique_ptr<BPFOperand> createToken(StringRef Str, SMLoc S) {
-    auto Op = make_unique<BPFOperand>(Token);
+    auto Op = std::make_unique<BPFOperand>(Token);
     Op->Tok = Str;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -203,7 +203,7 @@ public:
 
   static std::unique_ptr<BPFOperand> createReg(unsigned RegNo, SMLoc S,
                                                SMLoc E) {
-    auto Op = make_unique<BPFOperand>(Register);
+    auto Op = std::make_unique<BPFOperand>(Register);
     Op->Reg.RegNum = RegNo;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -212,7 +212,7 @@ public:
 
   static std::unique_ptr<BPFOperand> createImm(const MCExpr *Val, SMLoc S,
                                                SMLoc E) {
-    auto Op = make_unique<BPFOperand>(Immediate);
+    auto Op = std::make_unique<BPFOperand>(Immediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
index 24c0ff0f7f1503f8c6193c003a8a490a06a29590..a69a8067753934ec1dc1bab063623dd3020c6e9c 100644 (file)
@@ -61,7 +61,7 @@ BPFTargetMachine::BPFTargetMachine(const Target &T, const Triple &TT,
     : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options,
                         getEffectiveRelocModel(RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
-      TLOF(make_unique<TargetLoweringObjectFileELF>()),
+      TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
       Subtarget(TT, CPU, FS, *this) {
   initAsmInfo();
 
index 9b966ebe73b2d3ca52c3c2edde4644d258d17c36..3d08ca63a4b0500569d8567c5f16c79e47cbfd30 100644 (file)
@@ -412,7 +412,7 @@ void BTFDebug::visitBasicType(const DIBasicType *BTy, uint32_t &TypeId) {
 
   // Create a BTF type instance for this DIBasicType and put it into
   // DIToIdMap for cross-type reference check.
-  auto TypeEntry = llvm::make_unique<BTFTypeInt>(
+  auto TypeEntry = std::make_unique<BTFTypeInt>(
       Encoding, BTy->getSizeInBits(), BTy->getOffsetInBits(), BTy->getName());
   TypeId = addType(std::move(TypeEntry), BTy);
 }
@@ -431,7 +431,7 @@ void BTFDebug::visitSubroutineType(
   // a function pointer has an empty name. The subprogram type will
   // not be added to DIToIdMap as it should not be referenced by
   // any other types.
-  auto TypeEntry = llvm::make_unique<BTFTypeFuncProto>(STy, VLen, FuncArgNames);
+  auto TypeEntry = std::make_unique<BTFTypeFuncProto>(STy, VLen, FuncArgNames);
   if (ForSubprog)
     TypeId = addType(std::move(TypeEntry)); // For subprogram
   else
@@ -462,7 +462,7 @@ void BTFDebug::visitStructType(const DICompositeType *CTy, bool IsStruct,
   }
 
   auto TypeEntry =
-      llvm::make_unique<BTFTypeStruct>(CTy, IsStruct, HasBitField, VLen);
+      std::make_unique<BTFTypeStruct>(CTy, IsStruct, HasBitField, VLen);
   StructTypes.push_back(TypeEntry.get());
   TypeId = addType(std::move(TypeEntry), CTy);
 
@@ -481,7 +481,7 @@ void BTFDebug::visitArrayType(const DICompositeType *CTy, uint32_t &TypeId) {
   ElemSize = ElemType->getSizeInBits() >> 3;
 
   if (!CTy->getSizeInBits()) {
-    auto TypeEntry = llvm::make_unique<BTFTypeArray>(ElemTypeId, 0);
+    auto TypeEntry = std::make_unique<BTFTypeArray>(ElemTypeId, 0);
     ElemTypeId = addType(std::move(TypeEntry), CTy);
   } else {
     // Visit array dimensions.
@@ -494,7 +494,7 @@ void BTFDebug::visitArrayType(const DICompositeType *CTy, uint32_t &TypeId) {
           int64_t Count = CI->getSExtValue();
 
           auto TypeEntry =
-              llvm::make_unique<BTFTypeArray>(ElemTypeId, Count);
+              std::make_unique<BTFTypeArray>(ElemTypeId, Count);
           if (I == 0)
             ElemTypeId = addType(std::move(TypeEntry), CTy);
           else
@@ -510,7 +510,7 @@ void BTFDebug::visitArrayType(const DICompositeType *CTy, uint32_t &TypeId) {
   // The IR does not have a type for array index while BTF wants one.
   // So create an array index type if there is none.
   if (!ArrayIndexTypeId) {
-    auto TypeEntry = llvm::make_unique<BTFTypeInt>(dwarf::DW_ATE_unsigned, 32,
+    auto TypeEntry = std::make_unique<BTFTypeInt>(dwarf::DW_ATE_unsigned, 32,
                                                    0, "__ARRAY_SIZE_TYPE__");
     ArrayIndexTypeId = addType(std::move(TypeEntry));
   }
@@ -522,7 +522,7 @@ void BTFDebug::visitEnumType(const DICompositeType *CTy, uint32_t &TypeId) {
   if (VLen > BTF::MAX_VLEN)
     return;
 
-  auto TypeEntry = llvm::make_unique<BTFTypeEnum>(CTy, VLen);
+  auto TypeEntry = std::make_unique<BTFTypeEnum>(CTy, VLen);
   TypeId = addType(std::move(TypeEntry), CTy);
   // No need to visit base type as BTF does not encode it.
 }
@@ -530,7 +530,7 @@ void BTFDebug::visitEnumType(const DICompositeType *CTy, uint32_t &TypeId) {
 /// Handle structure/union forward declarations.
 void BTFDebug::visitFwdDeclType(const DICompositeType *CTy, bool IsUnion,
                                 uint32_t &TypeId) {
-  auto TypeEntry = llvm::make_unique<BTFTypeFwd>(CTy->getName(), IsUnion);
+  auto TypeEntry = std::make_unique<BTFTypeFwd>(CTy->getName(), IsUnion);
   TypeId = addType(std::move(TypeEntry), CTy);
 }
 
@@ -572,7 +572,7 @@ void BTFDebug::visitDerivedType(const DIDerivedType *DTy, uint32_t &TypeId,
           /// Find a candidate, generate a fixup. Later on the struct/union
           /// pointee type will be replaced with either a real type or
           /// a forward declaration.
-          auto TypeEntry = llvm::make_unique<BTFTypeDerived>(DTy, Tag, true);
+          auto TypeEntry = std::make_unique<BTFTypeDerived>(DTy, Tag, true);
           auto &Fixup = FixupDerivedTypes[CTy->getName()];
           Fixup.first = CTag == dwarf::DW_TAG_union_type;
           Fixup.second.push_back(TypeEntry.get());
@@ -586,7 +586,7 @@ void BTFDebug::visitDerivedType(const DIDerivedType *DTy, uint32_t &TypeId,
   if (Tag == dwarf::DW_TAG_pointer_type || Tag == dwarf::DW_TAG_typedef ||
       Tag == dwarf::DW_TAG_const_type || Tag == dwarf::DW_TAG_volatile_type ||
       Tag == dwarf::DW_TAG_restrict_type) {
-    auto TypeEntry = llvm::make_unique<BTFTypeDerived>(DTy, Tag, false);
+    auto TypeEntry = std::make_unique<BTFTypeDerived>(DTy, Tag, false);
     TypeId = addType(std::move(TypeEntry), DTy);
   } else if (Tag != dwarf::DW_TAG_member) {
     return;
@@ -653,7 +653,7 @@ void BTFDebug::visitMapDefType(const DIType *Ty, uint32_t &TypeId) {
   }
 
   auto TypeEntry =
-      llvm::make_unique<BTFTypeStruct>(CTy, true, HasBitField, Elements.size());
+      std::make_unique<BTFTypeStruct>(CTy, true, HasBitField, Elements.size());
   StructTypes.push_back(TypeEntry.get());
   TypeId = addType(std::move(TypeEntry), CTy);
 
@@ -926,7 +926,7 @@ void BTFDebug::beginFunctionImpl(const MachineFunction *MF) {
 
   // Construct subprogram func type
   auto FuncTypeEntry =
-      llvm::make_unique<BTFTypeFunc>(SP->getName(), ProtoTypeId);
+      std::make_unique<BTFTypeFunc>(SP->getName(), ProtoTypeId);
   uint32_t FuncTypeId = addType(std::move(FuncTypeEntry));
 
   for (const auto &TypeEntry : TypeEntries)
@@ -1136,12 +1136,12 @@ void BTFDebug::processGlobals(bool ProcessingMapDef) {
                             ? BTF::VAR_GLOBAL_ALLOCATED
                             : BTF::VAR_STATIC;
     auto VarEntry =
-        llvm::make_unique<BTFKindVar>(Global.getName(), GVTypeId, GVarInfo);
+        std::make_unique<BTFKindVar>(Global.getName(), GVTypeId, GVarInfo);
     uint32_t VarId = addType(std::move(VarEntry));
 
     // Find or create a DataSec
     if (DataSecEntries.find(SecName) == DataSecEntries.end()) {
-      DataSecEntries[SecName] = llvm::make_unique<BTFKindDataSec>(Asm, SecName);
+      DataSecEntries[SecName] = std::make_unique<BTFKindDataSec>(Asm, SecName);
     }
 
     // Calculate symbol size
@@ -1217,7 +1217,7 @@ void BTFDebug::endModule() {
     }
 
     if (StructTypeId == 0) {
-      auto FwdTypeEntry = llvm::make_unique<BTFTypeFwd>(TypeName, IsUnion);
+      auto FwdTypeEntry = std::make_unique<BTFTypeFwd>(TypeName, IsUnion);
       StructTypeId = addType(std::move(FwdTypeEntry));
     }
 
index 057bbf5c3b06a42f25fffc43ca3ac1743e60c963..6ebf95114120bcd88d9053a64a3cb024f409744e 100644 (file)
@@ -85,5 +85,5 @@ unsigned BPFELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createBPFELFObjectWriter(uint8_t OSABI) {
-  return llvm::make_unique<BPFELFObjectWriter>(OSABI);
+  return std::make_unique<BPFELFObjectWriter>(OSABI);
 }
index 31dac55db2df4934d43c18d9adeb423d27defc80..ee943a0d2c56e36e28eef1b5c0bbc72200e8738b 100644 (file)
@@ -374,15 +374,15 @@ void HexagonSubtarget::adjustSchedDependency(SUnit *Src, SUnit *Dst,
 
 void HexagonSubtarget::getPostRAMutations(
     std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const {
-  Mutations.push_back(llvm::make_unique<UsrOverflowMutation>());
-  Mutations.push_back(llvm::make_unique<HVXMemLatencyMutation>());
-  Mutations.push_back(llvm::make_unique<BankConflictMutation>());
+  Mutations.push_back(std::make_unique<UsrOverflowMutation>());
+  Mutations.push_back(std::make_unique<HVXMemLatencyMutation>());
+  Mutations.push_back(std::make_unique<BankConflictMutation>());
 }
 
 void HexagonSubtarget::getSMSMutations(
     std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const {
-  Mutations.push_back(llvm::make_unique<UsrOverflowMutation>());
-  Mutations.push_back(llvm::make_unique<HVXMemLatencyMutation>());
+  Mutations.push_back(std::make_unique<UsrOverflowMutation>());
+  Mutations.push_back(std::make_unique<HVXMemLatencyMutation>());
 }
 
 // Pin the vtable to this file.
index 80b8480448fe4c0282ecb777944ef0cf825deee8..d709a82be6604dfed501234046e7a5f1b0634f57 100644 (file)
@@ -111,10 +111,10 @@ int HexagonTargetMachineModule = 0;
 
 static ScheduleDAGInstrs *createVLIWMachineSched(MachineSchedContext *C) {
   ScheduleDAGMILive *DAG =
-    new VLIWMachineScheduler(C, make_unique<ConvergingVLIWScheduler>());
-  DAG->addMutation(make_unique<HexagonSubtarget::UsrOverflowMutation>());
-  DAG->addMutation(make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
-  DAG->addMutation(make_unique<HexagonSubtarget::CallMutation>());
+    new VLIWMachineScheduler(C, std::make_unique<ConvergingVLIWScheduler>());
+  DAG->addMutation(std::make_unique<HexagonSubtarget::UsrOverflowMutation>());
+  DAG->addMutation(std::make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
+  DAG->addMutation(std::make_unique<HexagonSubtarget::CallMutation>());
   DAG->addMutation(createCopyConstrainDAGMutation(DAG->TII, DAG->TRI));
   return DAG;
 }
@@ -218,7 +218,7 @@ HexagonTargetMachine::HexagonTargetMachine(const Target &T, const Triple &TT,
           TT, CPU, FS, Options, getEffectiveRelocModel(RM),
           getEffectiveCodeModel(CM, CodeModel::Small),
           (HexagonNoOpt ? CodeGenOpt::None : OL)),
-      TLOF(make_unique<HexagonTargetObjectFile>()) {
+      TLOF(std::make_unique<HexagonTargetObjectFile>()) {
   initializeHexagonExpandCondsetsPass(*PassRegistry::getPassRegistry());
   initAsmInfo();
 }
@@ -244,7 +244,7 @@ HexagonTargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<HexagonSubtarget>(TargetTriple, CPU, FS, *this);
+    I = std::make_unique<HexagonSubtarget>(TargetTriple, CPU, FS, *this);
   }
   return I.get();
 }
index 3619e4c239d72ebe5f7f9a9f4cd06d4a83be20bb..cc1f714573dbad01abcb86da41f8bdcb3d396bab 100644 (file)
@@ -136,9 +136,9 @@ HexagonPacketizerList::HexagonPacketizerList(MachineFunction &MF,
   HII = MF.getSubtarget<HexagonSubtarget>().getInstrInfo();
   HRI = MF.getSubtarget<HexagonSubtarget>().getRegisterInfo();
 
-  addMutation(llvm::make_unique<HexagonSubtarget::UsrOverflowMutation>());
-  addMutation(llvm::make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
-  addMutation(llvm::make_unique<HexagonSubtarget::BankConflictMutation>());
+  addMutation(std::make_unique<HexagonSubtarget::UsrOverflowMutation>());
+  addMutation(std::make_unique<HexagonSubtarget::HVXMemLatencyMutation>());
+  addMutation(std::make_unique<HexagonSubtarget::BankConflictMutation>());
 }
 
 // Check if FirstI modifies a register that SecondI reads.
index f678bf49322e517e5ab8893f5a6e09c4e5bdc7c5..d955e11b914df00c8bdc8c87bf3c723a0879b5e0 100644 (file)
@@ -299,5 +299,5 @@ unsigned HexagonELFObjectWriter::getRelocType(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createHexagonELFObjectWriter(uint8_t OSABI, StringRef CPU) {
-  return llvm::make_unique<HexagonELFObjectWriter>(OSABI, CPU);
+  return std::make_unique<HexagonELFObjectWriter>(OSABI, CPU);
 }
index 9af8a0b35b2f6ae9c337a52cdf8f48f4d5af0ea8..b629a24a99f3d4541ffc2fc417bd658a49d24ce5 100644 (file)
@@ -580,7 +580,7 @@ public:
   }
 
   static std::unique_ptr<LanaiOperand> CreateToken(StringRef Str, SMLoc Start) {
-    auto Op = make_unique<LanaiOperand>(TOKEN);
+    auto Op = std::make_unique<LanaiOperand>(TOKEN);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->StartLoc = Start;
@@ -590,7 +590,7 @@ public:
 
   static std::unique_ptr<LanaiOperand> createReg(unsigned RegNum, SMLoc Start,
                                                  SMLoc End) {
-    auto Op = make_unique<LanaiOperand>(REGISTER);
+    auto Op = std::make_unique<LanaiOperand>(REGISTER);
     Op->Reg.RegNum = RegNum;
     Op->StartLoc = Start;
     Op->EndLoc = End;
@@ -599,7 +599,7 @@ public:
 
   static std::unique_ptr<LanaiOperand> createImm(const MCExpr *Value,
                                                  SMLoc Start, SMLoc End) {
-    auto Op = make_unique<LanaiOperand>(IMMEDIATE);
+    auto Op = std::make_unique<LanaiOperand>(IMMEDIATE);
     Op->Imm.Value = Value;
     Op->StartLoc = Start;
     Op->EndLoc = End;
index 4313fa5a82b547d053ab5412c6c0803584f2b04f..919d43ad9b9b0c9a66a5f3febbba4a7472142fdc 100644 (file)
@@ -88,5 +88,5 @@ bool LanaiELFObjectWriter::needsRelocateWithSymbol(const MCSymbol & /*SD*/,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createLanaiELFObjectWriter(uint8_t OSABI) {
-  return llvm::make_unique<LanaiELFObjectWriter>(OSABI);
+  return std::make_unique<LanaiELFObjectWriter>(OSABI);
 }
index a0ec14ae23819b09f531b52922585ce637eaea61..85dcc0f152f9cdbdabfdcd16ff476cb6805a0b19 100644 (file)
@@ -191,33 +191,33 @@ public:
   }
 
   static std::unique_ptr<MSP430Operand> CreateToken(StringRef Str, SMLoc S) {
-    return make_unique<MSP430Operand>(Str, S);
+    return std::make_unique<MSP430Operand>(Str, S);
   }
 
   static std::unique_ptr<MSP430Operand> CreateReg(unsigned RegNum, SMLoc S,
                                                   SMLoc E) {
-    return make_unique<MSP430Operand>(k_Reg, RegNum, S, E);
+    return std::make_unique<MSP430Operand>(k_Reg, RegNum, S, E);
   }
 
   static std::unique_ptr<MSP430Operand> CreateImm(const MCExpr *Val, SMLoc S,
                                                   SMLoc E) {
-    return make_unique<MSP430Operand>(Val, S, E);
+    return std::make_unique<MSP430Operand>(Val, S, E);
   }
 
   static std::unique_ptr<MSP430Operand> CreateMem(unsigned RegNum,
                                                   const MCExpr *Val,
                                                   SMLoc S, SMLoc E) {
-    return make_unique<MSP430Operand>(RegNum, Val, S, E);
+    return std::make_unique<MSP430Operand>(RegNum, Val, S, E);
   }
 
   static std::unique_ptr<MSP430Operand> CreateIndReg(unsigned RegNum, SMLoc S,
                                                   SMLoc E) {
-    return make_unique<MSP430Operand>(k_IndReg, RegNum, S, E);
+    return std::make_unique<MSP430Operand>(k_IndReg, RegNum, S, E);
   }
 
   static std::unique_ptr<MSP430Operand> CreatePostIndReg(unsigned RegNum, SMLoc S,
                                                   SMLoc E) {
-    return make_unique<MSP430Operand>(k_PostIndReg, RegNum, S, E);
+    return std::make_unique<MSP430Operand>(k_PostIndReg, RegNum, S, E);
   }
 
   SMLoc getStartLoc() const { return Start; }
index 38b7da32c24690725b847550315d3ed2792de666..6c21aa66db6d94d1cb04fdada6de9109b33b6036 100644 (file)
@@ -54,5 +54,5 @@ protected:
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createMSP430ELFObjectWriter(uint8_t OSABI) {
-  return llvm::make_unique<MSP430ELFObjectWriter>(OSABI);
+  return std::make_unique<MSP430ELFObjectWriter>(OSABI);
 }
index 8c4ca982c96625ca820d849b99271dd4136b4ad7..e9aeba76de8551e90aab829b20089f1425ca7a74 100644 (file)
@@ -46,7 +46,7 @@ MSP430TargetMachine::MSP430TargetMachine(const Target &T, const Triple &TT,
     : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options), TT, CPU, FS,
                         Options, getEffectiveRelocModel(RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
-      TLOF(make_unique<TargetLoweringObjectFileELF>()),
+      TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
       Subtarget(TT, CPU, FS, *this) {
   initAsmInfo();
 }
index d7396b660486b4538ed039f67be1819555bbbdc8..8e6abd5b8e68525f9cd02238735b07b91cb9b073 100644 (file)
@@ -512,11 +512,11 @@ public:
 
     // Remember the initial assembler options. The user can not modify these.
     AssemblerOptions.push_back(
-        llvm::make_unique<MipsAssemblerOptions>(getSTI().getFeatureBits()));
+        std::make_unique<MipsAssemblerOptions>(getSTI().getFeatureBits()));
 
     // Create an assembler options environment for the user to modify.
     AssemblerOptions.push_back(
-        llvm::make_unique<MipsAssemblerOptions>(getSTI().getFeatureBits()));
+        std::make_unique<MipsAssemblerOptions>(getSTI().getFeatureBits()));
 
     getTargetStreamer().updateABIInfo(*this);
 
@@ -844,7 +844,7 @@ private:
                                                 const MCRegisterInfo *RegInfo,
                                                 SMLoc S, SMLoc E,
                                                 MipsAsmParser &Parser) {
-    auto Op = llvm::make_unique<MipsOperand>(k_RegisterIndex, Parser);
+    auto Op = std::make_unique<MipsOperand>(k_RegisterIndex, Parser);
     Op->RegIdx.Index = Index;
     Op->RegIdx.RegInfo = RegInfo;
     Op->RegIdx.Kind = RegKind;
@@ -1446,7 +1446,7 @@ public:
 
   static std::unique_ptr<MipsOperand> CreateToken(StringRef Str, SMLoc S,
                                                   MipsAsmParser &Parser) {
-    auto Op = llvm::make_unique<MipsOperand>(k_Token, Parser);
+    auto Op = std::make_unique<MipsOperand>(k_Token, Parser);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->StartLoc = S;
@@ -1521,7 +1521,7 @@ public:
 
   static std::unique_ptr<MipsOperand>
   CreateImm(const MCExpr *Val, SMLoc S, SMLoc E, MipsAsmParser &Parser) {
-    auto Op = llvm::make_unique<MipsOperand>(k_Immediate, Parser);
+    auto Op = std::make_unique<MipsOperand>(k_Immediate, Parser);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -1531,7 +1531,7 @@ public:
   static std::unique_ptr<MipsOperand>
   CreateMem(std::unique_ptr<MipsOperand> Base, const MCExpr *Off, SMLoc S,
             SMLoc E, MipsAsmParser &Parser) {
-    auto Op = llvm::make_unique<MipsOperand>(k_Memory, Parser);
+    auto Op = std::make_unique<MipsOperand>(k_Memory, Parser);
     Op->Mem.Base = Base.release();
     Op->Mem.Off = Off;
     Op->StartLoc = S;
@@ -1544,7 +1544,7 @@ public:
                 MipsAsmParser &Parser) {
     assert(Regs.size() > 0 && "Empty list not allowed");
 
-    auto Op = llvm::make_unique<MipsOperand>(k_RegList, Parser);
+    auto Op = std::make_unique<MipsOperand>(k_RegList, Parser);
     Op->RegList.List = new SmallVector<unsigned, 10>(Regs.begin(), Regs.end());
     Op->StartLoc = StartLoc;
     Op->EndLoc = EndLoc;
@@ -7016,7 +7016,7 @@ bool MipsAsmParser::parseSetPushDirective() {
 
   // Create a copy of the current assembler options environment and push it.
   AssemblerOptions.push_back(
-        llvm::make_unique<MipsAssemblerOptions>(AssemblerOptions.back().get()));
+        std::make_unique<MipsAssemblerOptions>(AssemblerOptions.back().get()));
 
   getTargetStreamer().emitDirectiveSetPush();
   return false;
index cf7bae98a27f01290a2034af74f650f6084bd9a3..c0c61a29a60b125a8226f8d2136ce4f563da460c 100644 (file)
@@ -690,6 +690,6 @@ llvm::createMipsELFObjectWriter(const Triple &TT, bool IsN32) {
   uint8_t OSABI = MCELFObjectTargetWriter::getOSABI(TT.getOS());
   bool IsN64 = TT.isArch64Bit() && !IsN32;
   bool HasRelocationAddend = TT.isArch64Bit();
-  return llvm::make_unique<MipsELFObjectWriter>(OSABI, HasRelocationAddend,
+  return std::make_unique<MipsELFObjectWriter>(OSABI, HasRelocationAddend,
                                                 IsN64);
 }
index c878abb042e499ed3e3b4151fc2542d6897b6db5..d0a4c4d0f490ca0e780d5a6ea019ca64aefdd938 100644 (file)
@@ -117,7 +117,7 @@ MipsTargetMachine::MipsTargetMachine(const Target &T, const Triple &TT,
     : LLVMTargetMachine(T, computeDataLayout(TT, CPU, Options, isLittle), TT,
                         CPU, FS, Options, getEffectiveRelocModel(JIT, RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
-      isLittle(isLittle), TLOF(llvm::make_unique<MipsTargetObjectFile>()),
+      isLittle(isLittle), TLOF(std::make_unique<MipsTargetObjectFile>()),
       ABI(MipsABIInfo::computeTargetABI(TT, CPU, Options.MCOptions)),
       Subtarget(nullptr), DefaultSubtarget(TT, CPU, FS, isLittle, *this,
                                            Options.StackAlignmentOverride),
@@ -196,7 +196,7 @@ MipsTargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<MipsSubtarget>(TargetTriple, CPU, FS, isLittle, *this,
+    I = std::make_unique<MipsSubtarget>(TargetTriple, CPU, FS, isLittle, *this,
                                          Options.StackAlignmentOverride);
   }
   return I.get();
index 11b3fe2fa3d35dceb655556adebe6d62154e44be..f58fb5717773d04ebeb872a11975335a79d27859 100644 (file)
@@ -116,7 +116,7 @@ NVPTXTargetMachine::NVPTXTargetMachine(const Target &T, const Triple &TT,
                         CPU, FS, Options, Reloc::PIC_,
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
       is64bit(is64bit), UseShortPointers(UseShortPointersOpt),
-      TLOF(llvm::make_unique<NVPTXTargetObjectFile>()),
+      TLOF(std::make_unique<NVPTXTargetObjectFile>()),
       Subtarget(TT, CPU, FS, *this) {
   if (TT.getOS() == Triple::NVCL)
     drvInterface = NVPTX::NVCL;
index c9524da93acdf997f8fd7c4c6d422404068eda80..aedf5b713c3f94e983a9a0647dafdcd21f059809 100644 (file)
@@ -579,7 +579,7 @@ public:
 
   static std::unique_ptr<PPCOperand> CreateToken(StringRef Str, SMLoc S,
                                                  bool IsPPC64) {
-    auto Op = make_unique<PPCOperand>(Token);
+    auto Op = std::make_unique<PPCOperand>(Token);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->StartLoc = S;
@@ -608,7 +608,7 @@ public:
 
   static std::unique_ptr<PPCOperand> CreateImm(int64_t Val, SMLoc S, SMLoc E,
                                                bool IsPPC64) {
-    auto Op = make_unique<PPCOperand>(Immediate);
+    auto Op = std::make_unique<PPCOperand>(Immediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -618,7 +618,7 @@ public:
 
   static std::unique_ptr<PPCOperand> CreateExpr(const MCExpr *Val, SMLoc S,
                                                 SMLoc E, bool IsPPC64) {
-    auto Op = make_unique<PPCOperand>(Expression);
+    auto Op = std::make_unique<PPCOperand>(Expression);
     Op->Expr.Val = Val;
     Op->Expr.CRVal = EvaluateCRExpr(Val);
     Op->StartLoc = S;
@@ -629,7 +629,7 @@ public:
 
   static std::unique_ptr<PPCOperand>
   CreateTLSReg(const MCSymbolRefExpr *Sym, SMLoc S, SMLoc E, bool IsPPC64) {
-    auto Op = make_unique<PPCOperand>(TLSRegister);
+    auto Op = std::make_unique<PPCOperand>(TLSRegister);
     Op->TLSReg.Sym = Sym;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -639,7 +639,7 @@ public:
 
   static std::unique_ptr<PPCOperand>
   CreateContextImm(int64_t Val, SMLoc S, SMLoc E, bool IsPPC64) {
-    auto Op = make_unique<PPCOperand>(ContextImmediate);
+    auto Op = std::make_unique<PPCOperand>(ContextImmediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
index 042ddf48d5df4b50d7700989f13636138fb41cbe..79f08c682bb5cfee1a1a48a6ad540a2d72c6a1ec 100644 (file)
@@ -443,5 +443,5 @@ bool PPCELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createPPCELFObjectWriter(bool Is64Bit, uint8_t OSABI) {
-  return llvm::make_unique<PPCELFObjectWriter>(Is64Bit, OSABI);
+  return std::make_unique<PPCELFObjectWriter>(Is64Bit, OSABI);
 }
index 4cf7fd15fa75c0a145f0f17b02de19a3b6488eb1..f272eee9c91081d6fc8a1eb3108f221f83e390e4 100644 (file)
@@ -376,5 +376,5 @@ void PPCMachObjectWriter::RecordPPCRelocation(
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createPPCMachObjectWriter(bool Is64Bit, uint32_t CPUType,
                                 uint32_t CPUSubtype) {
-  return llvm::make_unique<PPCMachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
+  return std::make_unique<PPCMachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
 }
index 9c661286d455de0e38adf8f615f56a78b9c4a106..7fdbb8990b553659a87dbaa1f31b44534a7c8852 100644 (file)
@@ -25,5 +25,5 @@ PPCXCOFFObjectWriter::PPCXCOFFObjectWriter(bool Is64Bit)
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createPPCXCOFFObjectWriter(bool Is64Bit) {
-  return llvm::make_unique<PPCXCOFFObjectWriter>(Is64Bit);
+  return std::make_unique<PPCXCOFFObjectWriter>(Is64Bit);
 }
index aa7a2c0c04ae073095a604372243a32fa5313dc9..0157906598409f02957292540af2f227e086ea7a 100644 (file)
@@ -186,12 +186,12 @@ static std::string computeFSAdditions(StringRef FS, CodeGenOpt::Level OL,
 
 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
   if (TT.isOSDarwin())
-    return llvm::make_unique<TargetLoweringObjectFileMachO>();
+    return std::make_unique<TargetLoweringObjectFileMachO>();
 
   if (TT.isOSAIX())
-    return llvm::make_unique<TargetLoweringObjectFileXCOFF>();
+    return std::make_unique<TargetLoweringObjectFileXCOFF>();
 
-  return llvm::make_unique<PPC64LinuxTargetObjectFile>();
+  return std::make_unique<PPC64LinuxTargetObjectFile>();
 }
 
 static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
@@ -269,8 +269,8 @@ static ScheduleDAGInstrs *createPPCMachineScheduler(MachineSchedContext *C) {
   const PPCSubtarget &ST = C->MF->getSubtarget<PPCSubtarget>();
   ScheduleDAGMILive *DAG =
     new ScheduleDAGMILive(C, ST.usePPCPreRASchedStrategy() ?
-                          llvm::make_unique<PPCPreRASchedStrategy>(C) :
-                          llvm::make_unique<GenericScheduler>(C));
+                          std::make_unique<PPCPreRASchedStrategy>(C) :
+                          std::make_unique<GenericScheduler>(C));
   // add DAG Mutations here.
   DAG->addMutation(createCopyConstrainDAGMutation(DAG->TII, DAG->TRI));
   return DAG;
@@ -281,8 +281,8 @@ static ScheduleDAGInstrs *createPPCPostMachineScheduler(
   const PPCSubtarget &ST = C->MF->getSubtarget<PPCSubtarget>();
   ScheduleDAGMI *DAG =
     new ScheduleDAGMI(C, ST.usePPCPostRASchedStrategy() ?
-                      llvm::make_unique<PPCPostRASchedStrategy>(C) :
-                      llvm::make_unique<PostGenericScheduler>(C), true);
+                      std::make_unique<PPCPostRASchedStrategy>(C) :
+                      std::make_unique<PostGenericScheduler>(C), true);
   // add DAG Mutations here.
   return DAG;
 }
@@ -338,7 +338,7 @@ PPCTargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<PPCSubtarget>(
+    I = std::make_unique<PPCSubtarget>(
         TargetTriple, CPU,
         // FIXME: It would be good to have the subtarget additions here
         // not necessary. Anything that turns them on/off (overrides) ends
index 93a2dd38afc8a5cb5e03712ff0d4e4c2b240cfd3..efa56fc5811bf8f18ac94a30c7179fab02c314e3 100644 (file)
@@ -632,7 +632,7 @@ public:
 
   static std::unique_ptr<RISCVOperand> createToken(StringRef Str, SMLoc S,
                                                    bool IsRV64) {
-    auto Op = make_unique<RISCVOperand>(Token);
+    auto Op = std::make_unique<RISCVOperand>(Token);
     Op->Tok = Str;
     Op->StartLoc = S;
     Op->EndLoc = S;
@@ -642,7 +642,7 @@ public:
 
   static std::unique_ptr<RISCVOperand> createReg(unsigned RegNo, SMLoc S,
                                                  SMLoc E, bool IsRV64) {
-    auto Op = make_unique<RISCVOperand>(Register);
+    auto Op = std::make_unique<RISCVOperand>(Register);
     Op->Reg.RegNum = RegNo;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -652,7 +652,7 @@ public:
 
   static std::unique_ptr<RISCVOperand> createImm(const MCExpr *Val, SMLoc S,
                                                  SMLoc E, bool IsRV64) {
-    auto Op = make_unique<RISCVOperand>(Immediate);
+    auto Op = std::make_unique<RISCVOperand>(Immediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -662,7 +662,7 @@ public:
 
   static std::unique_ptr<RISCVOperand>
   createSysReg(StringRef Str, SMLoc S, unsigned Encoding, bool IsRV64) {
-    auto Op = make_unique<RISCVOperand>(SystemRegister);
+    auto Op = std::make_unique<RISCVOperand>(SystemRegister);
     Op->SysReg.Data = Str.data();
     Op->SysReg.Length = Str.size();
     Op->SysReg.Encoding = Encoding;
index c5d4b1f8ac12df645f29223a23d5c03913ddf32f..9c180a51d45528d5f249bef48f18a32517b2f850 100644 (file)
@@ -133,5 +133,5 @@ unsigned RISCVELFObjectWriter::getRelocType(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createRISCVELFObjectWriter(uint8_t OSABI, bool Is64Bit) {
-  return llvm::make_unique<RISCVELFObjectWriter>(OSABI, Is64Bit);
+  return std::make_unique<RISCVELFObjectWriter>(OSABI, Is64Bit);
 }
index f4e6ed9f6284ac4f8ea5251570caad59d7849680..c9614cca6364c8bf46fa3c104c625b91f55cda79 100644 (file)
@@ -58,7 +58,7 @@ RISCVTargetMachine::RISCVTargetMachine(const Target &T, const Triple &TT,
     : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options,
                         getEffectiveRelocModel(TT, RM),
                         getEffectiveCodeModel(CM, CodeModel::Small), OL),
-      TLOF(make_unique<RISCVELFTargetObjectFile>()),
+      TLOF(std::make_unique<RISCVELFTargetObjectFile>()),
       Subtarget(TT, CPU, FS, Options.MCOptions.getABIName(), *this) {
   initAsmInfo();
 }
index 15453ae59a4fc36cda32376cce80238ceccef302..f6be9dd01249e7b66a200c364b5b0aa72bb17acb 100644 (file)
@@ -376,7 +376,7 @@ public:
   }
 
   static std::unique_ptr<SparcOperand> CreateToken(StringRef Str, SMLoc S) {
-    auto Op = make_unique<SparcOperand>(k_Token);
+    auto Op = std::make_unique<SparcOperand>(k_Token);
     Op->Tok.Data = Str.data();
     Op->Tok.Length = Str.size();
     Op->StartLoc = S;
@@ -386,7 +386,7 @@ public:
 
   static std::unique_ptr<SparcOperand> CreateReg(unsigned RegNum, unsigned Kind,
                                                  SMLoc S, SMLoc E) {
-    auto Op = make_unique<SparcOperand>(k_Register);
+    auto Op = std::make_unique<SparcOperand>(k_Register);
     Op->Reg.RegNum = RegNum;
     Op->Reg.Kind   = (SparcOperand::RegisterKind)Kind;
     Op->StartLoc = S;
@@ -396,7 +396,7 @@ public:
 
   static std::unique_ptr<SparcOperand> CreateImm(const MCExpr *Val, SMLoc S,
                                                  SMLoc E) {
-    auto Op = make_unique<SparcOperand>(k_Immediate);
+    auto Op = std::make_unique<SparcOperand>(k_Immediate);
     Op->Imm.Val = Val;
     Op->StartLoc = S;
     Op->EndLoc = E;
@@ -481,7 +481,7 @@ public:
 
   static std::unique_ptr<SparcOperand>
   CreateMEMr(unsigned Base, SMLoc S, SMLoc E) {
-    auto Op = make_unique<SparcOperand>(k_MemoryReg);
+    auto Op = std::make_unique<SparcOperand>(k_MemoryReg);
     Op->Mem.Base = Base;
     Op->Mem.OffsetReg = Sparc::G0;  // always 0
     Op->Mem.Off = nullptr;
index 88547075c5ae1b45ef5c8ad5debde46055d6bfdd..dbb6d25123054632a5a2ace8e261743a6162772f 100644 (file)
@@ -135,5 +135,5 @@ bool SparcELFObjectWriter::needsRelocateWithSymbol(const MCSymbol &Sym,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createSparcELFObjectWriter(bool Is64Bit, uint8_t OSABI) {
-  return llvm::make_unique<SparcELFObjectWriter>(Is64Bit, OSABI);
+  return std::make_unique<SparcELFObjectWriter>(Is64Bit, OSABI);
 }
index 195cff79de03e135fe2c4091ee26784fb68720f3..c1e3f8c369829c63f890533baef6885c46f701ba 100644 (file)
@@ -98,7 +98,7 @@ SparcTargetMachine::SparcTargetMachine(
                         getEffectiveSparcCodeModel(
                             CM, getEffectiveRelocModel(RM), is64bit, JIT),
                         OL),
-      TLOF(make_unique<SparcELFTargetObjectFile>()),
+      TLOF(std::make_unique<SparcELFTargetObjectFile>()),
       Subtarget(TT, CPU, FS, *this, is64bit), is64Bit(is64bit) {
   initAsmInfo();
 }
@@ -133,7 +133,7 @@ SparcTargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<SparcSubtarget>(TargetTriple, CPU, FS, *this,
+    I = std::make_unique<SparcSubtarget>(TargetTriple, CPU, FS, *this,
                                           this->is64Bit);
   }
   return I.get();
index a259ba3433d6c434f1e04998722232fb522680cf..93c4ce4b5ccc79d9f9acc7313f0ae98fc2acb4d6 100644 (file)
@@ -155,11 +155,11 @@ public:
   // Create particular kinds of operand.
   static std::unique_ptr<SystemZOperand> createInvalid(SMLoc StartLoc,
                                                        SMLoc EndLoc) {
-    return make_unique<SystemZOperand>(KindInvalid, StartLoc, EndLoc);
+    return std::make_unique<SystemZOperand>(KindInvalid, StartLoc, EndLoc);
   }
 
   static std::unique_ptr<SystemZOperand> createToken(StringRef Str, SMLoc Loc) {
-    auto Op = make_unique<SystemZOperand>(KindToken, Loc, Loc);
+    auto Op = std::make_unique<SystemZOperand>(KindToken, Loc, Loc);
     Op->Token.Data = Str.data();
     Op->Token.Length = Str.size();
     return Op;
@@ -167,7 +167,7 @@ public:
 
   static std::unique_ptr<SystemZOperand>
   createReg(RegisterKind Kind, unsigned Num, SMLoc StartLoc, SMLoc EndLoc) {
-    auto Op = make_unique<SystemZOperand>(KindReg, StartLoc, EndLoc);
+    auto Op = std::make_unique<SystemZOperand>(KindReg, StartLoc, EndLoc);
     Op->Reg.Kind = Kind;
     Op->Reg.Num = Num;
     return Op;
@@ -175,7 +175,7 @@ public:
 
   static std::unique_ptr<SystemZOperand>
   createImm(const MCExpr *Expr, SMLoc StartLoc, SMLoc EndLoc) {
-    auto Op = make_unique<SystemZOperand>(KindImm, StartLoc, EndLoc);
+    auto Op = std::make_unique<SystemZOperand>(KindImm, StartLoc, EndLoc);
     Op->Imm = Expr;
     return Op;
   }
@@ -184,7 +184,7 @@ public:
   createMem(MemoryKind MemKind, RegisterKind RegKind, unsigned Base,
             const MCExpr *Disp, unsigned Index, const MCExpr *LengthImm,
             unsigned LengthReg, SMLoc StartLoc, SMLoc EndLoc) {
-    auto Op = make_unique<SystemZOperand>(KindMem, StartLoc, EndLoc);
+    auto Op = std::make_unique<SystemZOperand>(KindMem, StartLoc, EndLoc);
     Op->Mem.MemKind = MemKind;
     Op->Mem.RegKind = RegKind;
     Op->Mem.Base = Base;
@@ -200,7 +200,7 @@ public:
   static std::unique_ptr<SystemZOperand>
   createImmTLS(const MCExpr *Imm, const MCExpr *Sym,
                SMLoc StartLoc, SMLoc EndLoc) {
-    auto Op = make_unique<SystemZOperand>(KindImmTLS, StartLoc, EndLoc);
+    auto Op = std::make_unique<SystemZOperand>(KindImmTLS, StartLoc, EndLoc);
     Op->ImmTLS.Imm = Imm;
     Op->ImmTLS.Sym = Sym;
     return Op;
index 8d8ba5644e103a68fcca6f4bbccd8a5157b2b7e1..49b6fc490336c62443f157d529e1c4768e47e254 100644 (file)
@@ -162,5 +162,5 @@ unsigned SystemZObjectWriter::getRelocType(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createSystemZObjectWriter(uint8_t OSABI) {
-  return llvm::make_unique<SystemZObjectWriter>(OSABI);
+  return std::make_unique<SystemZObjectWriter>(OSABI);
 }
index 5c49e6eff0bfa93c9deb01386bd8600c2e8c4a8f..4604fcae881469f7a94032b839ee58c9724a7985 100644 (file)
@@ -154,7 +154,7 @@ SystemZTargetMachine::SystemZTargetMachine(const Target &T, const Triple &TT,
           getEffectiveRelocModel(RM),
           getEffectiveSystemZCodeModel(CM, getEffectiveRelocModel(RM), JIT),
           OL),
-      TLOF(llvm::make_unique<TargetLoweringObjectFileELF>()),
+      TLOF(std::make_unique<TargetLoweringObjectFileELF>()),
       Subtarget(TT, CPU, FS, *this) {
   initAsmInfo();
 }
@@ -176,7 +176,7 @@ public:
   ScheduleDAGInstrs *
   createPostMachineScheduler(MachineSchedContext *C) const override {
     return new ScheduleDAGMI(C,
-                             llvm::make_unique<SystemZPostRASchedStrategy>(C),
+                             std::make_unique<SystemZPostRASchedStrategy>(C),
                              /*RemoveKillFlags=*/true);
   }
 
index 5bebd392276ff75e70c5d233c9f9b1cff67c9f6f..da868e59c5f9714816db8e5d999cb9cd58ac4f80 100644 (file)
@@ -343,7 +343,7 @@ public:
     int64_t Val = Int.getIntVal();
     if (IsNegative)
       Val = -Val;
-    Operands.push_back(make_unique<WebAssemblyOperand>(
+    Operands.push_back(std::make_unique<WebAssemblyOperand>(
         WebAssemblyOperand::Integer, Int.getLoc(), Int.getEndLoc(),
         WebAssemblyOperand::IntOp{Val}));
     Parser.Lex();
@@ -356,7 +356,7 @@ public:
       return error("Cannot parse real: ", Flt);
     if (IsNegative)
       Val = -Val;
-    Operands.push_back(make_unique<WebAssemblyOperand>(
+    Operands.push_back(std::make_unique<WebAssemblyOperand>(
         WebAssemblyOperand::Float, Flt.getLoc(), Flt.getEndLoc(),
         WebAssemblyOperand::FltOp{Val}));
     Parser.Lex();
@@ -378,7 +378,7 @@ public:
     }
     if (IsNegative)
       Val = -Val;
-    Operands.push_back(make_unique<WebAssemblyOperand>(
+    Operands.push_back(std::make_unique<WebAssemblyOperand>(
         WebAssemblyOperand::Float, Flt.getLoc(), Flt.getEndLoc(),
         WebAssemblyOperand::FltOp{Val}));
     Parser.Lex();
@@ -407,7 +407,7 @@ public:
         // an opcode until after the assembly matcher, so set a default to fix
         // up later.
         auto Tok = Lexer.getTok();
-        Operands.push_back(make_unique<WebAssemblyOperand>(
+        Operands.push_back(std::make_unique<WebAssemblyOperand>(
             WebAssemblyOperand::Integer, Tok.getLoc(), Tok.getEndLoc(),
             WebAssemblyOperand::IntOp{-1}));
       }
@@ -417,7 +417,7 @@ public:
 
   void addBlockTypeOperand(OperandVector &Operands, SMLoc NameLoc,
                            WebAssembly::ExprType BT) {
-    Operands.push_back(make_unique<WebAssemblyOperand>(
+    Operands.push_back(std::make_unique<WebAssemblyOperand>(
         WebAssemblyOperand::Integer, NameLoc, NameLoc,
         WebAssemblyOperand::IntOp{static_cast<int64_t>(BT)}));
   }
@@ -449,7 +449,7 @@ public:
     }
 
     // Now construct the name as first operand.
-    Operands.push_back(make_unique<WebAssemblyOperand>(
+    Operands.push_back(std::make_unique<WebAssemblyOperand>(
         WebAssemblyOperand::Token, NameLoc, SMLoc::getFromPointer(Name.end()),
         WebAssemblyOperand::TokOp{Name}));
 
@@ -498,7 +498,7 @@ public:
       // attach it to an anonymous symbol, which is what WasmObjectWriter
       // expects to be able to recreate the actual unique-ified type indices.
       auto Loc = Parser.getTok();
-      auto Signature = make_unique<wasm::WasmSignature>();
+      auto Signature = std::make_unique<wasm::WasmSignature>();
       if (parseSignature(Signature.get()))
         return true;
       auto &Ctx = getStreamer().getContext();
@@ -510,7 +510,7 @@ public:
       WasmSym->setType(wasm::WASM_SYMBOL_TYPE_FUNCTION);
       const MCExpr *Expr = MCSymbolRefExpr::create(
           WasmSym, MCSymbolRefExpr::VK_WASM_TYPEINDEX, Ctx);
-      Operands.push_back(make_unique<WebAssemblyOperand>(
+      Operands.push_back(std::make_unique<WebAssemblyOperand>(
           WebAssemblyOperand::Symbol, Loc.getLoc(), Loc.getEndLoc(),
           WebAssemblyOperand::SymOp{Expr}));
     }
@@ -535,7 +535,7 @@ public:
           SMLoc End;
           if (Parser.parseExpression(Val, End))
             return error("Cannot parse symbol: ", Lexer.getTok());
-          Operands.push_back(make_unique<WebAssemblyOperand>(
+          Operands.push_back(std::make_unique<WebAssemblyOperand>(
               WebAssemblyOperand::Symbol, Id.getLoc(), Id.getEndLoc(),
               WebAssemblyOperand::SymOp{Val}));
           if (checkForP2AlignIfLoadStore(Operands, Name))
@@ -570,7 +570,7 @@ public:
       }
       case AsmToken::LCurly: {
         Parser.Lex();
-        auto Op = make_unique<WebAssemblyOperand>(
+        auto Op = std::make_unique<WebAssemblyOperand>(
             WebAssemblyOperand::BrList, Tok.getLoc(), Tok.getEndLoc());
         if (!Lexer.is(AsmToken::RCurly))
           for (;;) {
@@ -692,7 +692,7 @@ public:
         LastFunctionLabel = LastLabel;
         push(Function);
       }
-      auto Signature = make_unique<wasm::WasmSignature>();
+      auto Signature = std::make_unique<wasm::WasmSignature>();
       if (parseSignature(Signature.get()))
         return true;
       WasmSym->setSignature(Signature.get());
@@ -708,7 +708,7 @@ public:
       if (SymName.empty())
         return true;
       auto WasmSym = cast<MCSymbolWasm>(Ctx.getOrCreateSymbol(SymName));
-      auto Signature = make_unique<wasm::WasmSignature>();
+      auto Signature = std::make_unique<wasm::WasmSignature>();
       if (parseRegTypeList(Signature->Params))
         return true;
       WasmSym->setSignature(Signature.get());
index a1cc3e268e8f764b1cb570993d7b01b307aa9be2..f424b722b8342508eb2fe48896958aec7579cfdd 100644 (file)
@@ -117,5 +117,5 @@ unsigned WebAssemblyWasmObjectWriter::getRelocType(const MCValue &Target,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createWebAssemblyWasmObjectWriter(bool Is64Bit) {
-  return llvm::make_unique<WebAssemblyWasmObjectWriter>(Is64Bit);
+  return std::make_unique<WebAssemblyWasmObjectWriter>(Is64Bit);
 }
index 4c5d0192fc2834153389d82c67f193a4a80636bb..9f94866c08901bc58f7be8d5d9d8866a812115b1 100644 (file)
@@ -97,14 +97,14 @@ public:
       // If the smallest region containing MBB is a loop
       if (LoopMap.count(ML))
         return LoopMap[ML].get();
-      LoopMap[ML] = llvm::make_unique<ConcreteRegion<MachineLoop>>(ML);
+      LoopMap[ML] = std::make_unique<ConcreteRegion<MachineLoop>>(ML);
       return LoopMap[ML].get();
     } else {
       // If the smallest region containing MBB is an exception
       if (ExceptionMap.count(WE))
         return ExceptionMap[WE].get();
       ExceptionMap[WE] =
-          llvm::make_unique<ConcreteRegion<WebAssemblyException>>(WE);
+          std::make_unique<ConcreteRegion<WebAssemblyException>>(WE);
       return ExceptionMap[WE].get();
     }
   }
index 26baac327082c7f1998b08c6562506de7a291161..647e987309fca1a729f122aaec81e1962be35b61 100644 (file)
@@ -115,7 +115,7 @@ MCSymbol *WebAssemblyMCInstLower::GetExternalSymbolSymbol(
     getLibcallSignature(Subtarget, Name, Returns, Params);
   }
   auto Signature =
-      make_unique<wasm::WasmSignature>(std::move(Returns), std::move(Params));
+      std::make_unique<wasm::WasmSignature>(std::move(Returns), std::move(Params));
   WasmSym->setSignature(Signature.get());
   Printer.addSignature(std::move(Signature));
 
@@ -238,7 +238,7 @@ void WebAssemblyMCInstLower::lower(const MachineInstr *MI,
           }
 
           auto *WasmSym = cast<MCSymbolWasm>(Sym);
-          auto Signature = make_unique<wasm::WasmSignature>(std::move(Returns),
+          auto Signature = std::make_unique<wasm::WasmSignature>(std::move(Returns),
                                                             std::move(Params));
           WasmSym->setSignature(Signature.get());
           Printer.addSignature(std::move(Signature));
index d31c1226bfdb1546bde0901ea9479a179225771d..94b2bac7e64cee39cc1834407a4daf9bcdaf1317 100644 (file)
@@ -72,7 +72,7 @@ void llvm::valTypesFromMVTs(const ArrayRef<MVT> &In,
 std::unique_ptr<wasm::WasmSignature>
 llvm::signatureFromMVTs(const SmallVectorImpl<MVT> &Results,
                         const SmallVectorImpl<MVT> &Params) {
-  auto Sig = make_unique<wasm::WasmSignature>();
+  auto Sig = std::make_unique<wasm::WasmSignature>();
   valTypesFromMVTs(Results, Sig->Returns);
   valTypesFromMVTs(Params, Sig->Params);
   return Sig;
index 7e65368e671a5279e4994c57d81a7334f338b19b..bdf5fe2620a464237f90ff67df49233fcec24645 100644 (file)
@@ -140,7 +140,7 @@ WebAssemblyTargetMachine::getSubtargetImpl(std::string CPU,
                                            std::string FS) const {
   auto &I = SubtargetMap[CPU + FS];
   if (!I) {
-    I = llvm::make_unique<WebAssemblySubtarget>(TargetTriple, CPU, FS, *this);
+    I = std::make_unique<WebAssemblySubtarget>(TargetTriple, CPU, FS, *this);
   }
   return I.get();
 }
index 37479954a70708ac80df0aa92d98bf72544e83b1..77c8ca4308296b2254d1d2e7b26ab688c13ed9ec 100644 (file)
@@ -581,7 +581,7 @@ struct X86Operand final : public MCParsedAsmOperand {
 
   static std::unique_ptr<X86Operand> CreateToken(StringRef Str, SMLoc Loc) {
     SMLoc EndLoc = SMLoc::getFromPointer(Loc.getPointer() + Str.size());
-    auto Res = llvm::make_unique<X86Operand>(Token, Loc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Token, Loc, EndLoc);
     Res->Tok.Data = Str.data();
     Res->Tok.Length = Str.size();
     return Res;
@@ -591,7 +591,7 @@ struct X86Operand final : public MCParsedAsmOperand {
   CreateReg(unsigned RegNo, SMLoc StartLoc, SMLoc EndLoc,
             bool AddressOf = false, SMLoc OffsetOfLoc = SMLoc(),
             StringRef SymName = StringRef(), void *OpDecl = nullptr) {
-    auto Res = llvm::make_unique<X86Operand>(Register, StartLoc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Register, StartLoc, EndLoc);
     Res->Reg.RegNo = RegNo;
     Res->AddressOf = AddressOf;
     Res->OffsetOfLoc = OffsetOfLoc;
@@ -602,19 +602,19 @@ struct X86Operand final : public MCParsedAsmOperand {
 
   static std::unique_ptr<X86Operand>
   CreateDXReg(SMLoc StartLoc, SMLoc EndLoc) {
-    return llvm::make_unique<X86Operand>(DXRegister, StartLoc, EndLoc);
+    return std::make_unique<X86Operand>(DXRegister, StartLoc, EndLoc);
   }
 
   static std::unique_ptr<X86Operand>
   CreatePrefix(unsigned Prefixes, SMLoc StartLoc, SMLoc EndLoc) {
-    auto Res = llvm::make_unique<X86Operand>(Prefix, StartLoc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Prefix, StartLoc, EndLoc);
     Res->Pref.Prefixes = Prefixes;
     return Res;
   }
 
   static std::unique_ptr<X86Operand> CreateImm(const MCExpr *Val,
                                                SMLoc StartLoc, SMLoc EndLoc) {
-    auto Res = llvm::make_unique<X86Operand>(Immediate, StartLoc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Immediate, StartLoc, EndLoc);
     Res->Imm.Val = Val;
     return Res;
   }
@@ -624,7 +624,7 @@ struct X86Operand final : public MCParsedAsmOperand {
   CreateMem(unsigned ModeSize, const MCExpr *Disp, SMLoc StartLoc, SMLoc EndLoc,
             unsigned Size = 0, StringRef SymName = StringRef(),
             void *OpDecl = nullptr, unsigned FrontendSize = 0) {
-    auto Res = llvm::make_unique<X86Operand>(Memory, StartLoc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Memory, StartLoc, EndLoc);
     Res->Mem.SegReg   = 0;
     Res->Mem.Disp     = Disp;
     Res->Mem.BaseReg  = 0;
@@ -652,7 +652,7 @@ struct X86Operand final : public MCParsedAsmOperand {
     // The scale should always be one of {1,2,4,8}.
     assert(((Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8)) &&
            "Invalid scale!");
-    auto Res = llvm::make_unique<X86Operand>(Memory, StartLoc, EndLoc);
+    auto Res = std::make_unique<X86Operand>(Memory, StartLoc, EndLoc);
     Res->Mem.SegReg   = SegReg;
     Res->Mem.Disp     = Disp;
     Res->Mem.BaseReg  = BaseReg;
index 232a065932384686d505629933770d704d4aea69..b6d809ab60b9bb077d705adadba345806184017d 100644 (file)
@@ -329,5 +329,5 @@ unsigned X86ELFObjectWriter::getRelocType(MCContext &Ctx, const MCValue &Target,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createX86ELFObjectWriter(bool IsELF64, uint8_t OSABI, uint16_t EMachine) {
-  return llvm::make_unique<X86ELFObjectWriter>(IsELF64, OSABI, EMachine);
+  return std::make_unique<X86ELFObjectWriter>(IsELF64, OSABI, EMachine);
 }
index fc7e99f61e5e67fb333d6a1ec2f13511dd4d35de..6c52ba2b5f2d9f09c28b3530da18213e7b3d9665 100644 (file)
@@ -600,5 +600,5 @@ void X86MachObjectWriter::RecordX86Relocation(MachObjectWriter *Writer,
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createX86MachObjectWriter(bool Is64Bit, uint32_t CPUType,
                                 uint32_t CPUSubtype) {
-  return llvm::make_unique<X86MachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
+  return std::make_unique<X86MachObjectWriter>(Is64Bit, CPUType, CPUSubtype);
 }
index 3baab9da1c41e7bb7b78d4515e022aeb8f924136..760239f7650587f94b5bb0a1a8015040439ca734 100644 (file)
@@ -109,5 +109,5 @@ unsigned X86WinCOFFObjectWriter::getRelocType(MCContext &Ctx,
 
 std::unique_ptr<MCObjectTargetWriter>
 llvm::createX86WinCOFFObjectWriter(bool Is64Bit) {
-  return llvm::make_unique<X86WinCOFFObjectWriter>(Is64Bit);
+  return std::make_unique<X86WinCOFFObjectWriter>(Is64Bit);
 }
index e9987d1f62bd0632cadc38d4c228948fc12efbe0..d5494ef12370fccc485906f4eb586f59eb69de54 100644 (file)
@@ -170,7 +170,7 @@ bool X86WinCOFFTargetStreamer::emitFPOProc(const MCSymbol *ProcSym,
         L, "opening new .cv_fpo_proc before closing previous frame");
     return true;
   }
-  CurFPOData = llvm::make_unique<FPOData>();
+  CurFPOData = std::make_unique<FPOData>();
   CurFPOData->Function = ProcSym;
   CurFPOData->Begin = emitFPOLabel();
   CurFPOData->ParamsSize = ParamsSize;
index 9dea94f1368d46185710cec6acc3ba644eef5e07..1bf2d5ba7b8f98987234fd38e64eec3c9e6d243e 100644 (file)
@@ -564,7 +564,7 @@ X86CondBrFolding::analyzeMBB(MachineBasicBlock &MBB) {
     Modified = false;
     break;
   }
-  return llvm::make_unique<TargetMBBInfo>(TargetMBBInfo{
+  return std::make_unique<TargetMBBInfo>(TargetMBBInfo{
       TBB, FBB, BrInstr, CmpInstr, CC, SrcReg, CmpValue, Modified, CmpBrOnly});
 }
 
index 0cbf13899a2945bc4a1400476cff7c1db183f37a..c42acae311e8c078d4cecd73a1633842a6419853 100644 (file)
@@ -86,22 +86,22 @@ extern "C" void LLVMInitializeX86Target() {
 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
   if (TT.isOSBinFormatMachO()) {
     if (TT.getArch() == Triple::x86_64)
-      return llvm::make_unique<X86_64MachoTargetObjectFile>();
-    return llvm::make_unique<TargetLoweringObjectFileMachO>();
+      return std::make_unique<X86_64MachoTargetObjectFile>();
+    return std::make_unique<TargetLoweringObjectFileMachO>();
   }
 
   if (TT.isOSFreeBSD())
-    return llvm::make_unique<X86FreeBSDTargetObjectFile>();
+    return std::make_unique<X86FreeBSDTargetObjectFile>();
   if (TT.isOSLinux() || TT.isOSNaCl() || TT.isOSIAMCU())
-    return llvm::make_unique<X86LinuxNaClTargetObjectFile>();
+    return std::make_unique<X86LinuxNaClTargetObjectFile>();
   if (TT.isOSSolaris())
-    return llvm::make_unique<X86SolarisTargetObjectFile>();
+    return std::make_unique<X86SolarisTargetObjectFile>();
   if (TT.isOSFuchsia())
-    return llvm::make_unique<X86FuchsiaTargetObjectFile>();
+    return std::make_unique<X86FuchsiaTargetObjectFile>();
   if (TT.isOSBinFormatELF())
-    return llvm::make_unique<X86ELFTargetObjectFile>();
+    return std::make_unique<X86ELFTargetObjectFile>();
   if (TT.isOSBinFormatCOFF())
-    return llvm::make_unique<TargetLoweringObjectFileCOFF>();
+    return std::make_unique<TargetLoweringObjectFileCOFF>();
   llvm_unreachable("unknown subtarget type");
 }
 
@@ -311,7 +311,7 @@ X86TargetMachine::getSubtargetImpl(const Function &F) const {
     // creation will depend on the TM and the code generation flags on the
     // function that reside in TargetOptions.
     resetTargetOptions(F);
-    I = llvm::make_unique<X86Subtarget>(TargetTriple, CPU, FS, *this,
+    I = std::make_unique<X86Subtarget>(TargetTriple, CPU, FS, *this,
                                         Options.StackAlignmentOverride,
                                         PreferVectorWidthOverride,
                                         RequiredVectorWidth);
index 2a8cd6b657b78e3aaee08e5cd2fade22264b97e1..b5b7445265b7e48d2922cf6b2fa07e2ebcbbf805 100644 (file)
@@ -53,7 +53,7 @@ XCoreTargetMachine::XCoreTargetMachine(const Target &T, const Triple &TT,
           T, "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32",
           TT, CPU, FS, Options, getEffectiveRelocModel(RM),
           getEffectiveXCoreCodeModel(CM), OL),
-      TLOF(llvm::make_unique<XCoreTargetObjectFile>()),
+      TLOF(std::make_unique<XCoreTargetObjectFile>()),
       Subtarget(TT, CPU, FS, *this) {
   initAsmInfo();
 }
index 9d678e7437690485a26fd2e494ca4350111f07e5..c3e05577f044cbc33e36b8634a60056728ce51e6 100644 (file)
@@ -115,7 +115,7 @@ struct CoroCleanup : FunctionPass {
                                      "llvm.coro.subfn.addr", "llvm.coro.free",
                                      "llvm.coro.id", "llvm.coro.id.retcon",
                                      "llvm.coro.id.retcon.once"}))
-      L = llvm::make_unique<Lowerer>(M);
+      L = std::make_unique<Lowerer>(M);
     return false;
   }
 
index aff69a45c5d2b20ad72311ce83965ccf40dc68dc..55993d33ee4e06ed498abbdb432c92896622a4e5 100644 (file)
@@ -247,7 +247,7 @@ struct CoroEarly : public FunctionPass {
                                      "llvm.coro.promise",
                                      "llvm.coro.resume",
                                      "llvm.coro.suspend"}))
-      L = llvm::make_unique<Lowerer>(M);
+      L = std::make_unique<Lowerer>(M);
     return false;
   }
 
index 6707aa1c827d618c782bda26d66cf834712cc181..aca77119023bca7f096e7774cd51a480c5f701a3 100644 (file)
@@ -286,7 +286,7 @@ struct CoroElide : FunctionPass {
 
   bool doInitialization(Module &M) override {
     if (coro::declaresIntrinsics(M, {"llvm.coro.id"}))
-      L = llvm::make_unique<Lowerer>(M);
+      L = std::make_unique<Lowerer>(M);
     return false;
   }
 
index c81ed538cbc20206bf9949a65216d949845a721b..f915aea004fdd401581ab48f1decee08c0cb62e6 100644 (file)
@@ -450,7 +450,7 @@ static void computeImportForFunction(
         } else if (PrintImportFailures) {
           assert(!FailureInfo &&
                  "Expected no FailureInfo for newly rejected candidate");
-          FailureInfo = llvm::make_unique<FunctionImporter::ImportFailureInfo>(
+          FailureInfo = std::make_unique<FunctionImporter::ImportFailureInfo>(
               VI, Edge.second.getHotness(), Reason, 1);
         }
         LLVM_DEBUG(
index ab1a9a79cad67a46d5d201da649d8d29ddfd1aa0..79a5a9b80a9d164b74f44388f80cf81b2e9ec2e9 100644 (file)
@@ -607,9 +607,9 @@ bool HotColdSplitting::outlineColdRegions(Function &F, bool HasProfileSummary) {
     });
 
     if (!DT)
-      DT = make_unique<DominatorTree>(F);
+      DT = std::make_unique<DominatorTree>(F);
     if (!PDT)
-      PDT = make_unique<PostDominatorTree>(F);
+      PDT = std::make_unique<PostDominatorTree>(F);
 
     auto Regions = OutliningRegion::create(*BB, *DT, *PDT);
     for (OutliningRegion &Region : Regions) {
index 945f8affae6e601794830cf9bc2e884436de9a26..3b9e7cf3b7172fcf2502ae8b852a6bd8038bd10c 100644 (file)
@@ -879,7 +879,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
   if (!ImportedFunctionsStats &&
       InlinerFunctionImportStats != InlinerFunctionImportStatsOpts::No) {
     ImportedFunctionsStats =
-        llvm::make_unique<ImportedFunctionsInliningStatistics>();
+        std::make_unique<ImportedFunctionsInliningStatistics>();
     ImportedFunctionsStats->setModuleInfo(M);
   }
 
index 733782e8764dd1e4540ef45684e40ebc519d66da..62f4584d5f58d0bec402c33e9e5f67720221e741 100644 (file)
@@ -409,7 +409,7 @@ PartialInlinerImpl::computeOutliningColdRegionsInfo(Function *F,
     return std::unique_ptr<FunctionOutliningMultiRegionInfo>();
 
   std::unique_ptr<FunctionOutliningMultiRegionInfo> OutliningInfo =
-      llvm::make_unique<FunctionOutliningMultiRegionInfo>();
+      std::make_unique<FunctionOutliningMultiRegionInfo>();
 
   auto IsSingleEntry = [](SmallVectorImpl<BasicBlock *> &BlockList) {
     BasicBlock *Dom = BlockList.front();
@@ -589,7 +589,7 @@ PartialInlinerImpl::computeOutliningInfo(Function *F) {
   };
 
   std::unique_ptr<FunctionOutliningInfo> OutliningInfo =
-      llvm::make_unique<FunctionOutliningInfo>();
+      std::make_unique<FunctionOutliningInfo>();
 
   BasicBlock *CurrEntry = EntryBlock;
   bool CandidateFound = false;
@@ -966,7 +966,7 @@ PartialInlinerImpl::FunctionCloner::FunctionCloner(
     Function *F, FunctionOutliningInfo *OI, OptimizationRemarkEmitter &ORE,
     function_ref<AssumptionCache *(Function &)> LookupAC)
     : OrigFunc(F), ORE(ORE), LookupAC(LookupAC) {
-  ClonedOI = llvm::make_unique<FunctionOutliningInfo>();
+  ClonedOI = std::make_unique<FunctionOutliningInfo>();
 
   // Clone the function, so that we can hack away on it.
   ValueToValueMapTy VMap;
@@ -991,7 +991,7 @@ PartialInlinerImpl::FunctionCloner::FunctionCloner(
     OptimizationRemarkEmitter &ORE,
     function_ref<AssumptionCache *(Function &)> LookupAC)
     : OrigFunc(F), ORE(ORE), LookupAC(LookupAC) {
-  ClonedOMRI = llvm::make_unique<FunctionOutliningMultiRegionInfo>();
+  ClonedOMRI = std::make_unique<FunctionOutliningMultiRegionInfo>();
 
   // Clone the function, so that we can hack away on it.
   ValueToValueMapTy VMap;
index 7be3608bd2ec94bc25cc197ece35e24a3b1802b1..1393befe77b8e81786e470250b243334f12bed9e 100644 (file)
@@ -14,7 +14,7 @@ PreservedAnalyses IPSCCPPass::run(Module &M, ModuleAnalysisManager &AM) {
   auto getAnalysis = [&FAM](Function &F) -> AnalysisResultsForFn {
     DominatorTree &DT = FAM.getResult<DominatorTreeAnalysis>(F);
     return {
-        make_unique<PredicateInfo>(F, DT, FAM.getResult<AssumptionAnalysis>(F)),
+        std::make_unique<PredicateInfo>(F, DT, FAM.getResult<AssumptionAnalysis>(F)),
         &DT, FAM.getCachedResult<PostDominatorTreeAnalysis>(F)};
   };
 
@@ -54,7 +54,7 @@ public:
       DominatorTree &DT =
           this->getAnalysis<DominatorTreeWrapperPass>(F).getDomTree();
       return {
-          make_unique<PredicateInfo>(
+          std::make_unique<PredicateInfo>(
               F, DT,
               this->getAnalysis<AssumptionCacheTracker>().getAssumptionCache(
                   F)),
index 77140c746a1898e73fa8a8e13155bd57e18293a0..79b42e7611f53d9c6fbcfaf298a0eaaaee2ac4df 100644 (file)
@@ -1745,7 +1745,7 @@ bool SampleProfileLoader::runOnFunction(Function &F, ModuleAnalysisManager *AM)
             .getManager();
     ORE = &FAM.getResult<OptimizationRemarkEmitterAnalysis>(F);
   } else {
-    OwnedORE = make_unique<OptimizationRemarkEmitter>(&F);
+    OwnedORE = std::make_unique<OptimizationRemarkEmitter>(&F);
     ORE = OwnedORE.get();
   }
   Samples = Reader->getSamplesFor(F);
index 31c731e734f30391152036f070f9f464523d86a2..690b5e8bf49ee688a547efafca563f1c151b79ba 100644 (file)
@@ -466,7 +466,7 @@ void writeThinLTOBitcode(raw_ostream &OS, raw_ostream *ThinLinkOS,
       // splitAndWriteThinLTOBitcode). Just always build it once via the
       // buildModuleSummaryIndex when Module(s) are ready.
       ProfileSummaryInfo PSI(M);
-      NewIndex = llvm::make_unique<ModuleSummaryIndex>(
+      NewIndex = std::make_unique<ModuleSummaryIndex>(
           buildModuleSummaryIndex(M, nullptr, &PSI));
       Index = NewIndex.get();
     }
index 4436363f65888c1eb48e8c14ce33ce6139ba1d74..4490a7ef62adf008cd0180ccbe2f236709f9fc38 100644 (file)
@@ -644,7 +644,7 @@ struct WholeProgramDevirt : public ModulePass {
     // an optimization remark emitter on the fly, when we need it.
     std::unique_ptr<OptimizationRemarkEmitter> ORE;
     auto OREGetter = [&](Function *F) -> OptimizationRemarkEmitter & {
-      ORE = make_unique<OptimizationRemarkEmitter>(F);
+      ORE = std::make_unique<OptimizationRemarkEmitter>(F);
       return *ORE;
     };
 
index 971e00041762d9b5ba6fbdec76cd780c4d55d284..8bb6f47c4846f1cfe83f42f84fde0f8fcaa8f08d 100644 (file)
@@ -257,13 +257,13 @@ public:
     std::tie(Iter, Inserted) = BBInfos.insert(std::make_pair(Src, nullptr));
     if (Inserted) {
       // Newly inserted, update the real info.
-      Iter->second = std::move(llvm::make_unique<BBInfo>(Index));
+      Iter->second = std::move(std::make_unique<BBInfo>(Index));
       Index++;
     }
     std::tie(Iter, Inserted) = BBInfos.insert(std::make_pair(Dest, nullptr));
     if (Inserted)
       // Newly inserted, update the real info.
-      Iter->second = std::move(llvm::make_unique<BBInfo>(Index));
+      Iter->second = std::move(std::make_unique<BBInfo>(Index));
     AllEdges.emplace_back(new Edge(Src, Dest, W));
     return *AllEdges.back();
   }
index c08eb673fd6df9bae66ffae5668e0f11ef61bb3a..04bc614334fcc6e06b0549398a61638e8fd6d034 100644 (file)
@@ -2070,7 +2070,7 @@ bool ControlHeightReductionLegacyPass::runOnFunction(Function &F) {
       getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
   RegionInfo &RI = getAnalysis<RegionInfoPass>().getRegionInfo();
   std::unique_ptr<OptimizationRemarkEmitter> OwnedORE =
-      llvm::make_unique<OptimizationRemarkEmitter>(&F);
+      std::make_unique<OptimizationRemarkEmitter>(&F);
   return CHR(F, BFI, DT, PSI, RI, *OwnedORE.get()).run();
 }
 
index b2d52fad1c09e0d87ff7ebf4c5a0d59d0380c2be..510a3ad57b3a03170540c0b4307e27e97d76a42e 100644 (file)
@@ -696,7 +696,7 @@ void GCOVProfiler::emitProfileNotes() {
         ++It;
       EntryBlock.splitBasicBlock(It);
 
-      Funcs.push_back(make_unique<GCOVFunction>(SP, &F, &out, FunctionIdent++,
+      Funcs.push_back(std::make_unique<GCOVFunction>(SP, &F, &out, FunctionIdent++,
                                                 Options.UseCfgChecksum,
                                                 Options.ExitBlockBeforeBody));
       GCOVFunction &Func = *Funcs.back();
index f09bf25deafc2e74c44e79caf731c7cde48a07bb..163ae3ec62f9c7a7f76dd445781c864ca70833b6 100644 (file)
@@ -287,7 +287,7 @@ public:
   StringRef getPassName() const override { return "HWAddressSanitizer"; }
 
   bool doInitialization(Module &M) override {
-    HWASan = llvm::make_unique<HWAddressSanitizer>(M, CompileKernel, Recover);
+    HWASan = std::make_unique<HWAddressSanitizer>(M, CompileKernel, Recover);
     return true;
   }
 
index c7371f567ff3ab0af7e61b8df5d28397d37d4092..74d6e76eceb67e8dbc6591a30390640f2aefa371 100644 (file)
@@ -403,7 +403,7 @@ static bool promoteIndirectCalls(Module &M, ProfileSummaryInfo *PSI,
           AM->getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
       ORE = &FAM.getResult<OptimizationRemarkEmitterAnalysis>(F);
     } else {
-      OwnedORE = llvm::make_unique<OptimizationRemarkEmitter>(&F);
+      OwnedORE = std::make_unique<OptimizationRemarkEmitter>(&F);
       ORE = OwnedORE.get();
     }
 
index 6fec3c9c79ee368cd3017b1fdb2a65a6687a714c..73a91d909a9052a1a5cbaaaffb884fdcccc1fbc2 100644 (file)
@@ -1662,9 +1662,9 @@ static bool annotateAllFunctions(
          F.getName().equals(ViewBlockFreqFuncName))) {
       LoopInfo LI{DominatorTree(F)};
       std::unique_ptr<BranchProbabilityInfo> NewBPI =
-          llvm::make_unique<BranchProbabilityInfo>(F, LI);
+          std::make_unique<BranchProbabilityInfo>(F, LI);
       std::unique_ptr<BlockFrequencyInfo> NewBFI =
-          llvm::make_unique<BlockFrequencyInfo>(F, *NewBPI, LI);
+          std::make_unique<BlockFrequencyInfo>(F, *NewBPI, LI);
       if (PGOViewCounts == PGOVCT_Graph)
         NewBFI->view();
       else if (PGOViewCounts == PGOVCT_Text) {
index 188f95b4676bb738b0b15177571499f6ac4257d3..ac78b4d993ed2e9bb406ff154f08b4b23d8d47da 100644 (file)
@@ -138,7 +138,7 @@ public:
                OptimizationRemarkEmitter &ORE, DominatorTree *DT)
       : Func(Func), BFI(BFI), ORE(ORE), DT(DT), Changed(false) {
     ValueDataArray =
-        llvm::make_unique<InstrProfValueData[]>(MemOPMaxVersion + 2);
+        std::make_unique<InstrProfValueData[]>(MemOPMaxVersion + 2);
     // Get the MemOPSize range information from option MemOPSizeRange,
     getMemOPSizeRangeFromOption(MemOPSizeRange, PreciseRangeStart,
                                 PreciseRangeLast);
index 22628ffa3e2b8eb12d67fd91050122e69acd7f80..829f310b6fb005bb8e911a81c4a503f3395dbbf4 100644 (file)
@@ -527,7 +527,7 @@ public:
            const TargetTransformInfo &TTI, DominatorTree &DT,
            AssumptionCache &AC, MemorySSA *MSSA)
       : TLI(TLI), TTI(TTI), DT(DT), AC(AC), SQ(DL, &TLI, &DT, &AC), MSSA(MSSA),
-        MSSAUpdater(llvm::make_unique<MemorySSAUpdater>(MSSA)) {}
+        MSSAUpdater(std::make_unique<MemorySSAUpdater>(MSSA)) {}
 
   bool run();
 
index 7614599653c42779e04356981a9533e55a491d2d..46f4ee488225ee883a740c477bd59e1787673416 100644 (file)
@@ -257,7 +257,7 @@ public:
   GVNHoist(DominatorTree *DT, PostDominatorTree *PDT, AliasAnalysis *AA,
            MemoryDependenceResults *MD, MemorySSA *MSSA)
       : DT(DT), PDT(PDT), AA(AA), MD(MD), MSSA(MSSA),
-        MSSAUpdater(llvm::make_unique<MemorySSAUpdater>(MSSA)) {}
+        MSSAUpdater(std::make_unique<MemorySSAUpdater>(MSSA)) {}
 
   bool run(Function &F) {
     NumFuncArgs = F.arg_size();
index 572b69fb89005904267756e763c64d2c37b33097..5015ca8dbb14c4eb36bbf2ee987d196fb118e2cf 100644 (file)
@@ -346,7 +346,7 @@ bool LoopInvariantCodeMotion::runOnLoop(
     CurAST = collectAliasInfoForLoop(L, LI, AA);
   } else {
     LLVM_DEBUG(dbgs() << "LICM: Using MemorySSA.\n");
-    MSSAU = make_unique<MemorySSAUpdater>(MSSA);
+    MSSAU = std::make_unique<MemorySSAUpdater>(MSSA);
 
     unsigned AccessCapCount = 0;
     for (auto *BB : L->getBlocks()) {
@@ -2168,7 +2168,7 @@ LoopInvariantCodeMotion::collectAliasInfoForLoop(Loop *L, LoopInfo *LI,
     LoopToAliasSetMap.erase(MapI);
   }
   if (!CurAST)
-    CurAST = make_unique<AliasSetTracker>(*AA);
+    CurAST = std::make_unique<AliasSetTracker>(*AA);
 
   // Add everything from the sub loops that are no longer directly available.
   for (Loop *InnerL : RecomputeLoops)
@@ -2187,7 +2187,7 @@ std::unique_ptr<AliasSetTracker>
 LoopInvariantCodeMotion::collectAliasInfoForLoopWithMSSA(
     Loop *L, AliasAnalysis *AA, MemorySSAUpdater *MSSAU) {
   auto *MSSA = MSSAU->getMemorySSA();
-  auto CurAST = make_unique<AliasSetTracker>(*AA, MSSA, L);
+  auto CurAST = std::make_unique<AliasSetTracker>(*AA, MSSA, L);
   CurAST->addAllInstructionsInLoopUsingMSSA();
   return CurAST;
 }
index b5b8e720069c04a4960cf9d1f0570933b1810f1e..1ff5e969992b7f6138aa45eddd4a2e6db5c98168 100644 (file)
@@ -525,7 +525,7 @@ bool LoopUnswitch::runOnLoop(Loop *L, LPPassManager &LPM_Ref) {
   DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
   if (EnableMSSALoopDependency) {
     MSSA = &getAnalysis<MemorySSAWrapperPass>().getMSSA();
-    MSSAU = make_unique<MemorySSAUpdater>(MSSA);
+    MSSAU = std::make_unique<MemorySSAUpdater>(MSSA);
     assert(DT && "Cannot update MemorySSA without a valid DomTree.");
   }
   currentLoop = L;
index 08ac2b666fcef15d0b2c400c1bb7c4f05e3508bc..e26f805765613260d5eb25ab45f7d9aa80d4dba3 100644 (file)
@@ -656,7 +656,7 @@ public:
          TargetLibraryInfo *TLI, AliasAnalysis *AA, MemorySSA *MSSA,
          const DataLayout &DL)
       : F(F), DT(DT), TLI(TLI), AA(AA), MSSA(MSSA), DL(DL),
-        PredInfo(make_unique<PredicateInfo>(F, *DT, *AC)),
+        PredInfo(std::make_unique<PredicateInfo>(F, *DT, *AC)),
         SQ(DL, TLI, DT, AC, /*CtxI=*/nullptr, /*UseInstrInfo=*/false) {}
 
   bool runGVN();
index 7ddf59becba96c30143feee4304f9e85f8fef9d4..71e39e9f56f0e01c28860b9d89a1cdcc37cdefba 100644 (file)
@@ -48,7 +48,7 @@ std::unique_ptr<Module> llvm::CloneModule(
     function_ref<bool(const GlobalValue *)> ShouldCloneDefinition) {
   // First off, we need to create the new module.
   std::unique_ptr<Module> New =
-      llvm::make_unique<Module>(M.getModuleIdentifier(), M.getContext());
+      std::make_unique<Module>(M.getModuleIdentifier(), M.getContext());
   New->setSourceFileName(M.getSourceFileName());
   New->setDataLayout(M.getDataLayout());
   New->setTargetTriple(M.getTargetTriple());
index 0e203f4e075dcfb04965d051319637035fd9a6b7..ad36790b8c6a69fcbae5085e60ce7a04a3c76dd1 100644 (file)
@@ -469,7 +469,7 @@ bool Evaluator::EvaluateBlock(BasicBlock::iterator CurInst,
         return false;  // Cannot handle array allocs.
       }
       Type *Ty = AI->getAllocatedType();
-      AllocaTmps.push_back(llvm::make_unique<GlobalVariable>(
+      AllocaTmps.push_back(std::make_unique<GlobalVariable>(
           Ty, false, GlobalValue::InternalLinkage, UndefValue::get(Ty),
           AI->getName(), /*TLMode=*/GlobalValue::NotThreadLocal,
           AI->getType()->getPointerAddressSpace()));
index 8041e66e6c4c24b742da16a29b5d113b395a8e23..1e9864a12d1b55effa59de040cf94bc66b9ed4a0 100644 (file)
@@ -25,7 +25,7 @@ ImportedFunctionsInliningStatistics::createInlineGraphNode(const Function &F) {
 
   auto &ValueLookup = NodesMap[F.getName()];
   if (!ValueLookup) {
-    ValueLookup = llvm::make_unique<InlineGraphNode>();
+    ValueLookup = std::make_unique<InlineGraphNode>();
     ValueLookup->Imported = F.getMetadata("thinlto_src_module") != nullptr;
   }
   return *ValueLookup;
index e202b45208666c9f42d231d5be2e1aed08956089..d0f89dc54bfbcde876a7faae6f5177492b0977d3 100644 (file)
@@ -808,7 +808,7 @@ bool LoopSimplify::runOnFunction(Function &F) {
     auto *MSSAAnalysis = getAnalysisIfAvailable<MemorySSAWrapperPass>();
     if (MSSAAnalysis) {
       MSSA = &MSSAAnalysis->getMSSA();
-      MSSAU = make_unique<MemorySSAUpdater>(MSSA);
+      MSSAU = std::make_unique<MemorySSAUpdater>(MSSA);
     }
   }
 
@@ -839,7 +839,7 @@ PreservedAnalyses LoopSimplifyPass::run(Function &F,
   std::unique_ptr<MemorySSAUpdater> MSSAU;
   if (MSSAAnalysis) {
     auto *MSSA = &MSSAAnalysis->getMSSA();
-    MSSAU = make_unique<MemorySSAUpdater>(MSSA);
+    MSSAU = std::make_unique<MemorySSAUpdater>(MSSA);
   }
 
 
index 5ae24a97311cf9a619a1113bee83fbe9a50b1630..3c288bab3779fff8d123165f40621a00bfb9688b 100644 (file)
@@ -798,7 +798,7 @@ static void replaceCreatedSSACopys(PredicateInfo &PredInfo, Function &F) {
 bool PredicateInfoPrinterLegacyPass::runOnFunction(Function &F) {
   auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
   auto &AC = getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
-  auto PredInfo = make_unique<PredicateInfo>(F, DT, AC);
+  auto PredInfo = std::make_unique<PredicateInfo>(F, DT, AC);
   PredInfo->print(dbgs());
   if (VerifyPredicateInfo)
     PredInfo->verifyPredicateInfo();
@@ -812,7 +812,7 @@ PreservedAnalyses PredicateInfoPrinterPass::run(Function &F,
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
   auto &AC = AM.getResult<AssumptionAnalysis>(F);
   OS << "PredicateInfo for function: " << F.getName() << "\n";
-  auto PredInfo = make_unique<PredicateInfo>(F, DT, AC);
+  auto PredInfo = std::make_unique<PredicateInfo>(F, DT, AC);
   PredInfo->print(OS);
 
   replaceCreatedSSACopys(*PredInfo, F);
@@ -871,7 +871,7 @@ PreservedAnalyses PredicateInfoVerifierPass::run(Function &F,
                                                  FunctionAnalysisManager &AM) {
   auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
   auto &AC = AM.getResult<AssumptionAnalysis>(F);
-  make_unique<PredicateInfo>(F, DT, AC)->verifyPredicateInfo();
+  std::make_unique<PredicateInfo>(F, DT, AC)->verifyPredicateInfo();
 
   return PreservedAnalyses::all();
 }
index 456724779b4359b447b4e74ae982d1cb76376b41..5d380dcf231c0b25b7915f4fd8dce286889223cc 100644 (file)
@@ -380,11 +380,11 @@ parseRewriteFunctionDescriptor(yaml::Stream &YS, yaml::ScalarNode *K,
   // TODO see if there is a more elegant solution to selecting the rewrite
   // descriptor type
   if (!Target.empty())
-    DL->push_back(llvm::make_unique<ExplicitRewriteFunctionDescriptor>(
+    DL->push_back(std::make_unique<ExplicitRewriteFunctionDescriptor>(
         Source, Target, Naked));
   else
     DL->push_back(
-        llvm::make_unique<PatternRewriteFunctionDescriptor>(Source, Transform));
+        std::make_unique<PatternRewriteFunctionDescriptor>(Source, Transform));
 
   return true;
 }
@@ -442,11 +442,11 @@ parseRewriteGlobalVariableDescriptor(yaml::Stream &YS, yaml::ScalarNode *K,
   }
 
   if (!Target.empty())
-    DL->push_back(llvm::make_unique<ExplicitRewriteGlobalVariableDescriptor>(
+    DL->push_back(std::make_unique<ExplicitRewriteGlobalVariableDescriptor>(
         Source, Target,
         /*Naked*/ false));
   else
-    DL->push_back(llvm::make_unique<PatternRewriteGlobalVariableDescriptor>(
+    DL->push_back(std::make_unique<PatternRewriteGlobalVariableDescriptor>(
         Source, Transform));
 
   return true;
@@ -505,11 +505,11 @@ parseRewriteGlobalAliasDescriptor(yaml::Stream &YS, yaml::ScalarNode *K,
   }
 
   if (!Target.empty())
-    DL->push_back(llvm::make_unique<ExplicitRewriteNamedAliasDescriptor>(
+    DL->push_back(std::make_unique<ExplicitRewriteNamedAliasDescriptor>(
         Source, Target,
         /*Naked*/ false));
   else
-    DL->push_back(llvm::make_unique<PatternRewriteNamedAliasDescriptor>(
+    DL->push_back(std::make_unique<PatternRewriteNamedAliasDescriptor>(
         Source, Transform));
 
   return true;
index dac48a1d8142b879db0cd7691a1212f084a4a6e4..870ac70057107cc6d2ddeb27c9fb81e6e933afe9 100644 (file)
@@ -2746,7 +2746,7 @@ void InnerLoopVectorizer::emitMemRuntimeChecks(Loop *L, BasicBlock *Bypass) {
 
   // We currently don't use LoopVersioning for the actual loop cloning but we
   // still use it to add the noalias metadata.
-  LVer = llvm::make_unique<LoopVersioning>(*Legal->getLAI(), OrigLoop, LI, DT,
+  LVer = std::make_unique<LoopVersioning>(*Legal->getLAI(), OrigLoop, LI, DT,
                                            PSE.getSE());
   LVer->prepareNoAliasMetadata();
 }
@@ -6972,7 +6972,7 @@ VPlanPtr LoopVectorizationPlanner::buildVPlanWithVPRecipes(
 
   // Create a dummy pre-entry VPBasicBlock to start building the VPlan.
   VPBasicBlock *VPBB = new VPBasicBlock("Pre-Entry");
-  auto Plan = llvm::make_unique<VPlan>(VPBB);
+  auto Plan = std::make_unique<VPlan>(VPBB);
 
   VPRecipeBuilder RecipeBuilder(OrigLoop, TLI, Legal, CM, Builder);
   // Represent values that will have defs inside VPlan.
@@ -7092,7 +7092,7 @@ VPlanPtr LoopVectorizationPlanner::buildVPlan(VFRange &Range) {
   assert(EnableVPlanNativePath && "VPlan-native path is not enabled.");
 
   // Create new empty VPlan
-  auto Plan = llvm::make_unique<VPlan>();
+  auto Plan = std::make_unique<VPlan>();
 
   // Build hierarchical CFG
   VPlanHCFGBuilder HCFGBuilder(OrigLoop, LI, *Plan);
index e22eea2cbde6eed48ef674e920a9b44f57728464..e2a04dbaa8fdb8ae6a5eb38c2a871d2ca661c42b 100644 (file)
@@ -1299,7 +1299,7 @@ private:
                           const EdgeInfo &UserTreeIdx,
                           ArrayRef<unsigned> ReuseShuffleIndices = None,
                           ArrayRef<unsigned> ReorderIndices = None) {
-    VectorizableTree.push_back(llvm::make_unique<TreeEntry>(VectorizableTree));
+    VectorizableTree.push_back(std::make_unique<TreeEntry>(VectorizableTree));
     TreeEntry *Last = VectorizableTree.back().get();
     Last->Idx = VectorizableTree.size() - 1;
     Last->Scalars.insert(Last->Scalars.begin(), VL.begin(), VL.end());
@@ -2142,7 +2142,7 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
 
   auto &BSRef = BlocksSchedules[BB];
   if (!BSRef)
-    BSRef = llvm::make_unique<BlockScheduling>(BB);
+    BSRef = std::make_unique<BlockScheduling>(BB);
 
   BlockScheduling &BS = *BSRef.get();
 
@@ -4364,7 +4364,7 @@ void BoUpSLP::BlockScheduling::cancelScheduling(ArrayRef<Value *> VL,
 BoUpSLP::ScheduleData *BoUpSLP::BlockScheduling::allocateScheduleDataChunks() {
   // Allocate a new ScheduleData for the instruction.
   if (ChunkPos >= ChunkSize) {
-    ScheduleDataChunks.push_back(llvm::make_unique<ScheduleData[]>(ChunkSize));
+    ScheduleDataChunks.push_back(std::make_unique<ScheduleData[]>(ChunkSize));
     ChunkPos = 0;
   }
   return &(ScheduleDataChunks.back()[ChunkPos++]);
index d092ab493c9ba9b24d9a0b237adc85fc555804da..de03e232aaa61af2912fbe8985f9afe15d533c9e 100644 (file)
@@ -704,7 +704,7 @@ bool windows_manifest::isAvailable() { return false; }
 #endif
 
 WindowsManifestMerger::WindowsManifestMerger()
-    : Impl(make_unique<WindowsManifestMergerImpl>()) {}
+    : Impl(std::make_unique<WindowsManifestMergerImpl>()) {}
 
 WindowsManifestMerger::~WindowsManifestMerger() {}
 
index 870dd7c4fad4d822033fd99e8dcee792730bec13..02132b283e9207c944d53ac74c11c9cdef514dd2 100644 (file)
@@ -40,32 +40,32 @@ metadataRecordType(const XRayFileHeader &Header, uint8_t T) {
                              "Invalid metadata record type: %d", T);
   switch (T) {
   case MetadataRecordKinds::NewBufferKind:
-    return make_unique<NewBufferRecord>();
+    return std::make_unique<NewBufferRecord>();
   case MetadataRecordKinds::EndOfBufferKind:
     if (Header.Version >= 2)
       return createStringError(
           std::make_error_code(std::errc::executable_format_error),
           "End of buffer records are no longer supported starting version "
           "2 of the log.");
-    return make_unique<EndBufferRecord>();
+    return std::make_unique<EndBufferRecord>();
   case MetadataRecordKinds::NewCPUIdKind:
-    return make_unique<NewCPUIDRecord>();
+    return std::make_unique<NewCPUIDRecord>();
   case MetadataRecordKinds::TSCWrapKind:
-    return make_unique<TSCWrapRecord>();
+    return std::make_unique<TSCWrapRecord>();
   case MetadataRecordKinds::WalltimeMarkerKind:
-    return make_unique<WallclockRecord>();
+    return std::make_unique<WallclockRecord>();
   case MetadataRecordKinds::CustomEventMarkerKind:
     if (Header.Version >= 5)
-      return make_unique<CustomEventRecordV5>();
-    return make_unique<CustomEventRecord>();
+      return std::make_unique<CustomEventRecordV5>();
+    return std::make_unique<CustomEventRecord>();
   case MetadataRecordKinds::CallArgumentKind:
-    return make_unique<CallArgRecord>();
+    return std::make_unique<CallArgRecord>();
   case MetadataRecordKinds::BufferExtentsKind:
-    return make_unique<BufferExtents>();
+    return std::make_unique<BufferExtents>();
   case MetadataRecordKinds::TypedEventMarkerKind:
-    return make_unique<TypedEventRecord>();
+    return std::make_unique<TypedEventRecord>();
   case MetadataRecordKinds::PidKind:
-    return make_unique<PIDRecord>();
+    return std::make_unique<PIDRecord>();
   case MetadataRecordKinds::EnumEndMarker:
     llvm_unreachable("Invalid MetadataRecordKind");
   }
@@ -167,7 +167,7 @@ Expected<std::unique_ptr<Record>> FileBasedRecordProducer::produce() {
               LoadedType, PreReadOffset));
     R = std::move(MetadataRecordOrErr.get());
   } else {
-    R = llvm::make_unique<FunctionRecord>();
+    R = std::make_unique<FunctionRecord>();
   }
   RecordInitializer RI(E, OffsetPtr);
 
index f8fee696717e2d5397c01625668f58256e10afba..18dbf6b87ef4a81fb84622068e7450353521349c 100644 (file)
@@ -239,7 +239,7 @@ bool DwarfLinker::createStreamer(const Triple &TheTriple,
   if (Options.NoOutput)
     return true;
 
-  Streamer = llvm::make_unique<DwarfStreamer>(OutFile, Options);
+  Streamer = std::make_unique<DwarfStreamer>(OutFile, Options);
   return Streamer->init(TheTriple);
 }
 
@@ -998,7 +998,7 @@ void DwarfLinker::AssignAbbrev(DIEAbbrev &Abbrev) {
   } else {
     // Add to abbreviation list.
     Abbreviations.push_back(
-        llvm::make_unique<DIEAbbrev>(Abbrev.getTag(), Abbrev.hasChildren()));
+        std::make_unique<DIEAbbrev>(Abbrev.getTag(), Abbrev.hasChildren()));
     for (const auto &Attr : Abbrev.getData())
       Abbreviations.back()->AddAttribute(Attr.getAttribute(), Attr.getForm());
     AbbreviationsSet.InsertNode(Abbreviations.back().get(), InsertToken);
@@ -2324,7 +2324,7 @@ Error DwarfLinker::loadClangModule(
       }
 
       // Add this module.
-      Unit = llvm::make_unique<CompileUnit>(*CU, UnitID++, !Options.NoODR,
+      Unit = std::make_unique<CompileUnit>(*CU, UnitID++, !Options.NoODR,
                                             ModuleName);
       Unit->setHasInterestingContent();
       analyzeContextInfo(CUDie, 0, *Unit, &ODRContexts.getRoot(),
@@ -2711,7 +2711,7 @@ bool DwarfLinker::link(const DebugMap &Map) {
                                    LinkContext.Ranges, OffsetsStringPool,
                                    UniquingStringPool, ODRContexts,
                                    ModulesEndOffset, UnitID, Quiet)) {
-        LinkContext.CompileUnits.push_back(llvm::make_unique<CompileUnit>(
+        LinkContext.CompileUnits.push_back(std::make_unique<CompileUnit>(
             *CU, UnitID++, !Options.NoODR && !Options.Update, ""));
       }
     }
index 8fc298517862324ba284004bf48deb9e487d253c..75ec3207b036533f34d9a69711de2c80f0cf04c5 100644 (file)
@@ -91,7 +91,7 @@ bool DwarfStreamer::init(Triple TheTriple) {
     MIP = TheTarget->createMCInstPrinter(TheTriple, MAI->getAssemblerDialect(),
                                          *MAI, *MII, *MRI);
     MS = TheTarget->createAsmStreamer(
-        *MC, llvm::make_unique<formatted_raw_ostream>(OutFile), true, true, MIP,
+        *MC, std::make_unique<formatted_raw_ostream>(OutFile), true, true, MIP,
         std::unique_ptr<MCCodeEmitter>(MCE), std::unique_ptr<MCAsmBackend>(MAB),
         true);
     break;
index 8c7e686a304ecaf386f35e5cf6ad083aac61888a..27379c232decd5900c2df30058fb9fcac3f82e2e 100644 (file)
@@ -163,7 +163,7 @@ MachODebugMapParser::parseOneBinary(const MachOObjectFile &MainBinary,
                                     StringRef BinaryPath) {
   loadMainBinarySymbols(MainBinary);
   ArrayRef<uint8_t> UUID = MainBinary.getUuid();
-  Result = make_unique<DebugMap>(MainBinary.getArchTriple(), BinaryPath, UUID);
+  Result = std::make_unique<DebugMap>(MainBinary.getArchTriple(), BinaryPath, UUID);
   MainBinaryStrings = MainBinary.getStringTableData();
   for (const SymbolRef &Symbol : MainBinary.symbols()) {
     const DataRefImpl &DRI = Symbol.getRawDataRefImpl();
index cd0f2805dc25af97a8b62aed5707ce5a1d9cad74..ec9df299ebb22bbabe2f4b3a21ce0729dfa3b429 100644 (file)
@@ -35,7 +35,7 @@ llvm::Error ArchAndFile::createTempFile() {
   if (!T)
     return T.takeError();
 
-  File = llvm::make_unique<sys::fs::TempFile>(std::move(*T));
+  File = std::make_unique<sys::fs::TempFile>(std::move(*T));
   return Error::success();
 }
 
index 0211add7e20f594828026b7997310304aa63b5ae..0f720b6be23a4fd0d80941345c9425072874d7ae 100644 (file)
@@ -81,7 +81,7 @@ struct PluginInputFile {
   std::unique_ptr<ld_plugin_input_file> File;
 
   PluginInputFile(void *Handle) : Handle(Handle) {
-    File = llvm::make_unique<ld_plugin_input_file>();
+    File = std::make_unique<ld_plugin_input_file>();
     if (get_input_file(Handle, File.get()) != LDPS_OK)
       message(LDPL_FATAL, "Failed to get file information");
   }
@@ -924,7 +924,7 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite,
   Conf.DebugPassManager = options::debug_pass_manager;
 
   Conf.StatsFile = options::stats_file;
-  return llvm::make_unique<LTO>(std::move(Conf), Backend,
+  return std::make_unique<LTO>(std::move(Conf), Backend,
                                 options::ParallelCodeGenParallelismLevel);
 }
 
@@ -974,7 +974,7 @@ static std::unique_ptr<raw_fd_ostream> CreateLinkedObjectsFile() {
     return nullptr;
   assert(options::thinlto_index_only);
   std::error_code EC;
-  auto LinkedObjectsFile = llvm::make_unique<raw_fd_ostream>(
+  auto LinkedObjectsFile = std::make_unique<raw_fd_ostream>(
       options::thinlto_linked_objects_file, EC, sys::fs::OpenFlags::OF_None);
   if (EC)
     message(LDPL_FATAL, "Failed to create '%s': %s",
@@ -1011,7 +1011,7 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
   for (claimed_file &F : Modules) {
     if (options::thinlto && !HandleToInputFile.count(F.leader_handle))
       HandleToInputFile.insert(std::make_pair(
-          F.leader_handle, llvm::make_unique<PluginInputFile>(F.handle)));
+          F.leader_handle, std::make_unique<PluginInputFile>(F.handle)));
     // In case we are thin linking with a minimized bitcode file, ensure
     // the module paths encoded in the index reflect where the backends
     // will locate the full bitcode files for compiling/importing.
@@ -1046,8 +1046,8 @@ static std::vector<std::pair<SmallString<128>, bool>> runLTO() {
     Files[Task].second = !SaveTemps;
     int FD = getOutputFileName(Filename, /* TempOutFile */ !SaveTemps,
                                Files[Task].first, Task);
-    return llvm::make_unique<lto::NativeObjectStream>(
-        llvm::make_unique<llvm::raw_fd_ostream>(FD, true));
+    return std::make_unique<lto::NativeObjectStream>(
+        std::make_unique<llvm::raw_fd_ostream>(FD, true));
   };
 
   auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB) {
index 7df07b90a1d05b99affc48a82877849dbf81203d..74ad643496b8d3e21b6d1b21b26859aeea6ee660 100644 (file)
@@ -242,7 +242,7 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName,
   sys::fs::OpenFlags OpenFlags = sys::fs::OF_None;
   if (!Binary)
     OpenFlags |= sys::fs::OF_Text;
-  auto FDOut = llvm::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags);
+  auto FDOut = std::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
     return nullptr;
@@ -329,7 +329,7 @@ int main(int argc, char **argv) {
   // Set a diagnostic handler that doesn't exit on the first error
   bool HasError = false;
   Context.setDiagnosticHandler(
-      llvm::make_unique<LLCDiagnosticHandler>(&HasError));
+      std::make_unique<LLCDiagnosticHandler>(&HasError));
   Context.setInlineAsmDiagnosticHandler(InlineAsmDiagHandler, &HasError);
 
   Expected<std::unique_ptr<ToolOutputFile>> RemarksFileOrErr =
@@ -479,7 +479,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
   std::unique_ptr<ToolOutputFile> DwoOut;
   if (!SplitDwarfOutputFile.empty()) {
     std::error_code EC;
-    DwoOut = llvm::make_unique<ToolOutputFile>(SplitDwarfOutputFile, EC,
+    DwoOut = std::make_unique<ToolOutputFile>(SplitDwarfOutputFile, EC,
                                                sys::fs::OF_None);
     if (EC) {
       WithColor::error(errs(), argv[0]) << EC.message() << '\n';
@@ -533,7 +533,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
     if ((FileType != TargetMachine::CGFT_AssemblyFile &&
          !Out->os().supportsSeeking()) ||
         CompileTwice) {
-      BOS = make_unique<raw_svector_ostream>(Buffer);
+      BOS = std::make_unique<raw_svector_ostream>(Buffer);
       OS = BOS.get();
     }
 
index 84b0f6c08c91559df5aed65b4fbcb73950a51097..ccad067214141ba6da7955952daaa13fcb8a458e 100644 (file)
@@ -308,7 +308,7 @@ static void addCygMingExtraModule(ExecutionEngine &EE, LLVMContext &Context,
   Triple TargetTriple(TargetTripleStr);
 
   // Create a new module.
-  std::unique_ptr<Module> M = make_unique<Module>("CygMingHelper", Context);
+  std::unique_ptr<Module> M = std::make_unique<Module>("CygMingHelper", Context);
   M->setTargetTriple(TargetTripleStr);
 
   // Create an empty function named "__main".
@@ -744,7 +744,7 @@ int runOrcLazyJIT(const char *ProgName) {
   // Start setting up the JIT environment.
 
   // Parse the main module.
-  orc::ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  orc::ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
   SMDiagnostic Err;
   auto MainModule = parseIRFile(InputFile, Err, *TSCtx.getContext());
   if (!MainModule)
@@ -962,6 +962,6 @@ std::unique_ptr<FDRawChannel> launchRemote() {
   close(PipeFD[1][1]);
 
   // Return an RPC channel connected to our end of the pipes.
-  return llvm::make_unique<FDRawChannel>(PipeFD[1][0], PipeFD[0][1]);
+  return std::make_unique<FDRawChannel>(PipeFD[1][0], PipeFD[0][1]);
 #endif
 }
index f707e3c7ab53533ee9dff7d4baf62653df15a28b..7151cfb032f3d1567e64deb52847b483f5b7c32c 100644 (file)
@@ -712,15 +712,15 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
 
     // Create the function filters
     if (!NameFilters.empty() || NameWhitelist || !NameRegexFilters.empty()) {
-      auto NameFilterer = llvm::make_unique<CoverageFilters>();
+      auto NameFilterer = std::make_unique<CoverageFilters>();
       for (const auto &Name : NameFilters)
-        NameFilterer->push_back(llvm::make_unique<NameCoverageFilter>(Name));
+        NameFilterer->push_back(std::make_unique<NameCoverageFilter>(Name));
       if (NameWhitelist)
         NameFilterer->push_back(
-            llvm::make_unique<NameWhitelistCoverageFilter>(*NameWhitelist));
+            std::make_unique<NameWhitelistCoverageFilter>(*NameWhitelist));
       for (const auto &Regex : NameRegexFilters)
         NameFilterer->push_back(
-            llvm::make_unique<NameRegexCoverageFilter>(Regex));
+            std::make_unique<NameRegexCoverageFilter>(Regex));
       Filters.push_back(std::move(NameFilterer));
     }
 
@@ -728,18 +728,18 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
         RegionCoverageGtFilter.getNumOccurrences() ||
         LineCoverageLtFilter.getNumOccurrences() ||
         LineCoverageGtFilter.getNumOccurrences()) {
-      auto StatFilterer = llvm::make_unique<CoverageFilters>();
+      auto StatFilterer = std::make_unique<CoverageFilters>();
       if (RegionCoverageLtFilter.getNumOccurrences())
-        StatFilterer->push_back(llvm::make_unique<RegionCoverageFilter>(
+        StatFilterer->push_back(std::make_unique<RegionCoverageFilter>(
             RegionCoverageFilter::LessThan, RegionCoverageLtFilter));
       if (RegionCoverageGtFilter.getNumOccurrences())
-        StatFilterer->push_back(llvm::make_unique<RegionCoverageFilter>(
+        StatFilterer->push_back(std::make_unique<RegionCoverageFilter>(
             RegionCoverageFilter::GreaterThan, RegionCoverageGtFilter));
       if (LineCoverageLtFilter.getNumOccurrences())
-        StatFilterer->push_back(llvm::make_unique<LineCoverageFilter>(
+        StatFilterer->push_back(std::make_unique<LineCoverageFilter>(
             LineCoverageFilter::LessThan, LineCoverageLtFilter));
       if (LineCoverageGtFilter.getNumOccurrences())
-        StatFilterer->push_back(llvm::make_unique<LineCoverageFilter>(
+        StatFilterer->push_back(std::make_unique<LineCoverageFilter>(
             RegionCoverageFilter::GreaterThan, LineCoverageGtFilter));
       Filters.push_back(std::move(StatFilterer));
     }
@@ -747,7 +747,7 @@ int CodeCoverageTool::run(Command Cmd, int argc, const char **argv) {
     // Create the ignore filename filters.
     for (const auto &RE : IgnoreFilenameRegexFilters)
       IgnoreFilenameFilters.push_back(
-          llvm::make_unique<NameRegexCoverageFilter>(RE));
+          std::make_unique<NameRegexCoverageFilter>(RE));
 
     if (!Arches.empty()) {
       for (const std::string &Arch : Arches) {
@@ -1040,7 +1040,7 @@ int CodeCoverageTool::doExport(int argc, const char **argv,
 
   switch (ViewOpts.Format) {
   case CoverageViewOptions::OutputFormat::Text:
-    Exporter = llvm::make_unique<CoverageExporterJson>(*Coverage.get(),
+    Exporter = std::make_unique<CoverageExporterJson>(*Coverage.get(),
                                                        ViewOpts, outs());
     break;
   case CoverageViewOptions::OutputFormat::HTML:
@@ -1048,7 +1048,7 @@ int CodeCoverageTool::doExport(int argc, const char **argv,
     // above.
     llvm_unreachable("Export in HTML is not supported!");
   case CoverageViewOptions::OutputFormat::Lcov:
-    Exporter = llvm::make_unique<CoverageExporterLcov>(*Coverage.get(),
+    Exporter = std::make_unique<CoverageExporterLcov>(*Coverage.get(),
                                                        ViewOpts, outs());
     break;
   }
index 616f667e2c8440c1acb3ce1f799c876b1d32ba57..0e20ea63cd6ff7ae4447a327f081ecc97c080576 100644 (file)
@@ -76,9 +76,9 @@ std::unique_ptr<CoveragePrinter>
 CoveragePrinter::create(const CoverageViewOptions &Opts) {
   switch (Opts.Format) {
   case CoverageViewOptions::OutputFormat::Text:
-    return llvm::make_unique<CoveragePrinterText>(Opts);
+    return std::make_unique<CoveragePrinterText>(Opts);
   case CoverageViewOptions::OutputFormat::HTML:
-    return llvm::make_unique<CoveragePrinterHTML>(Opts);
+    return std::make_unique<CoveragePrinterHTML>(Opts);
   case CoverageViewOptions::OutputFormat::Lcov:
     // Unreachable because CodeCoverage.cpp should terminate with an error
     // before we get here.
@@ -141,10 +141,10 @@ SourceCoverageView::create(StringRef SourceName, const MemoryBuffer &File,
                            CoverageData &&CoverageInfo) {
   switch (Options.Format) {
   case CoverageViewOptions::OutputFormat::Text:
-    return llvm::make_unique<SourceCoverageViewText>(
+    return std::make_unique<SourceCoverageViewText>(
         SourceName, File, Options, std::move(CoverageInfo));
   case CoverageViewOptions::OutputFormat::HTML:
-    return llvm::make_unique<SourceCoverageViewHTML>(
+    return std::make_unique<SourceCoverageViewHTML>(
         SourceName, File, Options, std::move(CoverageInfo));
   case CoverageViewOptions::OutputFormat::Lcov:
     // Unreachable because CodeCoverage.cpp should terminate with an error
index 1db498f035f9b4b7c4463d9afcc927415d0d9016..ae3295171d1c38ee0dd85b141533107b21e8b0d7 100644 (file)
@@ -153,7 +153,7 @@ int main(int argc, char **argv) {
 
   LLVMContext Context;
   Context.setDiagnosticHandler(
-      llvm::make_unique<LLVMDisDiagnosticHandler>(argv[0]));
+      std::make_unique<LLVMDisDiagnosticHandler>(argv[0]));
   cl::ParseCommandLineOptions(argc, argv, "llvm .bc -> .ll disassembler\n");
 
   std::unique_ptr<MemoryBuffer> MB =
index a41fc19f56c5df3aa2e827fd66c834e4c6bdc578..b886a8dff2566562cf184e2faa9a70ca17d3156d 100644 (file)
@@ -292,7 +292,7 @@ buildStub(const ELFObjectFile<ELFT> &ElfObj) {
   using Elf_Phdr_Range = typename ELFT::PhdrRange;
   using Elf_Sym_Range = typename ELFT::SymRange;
   using Elf_Sym = typename ELFT::Sym;
-  std::unique_ptr<ELFStub> DestStub = make_unique<ELFStub>();
+  std::unique_ptr<ELFStub> DestStub = std::make_unique<ELFStub>();
   const ELFFile<ELFT> *ElfFile = ElfObj.getELFFile();
   // Fetch .dynamic table.
   Expected<Elf_Dyn_Range> DynTable = ElfFile->dynamicEntries();
index 53b2005d0db978e63914ec3fa6a319749f605330..eb8320e06bbc555fc5554d7ec9c56883b9ff588e 100644 (file)
@@ -178,7 +178,7 @@ Analysis::Analysis(const llvm::Target &Target,
       llvm::Triple(FirstPoint.LLVMTriple), 0 /*default variant*/, *AsmInfo_,
       *InstrInfo_, *RegInfo_));
 
-  Context_ = llvm::make_unique<llvm::MCContext>(AsmInfo_.get(), RegInfo_.get(),
+  Context_ = std::make_unique<llvm::MCContext>(AsmInfo_.get(), RegInfo_.get(),
                                                 &ObjectFileInfo_);
   Disasm_.reset(Target.createMCDisassembler(*SubtargetInfo_, *Context_));
   assert(Disasm_ && "cannot create MCDisassembler. missing call to "
index 437fe892603e1ab09968ab7a33a299cab954b9db..9695c79b57ae2a175df64f7364643205a421774b 100644 (file)
@@ -131,20 +131,20 @@ static void fillMachineFunction(llvm::MachineFunction &MF,
 static std::unique_ptr<llvm::Module>
 createModule(const std::unique_ptr<llvm::LLVMContext> &Context,
              const llvm::DataLayout DL) {
-  auto Module = llvm::make_unique<llvm::Module>(ModuleID, *Context);
+  auto Module = std::make_unique<llvm::Module>(ModuleID, *Context);
   Module->setDataLayout(DL);
   return Module;
 }
 
 llvm::BitVector getFunctionReservedRegs(const llvm::TargetMachine &TM) {
   std::unique_ptr<llvm::LLVMContext> Context =
-      llvm::make_unique<llvm::LLVMContext>();
+      std::make_unique<llvm::LLVMContext>();
   std::unique_ptr<llvm::Module> Module =
       createModule(Context, TM.createDataLayout());
   // TODO: This only works for targets implementing LLVMTargetMachine.
   const LLVMTargetMachine &LLVMTM = static_cast<const LLVMTargetMachine&>(TM);
   std::unique_ptr<llvm::MachineModuleInfo> MMI =
-      llvm::make_unique<llvm::MachineModuleInfo>(&LLVMTM);
+      std::make_unique<llvm::MachineModuleInfo>(&LLVMTM);
   llvm::MachineFunction &MF =
       createVoidVoidPtrMachineFunction(FunctionID, Module.get(), MMI.get());
   // Saving reserved registers for client.
@@ -158,11 +158,11 @@ void assembleToStream(const ExegesisTarget &ET,
                       llvm::ArrayRef<llvm::MCInst> Instructions,
                       llvm::raw_pwrite_stream &AsmStream) {
   std::unique_ptr<llvm::LLVMContext> Context =
-      llvm::make_unique<llvm::LLVMContext>();
+      std::make_unique<llvm::LLVMContext>();
   std::unique_ptr<llvm::Module> Module =
       createModule(Context, TM->createDataLayout());
   std::unique_ptr<llvm::MachineModuleInfo> MMI =
-      llvm::make_unique<llvm::MachineModuleInfo>(TM.get());
+      std::make_unique<llvm::MachineModuleInfo>(TM.get());
   llvm::MachineFunction &MF =
       createVoidVoidPtrMachineFunction(FunctionID, Module.get(), MMI.get());
 
@@ -268,7 +268,7 @@ private:
 ExecutableFunction::ExecutableFunction(
     std::unique_ptr<llvm::LLVMTargetMachine> TM,
     llvm::object::OwningBinary<llvm::object::ObjectFile> &&ObjectFileHolder)
-    : Context(llvm::make_unique<llvm::LLVMContext>()) {
+    : Context(std::make_unique<llvm::LLVMContext>()) {
   assert(ObjectFileHolder.getBinary() && "cannot create object file");
   // Initializing the execution engine.
   // We need to use the JIT EngineKind to be able to add an object file.
@@ -281,7 +281,7 @@ ExecutableFunction::ExecutableFunction(
           .setMCPU(TM->getTargetCPU())
           .setEngineKind(llvm::EngineKind::JIT)
           .setMCJITMemoryManager(
-              llvm::make_unique<TrackingSectionMemoryManager>(&CodeSize))
+              std::make_unique<TrackingSectionMemoryManager>(&CodeSize))
           .create(TM.release()));
   if (!ExecEngine)
     llvm::report_fatal_error(Error);
index 1f0ca6f8bf5e91c23b9b1be2df52a42b7e5c7498..38abf3eefa3e18e37e2fd2ac23ffc12d05511513 100644 (file)
@@ -29,7 +29,7 @@ BenchmarkFailure::BenchmarkFailure(const llvm::Twine &S)
 
 BenchmarkRunner::BenchmarkRunner(const LLVMState &State,
                                  InstructionBenchmark::ModeE Mode)
-    : State(State), Mode(Mode), Scratch(llvm::make_unique<ScratchSpace>()) {}
+    : State(State), Mode(Mode), Scratch(std::make_unique<ScratchSpace>()) {}
 
 BenchmarkRunner::~BenchmarkRunner() = default;
 
index 395c0f8e32dbd394505325e009e0e73a77ec1be1..29e98619301aec8ea299d5053b4990b0a558aae1 100644 (file)
@@ -53,7 +53,7 @@ public:
     static constexpr const size_t kAlignment = 1024;
     static constexpr const size_t kSize = 1 << 20; // 1MB.
     ScratchSpace()
-        : UnalignedPtr(llvm::make_unique<char[]>(kSize + kAlignment)),
+        : UnalignedPtr(std::make_unique<char[]>(kSize + kAlignment)),
           AlignedPtr(
               UnalignedPtr.get() + kAlignment -
               (reinterpret_cast<intptr_t>(UnalignedPtr.get()) % kAlignment)) {}
index 945aabb8a3f635efe2e2b4077d2817aeaae7f5d6..a5ba24c20f29d1ef6f7fb63af89c91fd302e78cb 100644 (file)
@@ -68,22 +68,22 @@ ExegesisTarget::createBenchmarkRunner(InstructionBenchmark::ModeE Mode,
 
 std::unique_ptr<SnippetGenerator>
 ExegesisTarget::createLatencySnippetGenerator(const LLVMState &State) const {
-  return llvm::make_unique<LatencySnippetGenerator>(State);
+  return std::make_unique<LatencySnippetGenerator>(State);
 }
 
 std::unique_ptr<SnippetGenerator>
 ExegesisTarget::createUopsSnippetGenerator(const LLVMState &State) const {
-  return llvm::make_unique<UopsSnippetGenerator>(State);
+  return std::make_unique<UopsSnippetGenerator>(State);
 }
 
 std::unique_ptr<BenchmarkRunner> ExegesisTarget::createLatencyBenchmarkRunner(
     const LLVMState &State, InstructionBenchmark::ModeE Mode) const {
-  return llvm::make_unique<LatencyBenchmarkRunner>(State, Mode);
+  return std::make_unique<LatencyBenchmarkRunner>(State, Mode);
 }
 
 std::unique_ptr<BenchmarkRunner>
 ExegesisTarget::createUopsBenchmarkRunner(const LLVMState &State) const {
-  return llvm::make_unique<UopsBenchmarkRunner>(State);
+  return std::make_unique<UopsBenchmarkRunner>(State);
 }
 
 void ExegesisTarget::randomizeMCOperand(
index 21d424a4beeecc1452b7f236eb0a3fac39695859..cebcb1c1aea411e737cb1179396bd68dbf52240f 100644 (file)
@@ -453,12 +453,12 @@ private:
 
   std::unique_ptr<SnippetGenerator>
   createLatencySnippetGenerator(const LLVMState &State) const override {
-    return llvm::make_unique<X86LatencySnippetGenerator>(State);
+    return std::make_unique<X86LatencySnippetGenerator>(State);
   }
 
   std::unique_ptr<SnippetGenerator>
   createUopsSnippetGenerator(const LLVMState &State) const override {
-    return llvm::make_unique<X86UopsSnippetGenerator>(State);
+    return std::make_unique<X86UopsSnippetGenerator>(State);
   }
 
   bool matchesArch(llvm::Triple::ArchType Arch) const override {
index a348ab300d19d121f589aa74ef1c97fdd3a1b07b..a27f1147a4a2e9f2d94d04f672b09cfb9ea95270 100644 (file)
@@ -59,7 +59,7 @@ std::unique_ptr<IRMutator> createISelMutator() {
       new InjectorIRStrategy(InjectorIRStrategy::getDefaultOps()));
   Strategies.emplace_back(new InstDeleterIRStrategy());
 
-  return llvm::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
+  return std::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
 }
 
 extern "C" LLVM_ATTRIBUTE_USED size_t LLVMFuzzerCustomMutator(
index 79c185a926e34cc88925b82f84b37c8cb93169fd..1e449153ad84e18576181f03038578d3eb8407bd 100644 (file)
@@ -233,10 +233,10 @@ Session::Session(Triple TT) : ObjLayer(ES, MemMgr), TT(std::move(TT)) {
   };
 
   if (!NoExec && !TT.isOSWindows())
-    ObjLayer.addPlugin(llvm::make_unique<EHFrameRegistrationPlugin>(
+    ObjLayer.addPlugin(std::make_unique<EHFrameRegistrationPlugin>(
         InProcessEHFrameRegistrar::getInstance()));
 
-  ObjLayer.addPlugin(llvm::make_unique<JITLinkSessionPlugin>(*this));
+  ObjLayer.addPlugin(std::make_unique<JITLinkSessionPlugin>(*this));
 }
 
 void Session::dumpSessionInfo(raw_ostream &OS) {
@@ -589,7 +589,7 @@ Expected<int> runEntryPoint(Session &S, JITEvaluatedSymbol EntryPoint) {
   assert(EntryPoint.getAddress() && "Entry point address should not be null");
 
   constexpr const char *JITProgramName = "<llvm-jitlink jit'd code>";
-  auto PNStorage = llvm::make_unique<char[]>(strlen(JITProgramName) + 1);
+  auto PNStorage = std::make_unique<char[]>(strlen(JITProgramName) + 1);
   strcpy(PNStorage.get(), JITProgramName);
 
   std::vector<const char *> EntryPointArgs;
index 46d9d5d7292566252c62bc6ff8ac9a5ca6357be3..fa36e083b6f8c4246b74d81fc08b7a0610bbb6c4 100644 (file)
@@ -351,13 +351,13 @@ int main(int argc, char **argv) {
 
   LLVMContext Context;
   Context.setDiagnosticHandler(
-    llvm::make_unique<LLVMLinkDiagnosticHandler>(), true);
+    std::make_unique<LLVMLinkDiagnosticHandler>(), true);
   cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
 
   if (!DisableDITypeMap)
     Context.enableDebugTypeODRUniquing();
 
-  auto Composite = make_unique<Module>("llvm-link", Context);
+  auto Composite = std::make_unique<Module>("llvm-link", Context);
   Linker L(*Composite);
 
   unsigned Flags = Linker::Flags::None;
index eb3448e74e6fbfa26f395fe3077636857ecb5bc0..b47e68e82850c6cc715e2d6d213cc14a1621d082 100644 (file)
@@ -315,8 +315,8 @@ getLocalLTOModule(StringRef Path, std::unique_ptr<MemoryBuffer> &Buffer,
   error(BufferOrErr, "error loading file '" + Path + "'");
   Buffer = std::move(BufferOrErr.get());
   CurrentActivity = ("loading file '" + Path + "'").str();
-  std::unique_ptr<LLVMContext> Context = llvm::make_unique<LLVMContext>();
-  Context->setDiagnosticHandler(llvm::make_unique<LLVMLTODiagnosticHandler>(),
+  std::unique_ptr<LLVMContext> Context = std::make_unique<LLVMContext>();
+  Context->setDiagnosticHandler(std::make_unique<LLVMLTODiagnosticHandler>(),
                                 true);
   ErrorOr<std::unique_ptr<LTOModule>> Ret = LTOModule::createInLocalContext(
       std::move(Context), Buffer->getBufferStart(), Buffer->getBufferSize(),
@@ -921,7 +921,7 @@ int main(int argc, char **argv) {
   unsigned BaseArg = 0;
 
   LLVMContext Context;
-  Context.setDiagnosticHandler(llvm::make_unique<LLVMLTODiagnosticHandler>(),
+  Context.setDiagnosticHandler(std::make_unique<LLVMLTODiagnosticHandler>(),
                                true);
 
   LTOCodeGenerator CodeGen(Context);
index 91e2a4443267264a2c480ee343ce867a384e06bf..5e3b3dcb6c31065e443527ee5ccbd9f4acb7671c 100644 (file)
@@ -333,9 +333,9 @@ static int run(int argc, char **argv) {
     std::string Path = OutputFilename + "." + utostr(Task);
 
     std::error_code EC;
-    auto S = llvm::make_unique<raw_fd_ostream>(Path, EC, sys::fs::OF_None);
+    auto S = std::make_unique<raw_fd_ostream>(Path, EC, sys::fs::OF_None);
     check(EC, Path);
-    return llvm::make_unique<lto::NativeObjectStream>(std::move(S));
+    return std::make_unique<lto::NativeObjectStream>(std::move(S));
   };
 
   auto AddBuffer = [&](size_t Task, std::unique_ptr<MemoryBuffer> MB) {
index a996d496a99ced70fe660af35ef9f6bbd10be1d4..d59229e6496cdcee1ec9eee6ee13f42ec9b6b63f 100644 (file)
@@ -197,7 +197,7 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) {
 
   std::string OutputString;
   raw_string_ostream Out(OutputString);
-  auto FOut = llvm::make_unique<formatted_raw_ostream>(Out);
+  auto FOut = std::make_unique<formatted_raw_ostream>(Out);
 
   std::unique_ptr<MCStreamer> Str;
 
@@ -211,7 +211,7 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) {
     std::error_code EC;
     const std::string OutputFilename = "-";
     auto Out =
-        llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
+        std::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
     if (EC) {
       errs() << EC.message() << '\n';
       abort();
@@ -223,7 +223,7 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) {
     std::unique_ptr<buffer_ostream> BOS;
     raw_pwrite_stream *OS = &Out->os();
     if (!Out->os().supportsSeeking()) {
-      BOS = make_unique<buffer_ostream>(Out->os());
+      BOS = std::make_unique<buffer_ostream>(Out->os());
       OS = BOS.get();
     }
 
index ac6b464ab0716eff8177485787a2ff58269a9e58..832c46683b8ccbd3c750adf08112ed20dadae0c1 100644 (file)
@@ -211,7 +211,7 @@ static const Target *GetTarget(const char *ProgName) {
 
 static std::unique_ptr<ToolOutputFile> GetOutputStream(StringRef Path) {
   std::error_code EC;
-  auto Out = llvm::make_unique<ToolOutputFile>(Path, EC, sys::fs::OF_None);
+  auto Out = std::make_unique<ToolOutputFile>(Path, EC, sys::fs::OF_None);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
     return nullptr;
@@ -459,7 +459,7 @@ int main(int argc, char **argv) {
 
     std::unique_ptr<MCAsmBackend> MAB(
         TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions));
-    auto FOut = llvm::make_unique<formatted_raw_ostream>(*OS);
+    auto FOut = std::make_unique<formatted_raw_ostream>(*OS);
     Str.reset(
         TheTarget->createAsmStreamer(Ctx, std::move(FOut), /*asmverbose*/ true,
                                      /*useDwarfDirectory*/ true, IP,
@@ -474,7 +474,7 @@ int main(int argc, char **argv) {
     Ctx.setUseNamesOnTempLabels(false);
 
     if (!Out->os().supportsSeeking()) {
-      BOS = make_unique<buffer_ostream>(Out->os());
+      BOS = std::make_unique<buffer_ostream>(Out->os());
       OS = BOS.get();
     }
 
index bf592f67245ec83dc97c85d3447b6d4aa69a3bc6..e05517c1ac95bc801813f93398a4e1508e52e8de 100644 (file)
@@ -18,7 +18,7 @@ namespace mca {
 
 CodeRegions::CodeRegions(llvm::SourceMgr &S) : SM(S), FoundErrors(false) {
   // Create a default region for the input code sequence.
-  Regions.emplace_back(make_unique<CodeRegion>("", SMLoc()));
+  Regions.emplace_back(std::make_unique<CodeRegion>("", SMLoc()));
 }
 
 bool CodeRegion::isLocInRange(SMLoc Loc) const {
@@ -36,7 +36,7 @@ void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
     if (Regions.size() == 1 && !Regions[0]->startLoc().isValid() &&
         !Regions[0]->endLoc().isValid()) {
       ActiveRegions[Description] = 0;
-      Regions[0] = make_unique<CodeRegion>(Description, Loc);
+      Regions[0] = std::make_unique<CodeRegion>(Description, Loc);
       return;
     }
   } else {
@@ -62,7 +62,7 @@ void CodeRegions::beginRegion(StringRef Description, SMLoc Loc) {
   }
 
   ActiveRegions[Description] = Regions.size();
-  Regions.emplace_back(make_unique<CodeRegion>(Description, Loc));
+  Regions.emplace_back(std::make_unique<CodeRegion>(Description, Loc));
   return;
 }
 
index 1bcf850193e6a639fa24f6e3ae3f1bbafebc2dd5..dde42c117300b7a3c21636bd3d3414b6d9692511 100644 (file)
@@ -233,7 +233,7 @@ ErrorOr<std::unique_ptr<ToolOutputFile>> getOutputStream() {
     OutputFilename = "-";
   std::error_code EC;
   auto Out =
-      llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
+      std::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
   if (!EC)
     return std::move(Out);
   return EC;
@@ -485,18 +485,18 @@ int main(int argc, char **argv) {
 
     if (PrintInstructionTables) {
       //  Create a pipeline, stages, and a printer.
-      auto P = llvm::make_unique<mca::Pipeline>();
-      P->appendStage(llvm::make_unique<mca::EntryStage>(S));
-      P->appendStage(llvm::make_unique<mca::InstructionTables>(SM));
+      auto P = std::make_unique<mca::Pipeline>();
+      P->appendStage(std::make_unique<mca::EntryStage>(S));
+      P->appendStage(std::make_unique<mca::InstructionTables>(SM));
       mca::PipelinePrinter Printer(*P);
 
       // Create the views for this pipeline, execute, and emit a report.
       if (PrintInstructionInfoView) {
-        Printer.addView(llvm::make_unique<mca::InstructionInfoView>(
+        Printer.addView(std::make_unique<mca::InstructionInfoView>(
             *STI, *MCII, CE, ShowEncoding, Insts, *IP));
       }
       Printer.addView(
-          llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
+          std::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
 
       if (!runPipeline(*P))
         return 1;
@@ -511,37 +511,37 @@ int main(int argc, char **argv) {
 
     if (PrintSummaryView)
       Printer.addView(
-          llvm::make_unique<mca::SummaryView>(SM, Insts, DispatchWidth));
+          std::make_unique<mca::SummaryView>(SM, Insts, DispatchWidth));
 
     if (EnableBottleneckAnalysis) {
-      Printer.addView(llvm::make_unique<mca::BottleneckAnalysis>(
+      Printer.addView(std::make_unique<mca::BottleneckAnalysis>(
           *STI, *IP, Insts, S.getNumIterations()));
     }
 
     if (PrintInstructionInfoView)
-      Printer.addView(llvm::make_unique<mca::InstructionInfoView>(
+      Printer.addView(std::make_unique<mca::InstructionInfoView>(
           *STI, *MCII, CE, ShowEncoding, Insts, *IP));
 
     if (PrintDispatchStats)
-      Printer.addView(llvm::make_unique<mca::DispatchStatistics>());
+      Printer.addView(std::make_unique<mca::DispatchStatistics>());
 
     if (PrintSchedulerStats)
-      Printer.addView(llvm::make_unique<mca::SchedulerStatistics>(*STI));
+      Printer.addView(std::make_unique<mca::SchedulerStatistics>(*STI));
 
     if (PrintRetireStats)
-      Printer.addView(llvm::make_unique<mca::RetireControlUnitStatistics>(SM));
+      Printer.addView(std::make_unique<mca::RetireControlUnitStatistics>(SM));
 
     if (PrintRegisterFileStats)
-      Printer.addView(llvm::make_unique<mca::RegisterFileStatistics>(*STI));
+      Printer.addView(std::make_unique<mca::RegisterFileStatistics>(*STI));
 
     if (PrintResourcePressureView)
       Printer.addView(
-          llvm::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
+          std::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts));
 
     if (PrintTimelineView) {
       unsigned TimelineIterations =
           TimelineMaxIterations ? TimelineMaxIterations : 10;
-      Printer.addView(llvm::make_unique<mca::TimelineView>(
+      Printer.addView(std::make_unique<mca::TimelineView>(
           *STI, *IP, Insts, std::min(TimelineIterations, S.getNumIterations()),
           TimelineMaxCycles));
     }
index 1f0ec9fa9691b9dad636d9bfd3225dd5df8a4833..a2681be7192284f257d7bf7af02b4ea1fb2d5e3f 100644 (file)
@@ -196,7 +196,7 @@ Error COFFReader::setSymbolTargets(Object &Obj) const {
 }
 
 Expected<std::unique_ptr<Object>> COFFReader::create() const {
-  auto Obj = llvm::make_unique<Object>();
+  auto Obj = std::make_unique<Object>();
 
   const coff_file_header *CFH = nullptr;
   const coff_bigobj_file_header *CBFH = nullptr;
index bbaac96f070bd565c6df2afb6d0a792b368ef61c..da814759bf60332e73ff6ff57517418f931fbaed 100644 (file)
@@ -136,16 +136,16 @@ static std::unique_ptr<Writer> createELFWriter(const CopyConfig &Config,
   // Depending on the initial ELFT and OutputFormat we need a different Writer.
   switch (OutputElfType) {
   case ELFT_ELF32LE:
-    return llvm::make_unique<ELFWriter<ELF32LE>>(Obj, Buf,
+    return std::make_unique<ELFWriter<ELF32LE>>(Obj, Buf,
                                                  !Config.StripSections);
   case ELFT_ELF64LE:
-    return llvm::make_unique<ELFWriter<ELF64LE>>(Obj, Buf,
+    return std::make_unique<ELFWriter<ELF64LE>>(Obj, Buf,
                                                  !Config.StripSections);
   case ELFT_ELF32BE:
-    return llvm::make_unique<ELFWriter<ELF32BE>>(Obj, Buf,
+    return std::make_unique<ELFWriter<ELF32BE>>(Obj, Buf,
                                                  !Config.StripSections);
   case ELFT_ELF64BE:
-    return llvm::make_unique<ELFWriter<ELF64BE>>(Obj, Buf,
+    return std::make_unique<ELFWriter<ELF64BE>>(Obj, Buf,
                                                  !Config.StripSections);
   }
   llvm_unreachable("Invalid output format");
@@ -156,9 +156,9 @@ static std::unique_ptr<Writer> createWriter(const CopyConfig &Config,
                                             ElfType OutputElfType) {
   switch (Config.OutputFormat) {
   case FileFormat::Binary:
-    return llvm::make_unique<BinaryWriter>(Obj, Buf);
+    return std::make_unique<BinaryWriter>(Obj, Buf);
   case FileFormat::IHex:
-    return llvm::make_unique<IHexWriter>(Obj, Buf);
+    return std::make_unique<IHexWriter>(Obj, Buf);
   default:
     return createELFWriter(Config, Obj, Buf, OutputElfType);
   }
index 2d85b3ad36f8fc4d788e7ba54996eebf5c0a1004..2862af1c09aeeb93915a64819917c3a976b7c5bb 100644 (file)
@@ -665,7 +665,7 @@ void SymbolTableSection::addSymbol(Twine Name, uint8_t Bind, uint8_t Type,
   Sym.Visibility = Visibility;
   Sym.Size = SymbolSize;
   Sym.Index = Symbols.size();
-  Symbols.emplace_back(llvm::make_unique<Symbol>(Sym));
+  Symbols.emplace_back(std::make_unique<Symbol>(Sym));
   Size += this->EntrySize;
 }
 
@@ -1645,7 +1645,7 @@ std::unique_ptr<Object> IHexReader::create() const {
 }
 
 std::unique_ptr<Object> ELFReader::create() const {
-  auto Obj = llvm::make_unique<Object>();
+  auto Obj = std::make_unique<Object>();
   if (auto *O = dyn_cast<ELFObjectFile<ELF32LE>>(Bin)) {
     ELFBuilder<ELF32LE> Builder(*O, *Obj, ExtractPartition);
     Builder.build();
@@ -2076,7 +2076,7 @@ template <class ELFT> Error ELFWriter<ELFT>::finalize() {
   // Also, the output arch may not be the same as the input arch, so fix up
   // size-related fields before doing layout calculations.
   uint64_t Index = 0;
-  auto SecSizer = llvm::make_unique<ELFSectionSizer<ELFT>>();
+  auto SecSizer = std::make_unique<ELFSectionSizer<ELFT>>();
   for (auto &Sec : Obj.sections()) {
     Sec.Index = Index++;
     Sec.accept(*SecSizer);
@@ -2114,7 +2114,7 @@ template <class ELFT> Error ELFWriter<ELFT>::finalize() {
 
   if (Error E = Buf.allocate(totalSize()))
     return E;
-  SecWriter = llvm::make_unique<ELFSectionWriter<ELFT>>(Buf);
+  SecWriter = std::make_unique<ELFSectionWriter<ELFT>>(Buf);
   return Error::success();
 }
 
@@ -2200,7 +2200,7 @@ Error BinaryWriter::finalize() {
 
   if (Error E = Buf.allocate(TotalSize))
     return E;
-  SecWriter = llvm::make_unique<BinarySectionWriter>(Buf);
+  SecWriter = std::make_unique<BinarySectionWriter>(Buf);
   return Error::success();
 }
 
index 3b4f3c7a0d722443e6b1630848d5a5e9d72a23a4..42d254c1b2b9c36ba7cbcaf5884553e8b835abf9 100644 (file)
@@ -884,7 +884,7 @@ protected:
 
 public:
   BasicELFBuilder(uint16_t EM)
-      : EMachine(EM), Obj(llvm::make_unique<Object>()) {}
+      : EMachine(EM), Obj(std::make_unique<Object>()) {}
 };
 
 class BinaryELFBuilder : public BasicELFBuilder {
@@ -1042,7 +1042,7 @@ public:
                        std::function<bool(const SectionBase &)> ToRemove);
   Error removeSymbols(function_ref<bool(const Symbol &)> ToRemove);
   template <class T, class... Ts> T &addSection(Ts &&... Args) {
-    auto Sec = llvm::make_unique<T>(std::forward<Ts>(Args)...);
+    auto Sec = std::make_unique<T>(std::forward<Ts>(Args)...);
     auto Ptr = Sec.get();
     MustBeRelocatable |= isa<RelocationSection>(*Ptr);
     Sections.emplace_back(std::move(Sec));
@@ -1050,7 +1050,7 @@ public:
     return *Ptr;
   }
   Segment &addSegment(ArrayRef<uint8_t> Data) {
-    Segments.emplace_back(llvm::make_unique<Segment>(Data));
+    Segments.emplace_back(std::make_unique<Segment>(Data));
     return *Segments.back();
   }
   bool isRelocatable() const {
index d31293034608540ed67df0292b787e39a99b1a4e..23dde7de53d53f9b0c95ad6885170e068c661d18 100644 (file)
@@ -188,7 +188,7 @@ void MachOReader::readSymbolTable(Object &O) const {
                    StrTable,
                    MachOObj.getSymbolTableEntry(Symbol.getRawDataRefImpl())));
 
-    O.SymTable.Symbols.push_back(llvm::make_unique<SymbolEntry>(SE));
+    O.SymTable.Symbols.push_back(std::make_unique<SymbolEntry>(SE));
   }
 }
 
@@ -223,7 +223,7 @@ void MachOReader::readExportInfo(Object &O) const {
 }
 
 std::unique_ptr<Object> MachOReader::create() const {
-  auto Obj = llvm::make_unique<Object>();
+  auto Obj = std::make_unique<Object>();
   readHeader(*Obj);
   readLoadCommands(*Obj);
   readSymbolTable(*Obj);
index c4fa6b5c2a2ae479b766cb3d6274d72cb107758c..e91808b276b3258e1d6fff036b9b12a82f82383e 100644 (file)
@@ -3131,7 +3131,7 @@ static void method_reference(struct DisassembleInfo *info,
     if (strcmp(*ReferenceName, "_objc_msgSend") == 0) {
       if (info->selector_name != nullptr) {
         if (info->class_name != nullptr) {
-          info->method = llvm::make_unique<char[]>(
+          info->method = std::make_unique<char[]>(
               5 + strlen(info->class_name) + strlen(info->selector_name));
           char *method = info->method.get();
           if (method != nullptr) {
@@ -3145,7 +3145,7 @@ static void method_reference(struct DisassembleInfo *info,
           }
         } else {
           info->method =
-              llvm::make_unique<char[]>(9 + strlen(info->selector_name));
+              std::make_unique<char[]>(9 + strlen(info->selector_name));
           char *method = info->method.get();
           if (method != nullptr) {
             if (Arch == Triple::x86_64)
@@ -3165,7 +3165,7 @@ static void method_reference(struct DisassembleInfo *info,
     } else if (strcmp(*ReferenceName, "_objc_msgSendSuper2") == 0) {
       if (info->selector_name != nullptr) {
         info->method =
-            llvm::make_unique<char[]>(17 + strlen(info->selector_name));
+            std::make_unique<char[]>(17 + strlen(info->selector_name));
         char *method = info->method.get();
         if (method != nullptr) {
           if (Arch == Triple::x86_64)
@@ -10411,7 +10411,7 @@ void printMachOWeakBindTable(object::MachOObjectFile *Obj) {
 static const char *get_dyld_bind_info_symbolname(uint64_t ReferenceValue,
                                                  struct DisassembleInfo *info) {
   if (info->bindtable == nullptr) {
-    info->bindtable = llvm::make_unique<SymbolAddressMap>();
+    info->bindtable = std::make_unique<SymbolAddressMap>();
     Error Err = Error::success();
     for (const object::MachOBindEntry &Entry : info->O->bindTable(Err)) {
       uint64_t Address = Entry.address();
index 6567aaebd6c3913bb5267719e6273e9db0761d5b..02c113d117bd1aa482f7a6701020a98b8b82be4a 100644 (file)
@@ -41,12 +41,12 @@ std::unique_ptr<IRMutator> createOptMutator() {
 
   std::vector<std::unique_ptr<IRMutationStrategy>> Strategies;
   Strategies.push_back(
-      llvm::make_unique<InjectorIRStrategy>(
+      std::make_unique<InjectorIRStrategy>(
           InjectorIRStrategy::getDefaultOps()));
   Strategies.push_back(
-      llvm::make_unique<InstDeleterIRStrategy>());
+      std::make_unique<InstDeleterIRStrategy>());
 
-  return llvm::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
+  return std::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
 }
 
 extern "C" LLVM_ATTRIBUTE_USED size_t LLVMFuzzerCustomMutator(
index 162d12c120b43d1f67245583a0b864c2d5a80929..ffc907e09f11b3619803f16c40c8b99039189611 100644 (file)
@@ -457,7 +457,7 @@ BytesOutputStyle::initializeTypes(uint32_t StreamIdx) {
   uint32_t Count = Tpi->getNumTypeRecords();
   auto Offsets = Tpi->getTypeIndexOffsets();
   TypeCollection =
-      llvm::make_unique<LazyRandomTypeCollection>(Types, Count, Offsets);
+      std::make_unique<LazyRandomTypeCollection>(Types, Count, Offsets);
 
   return *TypeCollection;
 }
index 288e76cc173963d5d60e2de2043c879b87bdb237..4d82e0fd9174c0977851be64edd05cb5a6ab4015 100644 (file)
@@ -1552,7 +1552,7 @@ Error DumpOutputStyle::dumpModuleSymsForObj() {
         Dumper.setSymbolGroup(&Strings);
         for (auto Symbol : Symbols) {
           if (auto EC = Visitor.visitSymbolRecord(Symbol)) {
-            SymbolError = llvm::make_unique<Error>(std::move(EC));
+            SymbolError = std::make_unique<Error>(std::move(EC));
             return;
           }
         }
index 94faa04639817f91864ca84f4d5d0c2006522809..3d2490509c03ef64872758112318e688dcdde061 100644 (file)
@@ -64,7 +64,7 @@ Error ExplainOutputStyle::explainPdbFile() {
 
 Error ExplainOutputStyle::explainBinaryFile() {
   std::unique_ptr<BinaryByteStream> Stream =
-      llvm::make_unique<BinaryByteStream>(File.unknown().getBuffer(),
+      std::make_unique<BinaryByteStream>(File.unknown().getBuffer(),
                                           llvm::support::little);
   switch (opts::explain::InputType) {
   case opts::explain::InputFileType::DBIStream: {
index 8380054b63113bbcb35be16243693e66a1ddab90..b316882de64d36d01d31f21e4fc7adc88a8b1f27 100644 (file)
@@ -385,7 +385,7 @@ InputFile::getOrCreateTypeCollection(TypeCollectionKind Kind) {
     uint32_t Count = Stream.getNumTypeRecords();
     auto Offsets = Stream.getTypeIndexOffsets();
     Collection =
-        llvm::make_unique<LazyRandomTypeCollection>(Array, Count, Offsets);
+        std::make_unique<LazyRandomTypeCollection>(Array, Count, Offsets);
     return *Collection;
   }
 
@@ -398,11 +398,11 @@ InputFile::getOrCreateTypeCollection(TypeCollectionKind Kind) {
     if (!isDebugTSection(Section, Records))
       continue;
 
-    Types = llvm::make_unique<LazyRandomTypeCollection>(Records, 100);
+    Types = std::make_unique<LazyRandomTypeCollection>(Records, 100);
     return *Types;
   }
 
-  Types = llvm::make_unique<LazyRandomTypeCollection>(100);
+  Types = std::make_unique<LazyRandomTypeCollection>(100);
   return *Types;
 }
 
index e8f8e5aa62c9f49e0d3eb29782040500a27f2c3b..2f7a39803ca5ed74b8444da2a83268a237a42206 100644 (file)
@@ -117,7 +117,7 @@ filterAndSortClassDefs(LinePrinter &Printer, Enumerator &E,
       continue;
     }
 
-    auto Layout = llvm::make_unique<ClassLayout>(std::move(Class));
+    auto Layout = std::make_unique<ClassLayout>(std::move(Class));
     if (Layout->deepPaddingSize() < opts::pretty::PaddingThreshold) {
       ++Discarded;
       continue;
@@ -259,7 +259,7 @@ void TypeDumper::start(const PDBSymbolExe &Exe) {
             continue;
           }
 
-          auto Layout = llvm::make_unique<ClassLayout>(std::move(Class));
+          auto Layout = std::make_unique<ClassLayout>(std::move(Class));
           if (Layout->deepPaddingSize() < opts::pretty::PaddingThreshold)
             continue;
 
index 785a980867919abca2ed6153ae2fb078812d5718..9307300861d43f3e4a05ab692fcc67b50cdf15f7 100644 (file)
@@ -863,8 +863,8 @@ static void pdb2Yaml(StringRef Path) {
   std::unique_ptr<IPDBSession> Session;
   auto &File = loadPDB(Path, Session);
 
-  auto O = llvm::make_unique<YAMLOutputStyle>(File);
-  O = llvm::make_unique<YAMLOutputStyle>(File);
+  auto O = std::make_unique<YAMLOutputStyle>(File);
+  O = std::make_unique<YAMLOutputStyle>(File);
 
   ExitOnErr(O->dump());
 }
@@ -872,7 +872,7 @@ static void pdb2Yaml(StringRef Path) {
 static void dumpRaw(StringRef Path) {
   InputFile IF = ExitOnErr(InputFile::open(Path));
 
-  auto O = llvm::make_unique<DumpOutputStyle>(IF);
+  auto O = std::make_unique<DumpOutputStyle>(IF);
   ExitOnErr(O->dump());
 }
 
@@ -880,7 +880,7 @@ static void dumpBytes(StringRef Path) {
   std::unique_ptr<IPDBSession> Session;
   auto &File = loadPDB(Path, Session);
 
-  auto O = llvm::make_unique<BytesOutputStyle>(File);
+  auto O = std::make_unique<BytesOutputStyle>(File);
 
   ExitOnErr(O->dump());
 }
@@ -1347,7 +1347,7 @@ static void explain() {
       ExitOnErr(InputFile::open(opts::explain::InputFilename.front(), true));
 
   for (uint64_t Off : opts::explain::Offsets) {
-    auto O = llvm::make_unique<ExplainOutputStyle>(IF, Off);
+    auto O = std::make_unique<ExplainOutputStyle>(IF, Off);
 
     ExitOnErr(O->dump());
   }
index 926dd1576e605fda4550afe60b38493fe315e506..24ccd950a916d0819588f16c14a49a1d92cb4365 100644 (file)
@@ -136,7 +136,7 @@ public:
     if (!BufOrError)
       exitWithErrorCode(BufOrError.getError(), InputFile);
 
-    auto Remapper = llvm::make_unique<SymbolRemapper>();
+    auto Remapper = std::make_unique<SymbolRemapper>();
     Remapper->File = std::move(BufOrError.get());
 
     for (line_iterator LineIt(*Remapper->File, /*SkipBlanks=*/true, '#');
@@ -328,7 +328,7 @@ static void mergeInstrProfile(const WeightedFileVector &Inputs,
   // Initialize the writer contexts.
   SmallVector<std::unique_ptr<WriterContext>, 4> Contexts;
   for (unsigned I = 0; I < NumThreads; ++I)
-    Contexts.emplace_back(llvm::make_unique<WriterContext>(
+    Contexts.emplace_back(std::make_unique<WriterContext>(
         OutputSparse, ErrorLock, WriterErrorCodes));
 
   if (NumThreads == 1) {
index 56534e7308772653fbe72d8f96759ca384af36c8..36b305645fb815fd46c6fdce3029a865b62429d4 100644 (file)
@@ -428,7 +428,7 @@ RCParser::ParseType RCParser::parseAcceleratorsResource() {
   ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
   RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
 
-  auto Accels = llvm::make_unique<AcceleratorsResource>(
+  auto Accels = std::make_unique<AcceleratorsResource>(
       std::move(*OptStatements), MemoryFlags);
 
   while (!consumeOptionalType(Kind::BlockEnd)) {
@@ -449,7 +449,7 @@ RCParser::ParseType RCParser::parseCursorResource() {
   uint16_t MemoryFlags =
       parseMemoryFlags(CursorResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(Arg, readFilename());
-  return llvm::make_unique<CursorResource>(*Arg, MemoryFlags);
+  return std::make_unique<CursorResource>(*Arg, MemoryFlags);
 }
 
 RCParser::ParseType RCParser::parseDialogResource(bool IsExtended) {
@@ -475,7 +475,7 @@ RCParser::ParseType RCParser::parseDialogResource(bool IsExtended) {
          "parseOptionalStatements, when successful, halts on BlockBegin.");
   consume();
 
-  auto Dialog = llvm::make_unique<DialogResource>(
+  auto Dialog = std::make_unique<DialogResource>(
       (*LocResult)[0], (*LocResult)[1], (*LocResult)[2], (*LocResult)[3],
       HelpID, std::move(*OptStatements), IsExtended, MemoryFlags);
 
@@ -497,7 +497,7 @@ RCParser::ParseType RCParser::parseUserDefinedResource(IntOrString Type) {
   switch (look().kind()) {
   case Kind::String:
   case Kind::Identifier:
-    return llvm::make_unique<UserDefinedResource>(Type, read().value(),
+    return std::make_unique<UserDefinedResource>(Type, read().value(),
                                                   MemoryFlags);
   default:
     break;
@@ -517,7 +517,7 @@ RCParser::ParseType RCParser::parseUserDefinedResource(IntOrString Type) {
     Data.push_back(*Item);
   }
 
-  return llvm::make_unique<UserDefinedResource>(Type, std::move(Data),
+  return std::make_unique<UserDefinedResource>(Type, std::move(Data),
                                                 MemoryFlags);
 }
 
@@ -526,7 +526,7 @@ RCParser::ParseType RCParser::parseVersionInfoResource() {
       parseMemoryFlags(VersionInfoResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(FixedResult, parseVersionInfoFixed());
   ASSIGN_OR_RETURN(BlockResult, parseVersionInfoBlockContents(StringRef()));
-  return llvm::make_unique<VersionInfoResource>(
+  return std::make_unique<VersionInfoResource>(
       std::move(**BlockResult), std::move(*FixedResult), MemoryFlags);
 }
 
@@ -597,21 +597,21 @@ RCParser::ParseType RCParser::parseBitmapResource() {
   uint16_t MemoryFlags =
       parseMemoryFlags(BitmapResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(Arg, readFilename());
-  return llvm::make_unique<BitmapResource>(*Arg, MemoryFlags);
+  return std::make_unique<BitmapResource>(*Arg, MemoryFlags);
 }
 
 RCParser::ParseType RCParser::parseIconResource() {
   uint16_t MemoryFlags =
       parseMemoryFlags(IconResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(Arg, readFilename());
-  return llvm::make_unique<IconResource>(*Arg, MemoryFlags);
+  return std::make_unique<IconResource>(*Arg, MemoryFlags);
 }
 
 RCParser::ParseType RCParser::parseHTMLResource() {
   uint16_t MemoryFlags =
       parseMemoryFlags(HTMLResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(Arg, readFilename());
-  return llvm::make_unique<HTMLResource>(*Arg, MemoryFlags);
+  return std::make_unique<HTMLResource>(*Arg, MemoryFlags);
 }
 
 RCParser::ParseType RCParser::parseMenuResource() {
@@ -619,7 +619,7 @@ RCParser::ParseType RCParser::parseMenuResource() {
       parseMemoryFlags(MenuResource::getDefaultMemoryFlags());
   ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
   ASSIGN_OR_RETURN(Items, parseMenuItemsList());
-  return llvm::make_unique<MenuResource>(std::move(*OptStatements),
+  return std::make_unique<MenuResource>(std::move(*OptStatements),
                                          std::move(*Items), MemoryFlags);
 }
 
@@ -644,7 +644,7 @@ Expected<MenuDefinitionList> RCParser::parseMenuItemsList() {
       // Now, expecting SEPARATOR.
       ASSIGN_OR_RETURN(SeparatorResult, readIdentifier());
       if (SeparatorResult->equals_lower("SEPARATOR")) {
-        List.addDefinition(llvm::make_unique<MenuSeparator>());
+        List.addDefinition(std::make_unique<MenuSeparator>());
         continue;
       }
 
@@ -669,14 +669,14 @@ Expected<MenuDefinitionList> RCParser::parseMenuItemsList() {
     if (IsPopup) {
       // If POPUP, read submenu items recursively.
       ASSIGN_OR_RETURN(SubMenuResult, parseMenuItemsList());
-      List.addDefinition(llvm::make_unique<PopupItem>(
+      List.addDefinition(std::make_unique<PopupItem>(
           *CaptionResult, *FlagsResult, std::move(*SubMenuResult)));
       continue;
     }
 
     assert(IsMenuItem);
     List.addDefinition(
-        llvm::make_unique<MenuItem>(*CaptionResult, MenuResult, *FlagsResult));
+        std::make_unique<MenuItem>(*CaptionResult, MenuResult, *FlagsResult));
   }
 
   return std::move(List);
@@ -688,7 +688,7 @@ RCParser::ParseType RCParser::parseStringTableResource() {
   ASSIGN_OR_RETURN(OptStatements, parseOptionalStatements());
   RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
 
-  auto Table = llvm::make_unique<StringTableResource>(std::move(*OptStatements),
+  auto Table = std::make_unique<StringTableResource>(std::move(*OptStatements),
                                                       MemoryFlags);
 
   // Read strings until we reach the end of the block.
@@ -709,7 +709,7 @@ Expected<std::unique_ptr<VersionInfoBlock>>
 RCParser::parseVersionInfoBlockContents(StringRef BlockName) {
   RETURN_IF_ERROR(consumeType(Kind::BlockBegin));
 
-  auto Contents = llvm::make_unique<VersionInfoBlock>(BlockName);
+  auto Contents = std::make_unique<VersionInfoBlock>(BlockName);
 
   while (!isNextTokenKind(Kind::BlockEnd)) {
     ASSIGN_OR_RETURN(Stmt, parseVersionInfoStmt());
@@ -746,7 +746,7 @@ Expected<std::unique_ptr<VersionInfoStmt>> RCParser::parseVersionInfoStmt() {
       Values.push_back(*ValueResult);
       PrecedingCommas.push_back(HadComma);
     }
-    return llvm::make_unique<VersionInfoValue>(*KeyResult, std::move(Values),
+    return std::make_unique<VersionInfoValue>(*KeyResult, std::move(Values),
                                                std::move(PrecedingCommas));
   }
 
@@ -781,27 +781,27 @@ RCParser::parseVersionInfoFixed() {
 
 RCParser::ParseOptionType RCParser::parseLanguageStmt() {
   ASSIGN_OR_RETURN(Args, readIntsWithCommas(/* min = */ 2, /* max = */ 2));
-  return llvm::make_unique<LanguageResource>((*Args)[0], (*Args)[1]);
+  return std::make_unique<LanguageResource>((*Args)[0], (*Args)[1]);
 }
 
 RCParser::ParseOptionType RCParser::parseCharacteristicsStmt() {
   ASSIGN_OR_RETURN(Arg, readInt());
-  return llvm::make_unique<CharacteristicsStmt>(*Arg);
+  return std::make_unique<CharacteristicsStmt>(*Arg);
 }
 
 RCParser::ParseOptionType RCParser::parseVersionStmt() {
   ASSIGN_OR_RETURN(Arg, readInt());
-  return llvm::make_unique<VersionStmt>(*Arg);
+  return std::make_unique<VersionStmt>(*Arg);
 }
 
 RCParser::ParseOptionType RCParser::parseCaptionStmt() {
   ASSIGN_OR_RETURN(Arg, readString());
-  return llvm::make_unique<CaptionStmt>(*Arg);
+  return std::make_unique<CaptionStmt>(*Arg);
 }
 
 RCParser::ParseOptionType RCParser::parseClassStmt() {
   ASSIGN_OR_RETURN(Arg, readIntOrString());
-  return llvm::make_unique<ClassStmt>(*Arg);
+  return std::make_unique<ClassStmt>(*Arg);
 }
 
 RCParser::ParseOptionType RCParser::parseFontStmt(OptStmtType DialogType) {
@@ -826,18 +826,18 @@ RCParser::ParseOptionType RCParser::parseFontStmt(OptStmtType DialogType) {
         FontCharset = (*Args)[2];
     }
   }
-  return llvm::make_unique<FontStmt>(*SizeResult, *NameResult, FontWeight,
+  return std::make_unique<FontStmt>(*SizeResult, *NameResult, FontWeight,
                                      FontItalic, FontCharset);
 }
 
 RCParser::ParseOptionType RCParser::parseStyleStmt() {
   ASSIGN_OR_RETURN(Arg, readInt());
-  return llvm::make_unique<StyleStmt>(*Arg);
+  return std::make_unique<StyleStmt>(*Arg);
 }
 
 RCParser::ParseOptionType RCParser::parseExStyleStmt() {
   ASSIGN_OR_RETURN(Arg, readInt());
-  return llvm::make_unique<ExStyleStmt>(*Arg);
+  return std::make_unique<ExStyleStmt>(*Arg);
 }
 
 Error RCParser::getExpectedError(const Twine &Message, bool IsAlreadyRead) {
index fcb55aa76d6dce9a2bfd1635dbd68ea9684a317c..7076eca96a23df982b1d5edc8421be35896e915f 100644 (file)
@@ -287,7 +287,7 @@ public:
   OptStatementsRCResource(OptionalStmtList &&Stmts,
                           uint16_t Flags = RCResource::getDefaultMemoryFlags())
       : RCResource(Flags),
-        OptStatements(llvm::make_unique<OptionalStmtList>(std::move(Stmts))) {}
+        OptStatements(std::make_unique<OptionalStmtList>(std::move(Stmts))) {}
 
   virtual Error applyStmts(Visitor *V) const { return OptStatements->visit(V); }
 };
index 4c115b7f06f8a786955e42ca5a0ad6097b6d7894..97cc7c88b68bed9ba51ddc36dae0ae70dbf6785a 100644 (file)
@@ -176,12 +176,12 @@ int main(int Argc, const char **Argv) {
           "No more than one output file should be provided (using /FO flag).");
 
     std::error_code EC;
-    auto FOut = llvm::make_unique<raw_fd_ostream>(
+    auto FOut = std::make_unique<raw_fd_ostream>(
         OutArgsInfo[0], EC, sys::fs::FA_Read | sys::fs::FA_Write);
     if (EC)
       fatalError("Error opening output file '" + OutArgsInfo[0] +
                  "': " + EC.message());
-    Visitor = llvm::make_unique<ResourceFileWriter>(Params, std::move(FOut));
+    Visitor = std::make_unique<ResourceFileWriter>(Params, std::move(FOut));
     Visitor->AppendNull = InputArgs.hasArg(OPT_ADD_NULL);
 
     ExitOnErr(NullResource().visit(Visitor.get()));
index c7ccbe9ee4b26964e543afb679f0590f150a24f3..4c37d262ae4f608647d0ef1c59097c3ca134e72d 100644 (file)
@@ -1153,7 +1153,7 @@ void COFFDumper::printCodeViewSymbolsSubsection(StringRef Subsection,
                                                 StringRef SectionContents) {
   ArrayRef<uint8_t> BinaryData(Subsection.bytes_begin(),
                                Subsection.bytes_end());
-  auto CODD = llvm::make_unique<COFFObjectDumpDelegate>(*this, Section, Obj,
+  auto CODD = std::make_unique<COFFObjectDumpDelegate>(*this, Section, Obj,
                                                         SectionContents);
   CVSymbolDumper CVSD(W, Types, CodeViewContainer::ObjectFile, std::move(CODD),
                       CompilationCPUType, opts::CodeViewSubsectionBytes);
index 818670a2088c5d74be909c766dd5713734b86d06..af83ea1227b91926bb120a0ee0485cb0c97a6d99 100644 (file)
@@ -889,7 +889,7 @@ static int linkAndVerify() {
     ObjectFile &Obj = **MaybeObj;
 
     if (!Checker)
-      Checker = llvm::make_unique<RuntimeDyldChecker>(
+      Checker = std::make_unique<RuntimeDyldChecker>(
           IsSymbolValid, GetSymbolInfo, GetSectionInfo, GetStubInfo,
           GetStubInfo, Obj.isLittleEndian() ? support::little : support::big,
           Disassembler.get(), InstPrinter.get(), dbgs());
index 5f76e5bf7ec8c5c648894bd4d4789218933399c8..5f36a785332b53c03a03160a781655ccd1844b05 100644 (file)
@@ -735,7 +735,7 @@ int main(int argc, char **argv) {
   cl::ParseCommandLineOptions(argc, argv, "llvm codegen stress-tester\n");
   llvm_shutdown_obj Y;
 
-  auto M = llvm::make_unique<Module>("/tmp/autogen.bc", Context);
+  auto M = std::make_unique<Module>("/tmp/autogen.bc", Context);
   Function *F = GenEmptyFunction(M.get());
 
   // Pick an initial seed value
index fc2d3da43c023b987c0082534d4cb2243498f254..ce670c22c7fb8f229fabd4f3215d723885e0d8d7 100644 (file)
@@ -112,7 +112,7 @@ static void lto_initialize() {
     static LLVMContext Context;
     LTOContext = &Context;
     LTOContext->setDiagnosticHandler(
-        llvm::make_unique<LTOToolDiagnosticHandler>(), true);
+        std::make_unique<LTOToolDiagnosticHandler>(), true);
     initialized = true;
   }
 }
@@ -277,8 +277,8 @@ lto_module_t lto_module_create_in_local_context(const void *mem, size_t length,
   llvm::TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
 
   // Create a local context. Ownership will be transferred to LTOModule.
-  std::unique_ptr<LLVMContext> Context = llvm::make_unique<LLVMContext>();
-  Context->setDiagnosticHandler(llvm::make_unique<LTOToolDiagnosticHandler>(),
+  std::unique_ptr<LLVMContext> Context = std::make_unique<LLVMContext>();
+  Context->setDiagnosticHandler(std::make_unique<LTOToolDiagnosticHandler>(),
                                 true);
 
   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createInLocalContext(
@@ -338,7 +338,7 @@ static lto_code_gen_t createCodeGen(bool InLocalContext) {
   TargetOptions Options = InitTargetOptionsFromCodeGenFlags();
 
   LibLTOCodeGenerator *CodeGen =
-      InLocalContext ? new LibLTOCodeGenerator(make_unique<LLVMContext>())
+      InLocalContext ? new LibLTOCodeGenerator(std::make_unique<LLVMContext>())
                      : new LibLTOCodeGenerator();
   CodeGen->setTargetOptions(Options);
   return wrap(CodeGen);
index a228d3917ee5275b60fc3d7bf53bbc0442a794db..baa1b863273e2df847b1f3d070977147dbcba747 100644 (file)
@@ -137,7 +137,7 @@ ELFDumper<ELFT>::getUniquedSymbolName(const Elf_Sym *Sym, StringRef StrTable,
 }
 
 template <class ELFT> Expected<ELFYAML::Object *> ELFDumper<ELFT>::dump() {
-  auto Y = make_unique<ELFYAML::Object>();
+  auto Y = std::make_unique<ELFYAML::Object>();
 
   // Dump header. We do not dump SHEntSize, SHOffset, SHNum and SHStrNdx field.
   // When not explicitly set, the values are set by yaml2obj automatically
@@ -453,7 +453,7 @@ Error ELFDumper<ELFT>::dumpCommonRelocationSection(
 template <class ELFT>
 Expected<ELFYAML::DynamicSection *>
 ELFDumper<ELFT>::dumpDynamicSection(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::DynamicSection>();
+  auto S = std::make_unique<ELFYAML::DynamicSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -470,7 +470,7 @@ ELFDumper<ELFT>::dumpDynamicSection(const Elf_Shdr *Shdr) {
 template <class ELFT>
 Expected<ELFYAML::RelocationSection *>
 ELFDumper<ELFT>::dumpRelocSection(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::RelocationSection>();
+  auto S = std::make_unique<ELFYAML::RelocationSection>();
   if (auto E = dumpCommonRelocationSection(Shdr, *S))
     return std::move(E);
 
@@ -508,7 +508,7 @@ ELFDumper<ELFT>::dumpRelocSection(const Elf_Shdr *Shdr) {
 template <class ELFT>
 Expected<ELFYAML::RawContentSection *>
 ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::RawContentSection>();
+  auto S = std::make_unique<ELFYAML::RawContentSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -532,7 +532,7 @@ ELFDumper<ELFT>::dumpContentSection(const Elf_Shdr *Shdr) {
 template <class ELFT>
 Expected<ELFYAML::SymtabShndxSection *>
 ELFDumper<ELFT>::dumpSymtabShndxSection(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::SymtabShndxSection>();
+  auto S = std::make_unique<ELFYAML::SymtabShndxSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -547,7 +547,7 @@ ELFDumper<ELFT>::dumpSymtabShndxSection(const Elf_Shdr *Shdr) {
 template <class ELFT>
 Expected<ELFYAML::NoBitsSection *>
 ELFDumper<ELFT>::dumpNoBitsSection(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::NoBitsSection>();
+  auto S = std::make_unique<ELFYAML::NoBitsSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
   S->Size = Shdr->sh_size;
@@ -561,7 +561,7 @@ ELFDumper<ELFT>::dumpVerdefSection(const Elf_Shdr *Shdr) {
   typedef typename ELFT::Verdef Elf_Verdef;
   typedef typename ELFT::Verdaux Elf_Verdaux;
 
-  auto S = make_unique<ELFYAML::VerdefSection>();
+  auto S = std::make_unique<ELFYAML::VerdefSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -610,7 +610,7 @@ Expected<ELFYAML::SymverSection *>
 ELFDumper<ELFT>::dumpSymverSection(const Elf_Shdr *Shdr) {
   typedef typename ELFT::Half Elf_Half;
 
-  auto S = make_unique<ELFYAML::SymverSection>();
+  auto S = std::make_unique<ELFYAML::SymverSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -629,7 +629,7 @@ ELFDumper<ELFT>::dumpVerneedSection(const Elf_Shdr *Shdr) {
   typedef typename ELFT::Verneed Elf_Verneed;
   typedef typename ELFT::Vernaux Elf_Vernaux;
 
-  auto S = make_unique<ELFYAML::VerneedSection>();
+  auto S = std::make_unique<ELFYAML::VerneedSection>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -682,7 +682,7 @@ ELFDumper<ELFT>::dumpVerneedSection(const Elf_Shdr *Shdr) {
 
 template <class ELFT>
 Expected<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) {
-  auto S = make_unique<ELFYAML::Group>();
+  auto S = std::make_unique<ELFYAML::Group>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
@@ -730,7 +730,7 @@ Expected<ELFYAML::MipsABIFlags *>
 ELFDumper<ELFT>::dumpMipsABIFlags(const Elf_Shdr *Shdr) {
   assert(Shdr->sh_type == ELF::SHT_MIPS_ABIFLAGS &&
          "Section type is not SHT_MIPS_ABIFLAGS");
-  auto S = make_unique<ELFYAML::MipsABIFlags>();
+  auto S = std::make_unique<ELFYAML::MipsABIFlags>();
   if (Error E = dumpCommonSection(Shdr, *S))
     return std::move(E);
 
index 63e81686632489a8dd23fafccadf3e95ff1aa1ef..95c42de9fae66369b7ac5d716214f72ba1a007c8 100644 (file)
@@ -180,7 +180,7 @@ const char *MachODumper::processLoadCommandData<MachO::build_version_command>(
 }
 
 Expected<std::unique_ptr<MachOYAML::Object>> MachODumper::dump() {
-  auto Y = make_unique<MachOYAML::Object>();
+  auto Y = std::make_unique<MachOYAML::Object>();
   Y->IsLittleEndian = Obj.isLittleEndian();
   dumpHeader(Y);
   dumpLoadCommands(Y);
index 47d984b53fb81265069fd257f63c79c60c5e0a4c..7a540974d500380c67b75f73a9b73b34c9cbf7f5 100644 (file)
@@ -53,7 +53,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
   std::unique_ptr<WasmYAML::CustomSection> CustomSec;
   if (WasmSec.Name == "dylink") {
     std::unique_ptr<WasmYAML::DylinkSection> DylinkSec =
-        make_unique<WasmYAML::DylinkSection>();
+        std::make_unique<WasmYAML::DylinkSection>();
     const wasm::WasmDylinkInfo& Info = Obj.dylinkInfo();
     DylinkSec->MemorySize = Info.MemorySize;
     DylinkSec->MemoryAlignment = Info.MemoryAlignment;
@@ -63,7 +63,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
     CustomSec = std::move(DylinkSec);
   } else if (WasmSec.Name == "name") {
     std::unique_ptr<WasmYAML::NameSection> NameSec =
-        make_unique<WasmYAML::NameSection>();
+        std::make_unique<WasmYAML::NameSection>();
     for (const llvm::wasm::WasmFunctionName &Func : Obj.debugNames()) {
       WasmYAML::NameEntry NameEntry;
       NameEntry.Name = Func.Name;
@@ -73,7 +73,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
     CustomSec = std::move(NameSec);
   } else if (WasmSec.Name == "linking") {
     std::unique_ptr<WasmYAML::LinkingSection> LinkingSec =
-        make_unique<WasmYAML::LinkingSection>();
+        std::make_unique<WasmYAML::LinkingSection>();
     LinkingSec->Version = Obj.linkingData().Version;
 
     ArrayRef<StringRef> Comdats = Obj.linkingData().Comdats;
@@ -134,7 +134,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
     CustomSec = std::move(LinkingSec);
   } else if (WasmSec.Name == "producers") {
     std::unique_ptr<WasmYAML::ProducersSection> ProducersSec =
-        make_unique<WasmYAML::ProducersSection>();
+        std::make_unique<WasmYAML::ProducersSection>();
     const llvm::wasm::WasmProducerInfo &Info = Obj.getProducerInfo();
     for (auto &E : Info.Languages) {
       WasmYAML::ProducerEntry Producer;
@@ -157,7 +157,7 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
     CustomSec = std::move(ProducersSec);
   } else if (WasmSec.Name == "target_features") {
     std::unique_ptr<WasmYAML::TargetFeaturesSection> TargetFeaturesSec =
-        make_unique<WasmYAML::TargetFeaturesSection>();
+        std::make_unique<WasmYAML::TargetFeaturesSection>();
     for (auto &E : Obj.getTargetFeatures()) {
       WasmYAML::FeatureEntry Feature;
       Feature.Prefix = E.Prefix;
@@ -166,14 +166,14 @@ WasmDumper::dumpCustomSection(const WasmSection &WasmSec) {
     }
     CustomSec = std::move(TargetFeaturesSec);
   } else {
-    CustomSec = make_unique<WasmYAML::CustomSection>(WasmSec.Name);
+    CustomSec = std::make_unique<WasmYAML::CustomSection>(WasmSec.Name);
   }
   CustomSec->Payload = yaml::BinaryRef(WasmSec.Content);
   return CustomSec;
 }
 
 ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
-  auto Y = make_unique<WasmYAML::Object>();
+  auto Y = std::make_unique<WasmYAML::Object>();
 
   // Dump header
   Y->Header.Version = Obj.getHeader().Version;
@@ -193,7 +193,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_TYPE: {
-      auto TypeSec = make_unique<WasmYAML::TypeSection>();
+      auto TypeSec = std::make_unique<WasmYAML::TypeSection>();
       uint32_t Index = 0;
       for (const auto &FunctionSig : Obj.types()) {
         WasmYAML::Signature Sig;
@@ -211,7 +211,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_IMPORT: {
-      auto ImportSec = make_unique<WasmYAML::ImportSection>();
+      auto ImportSec = std::make_unique<WasmYAML::ImportSection>();
       for (auto &Import : Obj.imports()) {
         WasmYAML::Import Im;
         Im.Module = Import.Module;
@@ -242,7 +242,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_FUNCTION: {
-      auto FuncSec = make_unique<WasmYAML::FunctionSection>();
+      auto FuncSec = std::make_unique<WasmYAML::FunctionSection>();
       for (const auto &Func : Obj.functionTypes()) {
         FuncSec->FunctionTypes.push_back(Func);
       }
@@ -250,7 +250,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_TABLE: {
-      auto TableSec = make_unique<WasmYAML::TableSection>();
+      auto TableSec = std::make_unique<WasmYAML::TableSection>();
       for (const wasm::WasmTable &Table : Obj.tables()) {
         TableSec->Tables.push_back(makeTable(Table));
       }
@@ -258,7 +258,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_MEMORY: {
-      auto MemorySec = make_unique<WasmYAML::MemorySection>();
+      auto MemorySec = std::make_unique<WasmYAML::MemorySection>();
       for (const wasm::WasmLimits &Memory : Obj.memories()) {
         MemorySec->Memories.push_back(makeLimits(Memory));
       }
@@ -266,7 +266,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_GLOBAL: {
-      auto GlobalSec = make_unique<WasmYAML::GlobalSection>();
+      auto GlobalSec = std::make_unique<WasmYAML::GlobalSection>();
       for (auto &Global : Obj.globals()) {
         WasmYAML::Global G;
         G.Index = Global.Index;
@@ -279,7 +279,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_EVENT: {
-      auto EventSec = make_unique<WasmYAML::EventSection>();
+      auto EventSec = std::make_unique<WasmYAML::EventSection>();
       for (auto &Event : Obj.events()) {
         WasmYAML::Event E;
         E.Index = Event.Index;
@@ -291,13 +291,13 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_START: {
-      auto StartSec = make_unique<WasmYAML::StartSection>();
+      auto StartSec = std::make_unique<WasmYAML::StartSection>();
       StartSec->StartFunction = Obj.startFunction();
       S = std::move(StartSec);
       break;
     }
     case wasm::WASM_SEC_EXPORT: {
-      auto ExportSec = make_unique<WasmYAML::ExportSection>();
+      auto ExportSec = std::make_unique<WasmYAML::ExportSection>();
       for (auto &Export : Obj.exports()) {
         WasmYAML::Export Ex;
         Ex.Name = Export.Name;
@@ -309,7 +309,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_ELEM: {
-      auto ElemSec = make_unique<WasmYAML::ElemSection>();
+      auto ElemSec = std::make_unique<WasmYAML::ElemSection>();
       for (auto &Segment : Obj.elements()) {
         WasmYAML::ElemSegment Seg;
         Seg.TableIndex = Segment.TableIndex;
@@ -323,7 +323,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_CODE: {
-      auto CodeSec = make_unique<WasmYAML::CodeSection>();
+      auto CodeSec = std::make_unique<WasmYAML::CodeSection>();
       for (auto &Func : Obj.functions()) {
         WasmYAML::Function Function;
         Function.Index = Func.Index;
@@ -340,7 +340,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_DATA: {
-      auto DataSec = make_unique<WasmYAML::DataSection>();
+      auto DataSec = std::make_unique<WasmYAML::DataSection>();
       for (const object::WasmSegment &Segment : Obj.dataSegments()) {
         WasmYAML::DataSegment Seg;
         Seg.SectionOffset = Segment.SectionOffset;
@@ -354,7 +354,7 @@ ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
       break;
     }
     case wasm::WASM_SEC_DATACOUNT: {
-      auto DataCountSec = make_unique<WasmYAML::DataCountSection>();
+      auto DataCountSec = std::make_unique<WasmYAML::DataCountSection>();
       DataCountSec->Count = Obj.dataSegments().size();
       S = std::move(DataCountSec);
       break;
index a30547b89f8a9bf764f1d5523bf249c49abe2414..4143d340b41b01146aebfa4d08a870c5a1fe0071 100644 (file)
@@ -720,7 +720,7 @@ int main(int argc, char **argv) {
         OutputFilename = "-";
 
       std::error_code EC;
-      Out = llvm::make_unique<ToolOutputFile>(OutputFilename, EC,
+      Out = std::make_unique<ToolOutputFile>(OutputFilename, EC,
                                               sys::fs::OF_None);
       if (EC) {
         errs() << EC.message() << '\n';
@@ -867,7 +867,7 @@ int main(int argc, char **argv) {
     assert(Out);
     OS = &Out->os();
     if (RunTwice) {
-      BOS = make_unique<raw_svector_ostream>(Buffer);
+      BOS = std::make_unique<raw_svector_ostream>(Buffer);
       OS = BOS.get();
     }
     if (OutputAssembly) {
index acf47b99b9c6b1c65c6d69aa0727e71b2f7ac838..9f5de69ee55afa38a10a559108be9405b4657b55 100644 (file)
@@ -243,7 +243,7 @@ RawCoverage::read(const std::string &FileName) {
     return make_error_code(errc::illegal_byte_sequence);
   }
 
-  auto Addrs = llvm::make_unique<std::set<uint64_t>>();
+  auto Addrs = std::make_unique<std::set<uint64_t>>();
 
   switch (Header->Bitness) {
   case Bitness64:
@@ -458,7 +458,7 @@ static std::string parseScalarString(yaml::Node *N) {
 
 std::unique_ptr<SymbolizedCoverage>
 SymbolizedCoverage::read(const std::string &InputFile) {
-  auto Coverage(make_unique<SymbolizedCoverage>());
+  auto Coverage(std::make_unique<SymbolizedCoverage>());
 
   std::map<std::string, CoveragePoint> Points;
   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
@@ -958,7 +958,7 @@ static bool isSymbolizedCoverageFile(const std::string &FileName) {
 
 static std::unique_ptr<SymbolizedCoverage>
 symbolize(const RawCoverage &Data, const std::string ObjectFile) {
-  auto Coverage = make_unique<SymbolizedCoverage>();
+  auto Coverage = std::make_unique<SymbolizedCoverage>();
 
   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
       MemoryBuffer::getFile(ObjectFile);
@@ -1112,7 +1112,7 @@ merge(const std::vector<std::unique_ptr<SymbolizedCoverage>> &Coverages) {
   if (Coverages.empty())
     return nullptr;
 
-  auto Result = make_unique<SymbolizedCoverage>();
+  auto Result = std::make_unique<SymbolizedCoverage>();
 
   for (size_t I = 0; I < Coverages.size(); ++I) {
     const SymbolizedCoverage &Coverage = *Coverages[I];
index a599bee7e150c45f3faefefa7da7fbf322b0b526..5064a2975a9c9db8ff9c4c5e6efa16d3bf6f114f 100644 (file)
@@ -1,4 +1,4 @@
-//===- llvm/unittest/ADT/MakeUniqueTest.cpp - make_unique unit tests ------===//
+//===- llvm/unittest/ADT/MakeUniqueTest.cpp - std::make_unique unit tests ------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
index f46f109d5722e6c4755904301fb4415f02816d95..2f5abb64e7d498d2bcfa3dd1abb264be7e4eefc1 100644 (file)
@@ -107,10 +107,10 @@ TEST(PointeeIteratorTest, Basic) {
 
 TEST(PointeeIteratorTest, SmartPointer) {
   SmallVector<std::unique_ptr<int>, 4> V;
-  V.push_back(make_unique<int>(1));
-  V.push_back(make_unique<int>(2));
-  V.push_back(make_unique<int>(3));
-  V.push_back(make_unique<int>(4));
+  V.push_back(std::make_unique<int>(1));
+  V.push_back(std::make_unique<int>(2));
+  V.push_back(std::make_unique<int>(3));
+  V.push_back(std::make_unique<int>(4));
 
   typedef pointee_iterator<
       SmallVectorImpl<std::unique_ptr<int>>::const_iterator>
@@ -209,10 +209,10 @@ TEST(FilterIteratorTest, FunctionPointer) {
 
 TEST(FilterIteratorTest, Composition) {
   auto IsOdd = [](int N) { return N % 2 == 1; };
-  std::unique_ptr<int> A[] = {make_unique<int>(0), make_unique<int>(1),
-                              make_unique<int>(2), make_unique<int>(3),
-                              make_unique<int>(4), make_unique<int>(5),
-                              make_unique<int>(6)};
+  std::unique_ptr<int> A[] = {make_unique<int>(0), std::make_unique<int>(1),
+                              std::make_unique<int>(2), std::make_unique<int>(3),
+                              std::make_unique<int>(4), std::make_unique<int>(5),
+                              std::make_unique<int>(6)};
   using PointeeIterator = pointee_iterator<std::unique_ptr<int> *>;
   auto Range = make_filter_range(
       make_range(PointeeIterator(std::begin(A)), PointeeIterator(std::end(A))),
index c0c1096994701cf38ad09601efbb25979dbca36c..d643d09df7ad30c883de1722aca0538bd18245c2 100644 (file)
@@ -1,4 +1,4 @@
-//===- llvm/unittest/ADT/MakeUniqueTest.cpp - make_unique unit tests ------===//
+//===- llvm/unittest/ADT/MakeUniqueTest.cpp - std::make_unique unit tests ------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -14,60 +14,60 @@ using namespace llvm;
 namespace {
 
 TEST(MakeUniqueTest, SingleObject) {
-  auto p0 = make_unique<int>();
+  auto p0 = std::make_unique<int>();
   EXPECT_TRUE((bool)p0);
   EXPECT_EQ(0, *p0);
 
-  auto p1 = make_unique<int>(5);
+  auto p1 = std::make_unique<int>(5);
   EXPECT_TRUE((bool)p1);
   EXPECT_EQ(5, *p1);
 
-  auto p2 = make_unique<std::tuple<int, int>>(0, 1);
+  auto p2 = std::make_unique<std::tuple<int, int>>(0, 1);
   EXPECT_TRUE((bool)p2);
   EXPECT_EQ(std::make_tuple(0, 1), *p2);
 
-  auto p3 = make_unique<std::tuple<int, int, int>>(0, 1, 2);
+  auto p3 = std::make_unique<std::tuple<int, int, int>>(0, 1, 2);
   EXPECT_TRUE((bool)p3);
   EXPECT_EQ(std::make_tuple(0, 1, 2), *p3);
 
-  auto p4 = make_unique<std::tuple<int, int, int, int>>(0, 1, 2, 3);
+  auto p4 = std::make_unique<std::tuple<int, int, int, int>>(0, 1, 2, 3);
   EXPECT_TRUE((bool)p4);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3), *p4);
 
-  auto p5 = make_unique<std::tuple<int, int, int, int, int>>(0, 1, 2, 3, 4);
+  auto p5 = std::make_unique<std::tuple<int, int, int, int, int>>(0, 1, 2, 3, 4);
   EXPECT_TRUE((bool)p5);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4), *p5);
 
   auto p6 =
-      make_unique<std::tuple<int, int, int, int, int, int>>(0, 1, 2, 3, 4, 5);
+      std::make_unique<std::tuple<int, int, int, int, int, int>>(0, 1, 2, 3, 4, 5);
   EXPECT_TRUE((bool)p6);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5), *p6);
 
-  auto p7 = make_unique<std::tuple<int, int, int, int, int, int, int>>(
+  auto p7 = std::make_unique<std::tuple<int, int, int, int, int, int, int>>(
       0, 1, 2, 3, 4, 5, 6);
   EXPECT_TRUE((bool)p7);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6), *p7);
 
-  auto p8 = make_unique<std::tuple<int, int, int, int, int, int, int, int>>(
+  auto p8 = std::make_unique<std::tuple<int, int, int, int, int, int, int, int>>(
       0, 1, 2, 3, 4, 5, 6, 7);
   EXPECT_TRUE((bool)p8);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7), *p8);
 
   auto p9 =
-      make_unique<std::tuple<int, int, int, int, int, int, int, int, int>>(
+      std::make_unique<std::tuple<int, int, int, int, int, int, int, int, int>>(
           0, 1, 2, 3, 4, 5, 6, 7, 8);
   EXPECT_TRUE((bool)p9);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7, 8), *p9);
 
   auto p10 =
-      make_unique<std::tuple<int, int, int, int, int, int, int, int, int, int>>(
+      std::make_unique<std::tuple<int, int, int, int, int, int, int, int, int, int>>(
           0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
   EXPECT_TRUE((bool)p10);
   EXPECT_EQ(std::make_tuple(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), *p10);
 }
 
 TEST(MakeUniqueTest, Array) {
-  auto p1 = make_unique<int[]>(2);
+  auto p1 = std::make_unique<int[]>(2);
   EXPECT_TRUE((bool)p1);
   EXPECT_EQ(0, p1[0]);
   EXPECT_EQ(0, p1[1]);
index b8fdbdd0e0bae9abf1ca4f7ae38dd111d3fdd10f..f7e5812f2e999c3b5cb480fecb06ccdbcb0b1518 100644 (file)
@@ -149,8 +149,8 @@ TEST(MapVectorTest, iteration_test) {
 
 TEST(MapVectorTest, NonCopyable) {
   MapVector<int, std::unique_ptr<int>> MV;
-  MV.insert(std::make_pair(1, llvm::make_unique<int>(1)));
-  MV.insert(std::make_pair(2, llvm::make_unique<int>(2)));
+  MV.insert(std::make_pair(1, std::make_unique<int>(1)));
+  MV.insert(std::make_pair(2, std::make_unique<int>(2)));
 
   ASSERT_EQ(MV.count(1), 1u);
   ASSERT_EQ(*MV.find(2)->second, 2);
@@ -306,8 +306,8 @@ TEST(SmallMapVectorSmallTest, iteration_test) {
 
 TEST(SmallMapVectorSmallTest, NonCopyable) {
   SmallMapVector<int, std::unique_ptr<int>, 8> MV;
-  MV.insert(std::make_pair(1, llvm::make_unique<int>(1)));
-  MV.insert(std::make_pair(2, llvm::make_unique<int>(2)));
+  MV.insert(std::make_pair(1, std::make_unique<int>(1)));
+  MV.insert(std::make_pair(2, std::make_unique<int>(2)));
 
   ASSERT_EQ(MV.count(1), 1u);
   ASSERT_EQ(*MV.find(2)->second, 2);
index 8704ddda2653e5bdf4370e1625e78f565739e170..4cbef904ca816e4ae3faa9eb5bd24bba3cebba61 100644 (file)
@@ -451,7 +451,7 @@ TEST(STLExtrasTest, to_address) {
   EXPECT_EQ(V1, to_address(V1));
 
   // Check fancy pointer overload for unique_ptr
-  std::unique_ptr<int> V2 = make_unique<int>(0);
+  std::unique_ptr<int> V2 = std::make_unique<int>(0);
   EXPECT_EQ(V2.get(), to_address(V2));
 
   V2.reset(V1);
index bfdf37ee190795748262fc93278e58b625854cce..b470f162612637d98bc552bc55b20167e7e95f13 100644 (file)
@@ -51,7 +51,7 @@ protected:
         : DT(*Test.F), AC(*Test.F), AA(Test.TLI),
           BAA(Test.DL, *Test.F, Test.TLI, AC, &DT) {
       AA.addAAResult(BAA);
-      MSSA = make_unique<MemorySSA>(*Test.F, &AA, &DT);
+      MSSA = std::make_unique<MemorySSA>(*Test.F, &AA, &DT);
       Walker = MSSA->getWalker();
     }
   };
@@ -1431,7 +1431,7 @@ TEST_F(MemorySSATest, TestAddedEdgeToBlockWithPhiNotOpt) {
   MemorySSA &MSSA = *Analyses->MSSA;
   MemorySSAWalker *Walker = Analyses->Walker;
   std::unique_ptr<MemorySSAUpdater> MSSAU =
-      make_unique<MemorySSAUpdater>(&MSSA);
+      std::make_unique<MemorySSAUpdater>(&MSSA);
 
   MemoryPhi *Phi = MSSA.getMemoryAccess(Exit);
   EXPECT_EQ(Phi, Walker->getClobberingMemoryAccess(S1));
@@ -1493,7 +1493,7 @@ TEST_F(MemorySSATest, TestAddedEdgeToBlockWithPhiOpt) {
   MemorySSA &MSSA = *Analyses->MSSA;
   MemorySSAWalker *Walker = Analyses->Walker;
   std::unique_ptr<MemorySSAUpdater> MSSAU =
-      make_unique<MemorySSAUpdater>(&MSSA);
+      std::make_unique<MemorySSAUpdater>(&MSSA);
 
   MemoryDef *DefS1 = cast<MemoryDef>(MSSA.getMemoryAccess(S1));
   EXPECT_EQ(DefS1, Walker->getClobberingMemoryAccess(S2));
@@ -1565,7 +1565,7 @@ TEST_F(MemorySSATest, TestAddedEdgeToBlockWithNoPhiAddNewPhis) {
   setupAnalyses();
   MemorySSA &MSSA = *Analyses->MSSA;
   std::unique_ptr<MemorySSAUpdater> MSSAU =
-      make_unique<MemorySSAUpdater>(&MSSA);
+      std::make_unique<MemorySSAUpdater>(&MSSA);
 
   // Alter CFG, add edge: f -> c
   FBlock->getTerminator()->eraseFromParent();
index 3ac32aebeace597b799383db077f313c7676d2bf..f98173a35a1152af39082bab003593af378a17ec 100644 (file)
@@ -59,10 +59,10 @@ protected:
 
     MachineModuleInfo MMI(TM.get());
 
-    MF = make_unique<MachineFunction>(*F, *TM, *TM->getSubtargetImpl(*F), 0,
+    MF = std::make_unique<MachineFunction>(*F, *TM, *TM->getSubtargetImpl(*F), 0,
                                       MMI);
 
-    DAG = make_unique<SelectionDAG>(*TM, CodeGenOpt::None);
+    DAG = std::make_unique<SelectionDAG>(*TM, CodeGenOpt::None);
     if (!DAG)
       report_fatal_error("DAG?");
     OptimizationRemarkEmitter ORE(F);
index 11983f72cb0e787744d4ab2a29188a9b14a52f8a..dea0fc7ed027fd3993c66330377584b5c4f153fa 100644 (file)
@@ -22,7 +22,7 @@ TEST_F(GISelMITest, TestCSE) {
   auto MIBInput1 = B.buildInstr(TargetOpcode::G_TRUNC, {s16}, {Copies[1]});
   auto MIBAdd = B.buildInstr(TargetOpcode::G_ADD, {s16}, {MIBInput, MIBInput});
   GISelCSEInfo CSEInfo;
-  CSEInfo.setCSEConfig(make_unique<CSEConfigFull>());
+  CSEInfo.setCSEConfig(std::make_unique<CSEConfigFull>());
   CSEInfo.analyze(*MF);
   B.setCSEInfo(&CSEInfo);
   CSEMIRBuilder CSEB(B.getState());
@@ -84,7 +84,7 @@ TEST_F(GISelMITest, TestCSEConstantConfig) {
   auto MIBAdd = B.buildInstr(TargetOpcode::G_ADD, {s16}, {MIBInput, MIBInput});
   auto MIBZero = B.buildConstant(s16, 0);
   GISelCSEInfo CSEInfo;
-  CSEInfo.setCSEConfig(make_unique<CSEConfigConstantOnly>());
+  CSEInfo.setCSEConfig(std::make_unique<CSEConfigConstantOnly>());
   CSEInfo.analyze(*MF);
   B.setCSEInfo(&CSEInfo);
   CSEMIRBuilder CSEB(B.getState());
index 37188760c1d277c0b6ade3a9de0d1242ea1ada50..0af63b70eec67c9524fb03b58bf62de5bb735355 100644 (file)
@@ -111,7 +111,7 @@ body: |
 )MIR") + Twine(MIRFunc) + Twine("...\n"))
                             .toNullTerminatedStringRef(S);
   std::unique_ptr<MIRParser> MIR;
-  auto MMI = make_unique<MachineModuleInfo>(&TM);
+  auto MMI = std::make_unique<MachineModuleInfo>(&TM);
   std::unique_ptr<Module> M =
       parseMIR(Context, MIR, TM, MIRString, "func", *MMI);
   return make_pair(std::move(M), std::move(MMI));
index de6445175e4c4e2522a9dd42f560e44be21bd2e3..5e7b750f194cb797802b0d49e29b943148757b80 100644 (file)
@@ -98,7 +98,7 @@ body: |
 )MIR") + Twine(MIRFunc) + Twine("...\n"))
                             .toNullTerminatedStringRef(S);
   std::unique_ptr<MIRParser> MIR;
-  auto MMI = make_unique<MachineModuleInfo>(&TM);
+  auto MMI = std::make_unique<MachineModuleInfo>(&TM);
   std::unique_ptr<Module> M =
       parseMIR(Context, MIR, TM, MIRString, "func", *MMI);
   return make_pair(std::move(M), std::move(MMI));
index 67d0c5954cc366cc6c7367cec1fa3eb9a05c79ca..b94763a06b51bf06286ec3c29dbac2fa36e430b9 100644 (file)
@@ -136,7 +136,7 @@ private:
 };
 
 std::unique_ptr<BogusTargetMachine> createTargetMachine() {
-  return llvm::make_unique<BogusTargetMachine>();
+  return std::make_unique<BogusTargetMachine>();
 }
 
 std::unique_ptr<MachineFunction> createMachineFunction() {
@@ -150,7 +150,7 @@ std::unique_ptr<MachineFunction> createMachineFunction() {
   MachineModuleInfo MMI(TM.get());
   const TargetSubtargetInfo &STI = *TM->getSubtargetImpl(*F);
 
-  return llvm::make_unique<MachineFunction>(*F, *TM, STI, FunctionNum, MMI);
+  return std::make_unique<MachineFunction>(*F, *TM, STI, FunctionNum, MMI);
 }
 
 // This test makes sure that MachineInstr::isIdenticalTo handles Defs correctly
index ff01ef7e73938399a829ae80c3b68823b9e75a88..7a4000d961351e3154072c4533b9a07df7ca8d40 100644 (file)
@@ -88,7 +88,7 @@ public:
   RandomAccessVisitorTest() {}
 
   static void SetUpTestCase() {
-    GlobalState = llvm::make_unique<GlobalTestState>();
+    GlobalState = std::make_unique<GlobalTestState>();
 
     AppendingTypeTableBuilder Builder(GlobalState->Allocator);
 
@@ -120,7 +120,7 @@ public:
   static void TearDownTestCase() { GlobalState.reset(); }
 
   void SetUp() override {
-    TestState = llvm::make_unique<PerTestState>();
+    TestState = std::make_unique<PerTestState>();
   }
 
   void TearDown() override { TestState.reset(); }
index d011db9fcd47d6176eeb34b9097b126f8a45dbaf..e00240d7427dc138ed25fe79efabc0fd8c178e9e 100644 (file)
@@ -25,8 +25,8 @@ public:
 
   void SetUp() override {
     Refs.clear();
-    TTB = make_unique<AppendingTypeTableBuilder>(Storage);
-    CRB = make_unique<ContinuationRecordBuilder>();
+    TTB = std::make_unique<AppendingTypeTableBuilder>(Storage);
+    CRB = std::make_unique<ContinuationRecordBuilder>();
     Symbols.clear();
   }
 
index d2c0f3c3b20a431b5c627c6ff8484090d18e3036..2e062e8fe9621822b3f8168d8b33820cb1a197c3 100644 (file)
@@ -446,7 +446,7 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) {
     return make_error<StringError>("no code emitter for target " + TripleName,
                                    inconvertibleErrorCode());
 
-  Stream = make_unique<raw_svector_ostream>(FileBytes);
+  Stream = std::make_unique<raw_svector_ostream>(FileBytes);
 
   MS = TheTarget->createMCObjectStreamer(
       TheTriple, *MC, std::unique_ptr<MCAsmBackend>(MAB),
@@ -469,7 +469,7 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) {
   MC->setDwarfVersion(Version);
   Asm->setDwarfVersion(Version);
 
-  StringPool = llvm::make_unique<DwarfStringPool>(Allocator, *Asm, StringRef());
+  StringPool = std::make_unique<DwarfStringPool>(Allocator, *Asm, StringRef());
   StringOffsetsStartSym = Asm->createTempSymbol("str_offsets_base");
 
   return Error::success();
@@ -541,12 +541,12 @@ bool dwarfgen::Generator::saveFile(StringRef Path) {
 
 dwarfgen::CompileUnit &dwarfgen::Generator::addCompileUnit() {
   CompileUnits.push_back(
-      make_unique<CompileUnit>(*this, Version, Asm->getPointerSize()));
+      std::make_unique<CompileUnit>(*this, Version, Asm->getPointerSize()));
   return *CompileUnits.back();
 }
 
 dwarfgen::LineTable &dwarfgen::Generator::addLineTable(DwarfFormat Format) {
   LineTables.push_back(
-      make_unique<LineTable>(Version, Format, Asm->getPointerSize()));
+      std::make_unique<LineTable>(Version, Format, Asm->getPointerSize()));
   return *LineTables.back();
 }
index 766f54d520635bf4636f9ae404c70e6f580d1ba5..f48e8379046fb566d431e3fab8dbbe6ad764d81a 100644 (file)
@@ -464,7 +464,7 @@ private:
   std::unique_ptr<IPDBSession> Session;
 
   void InsertItemWithTag(PDB_SymType Tag) {
-    auto RawSymbol = llvm::make_unique<MockRawSymbol>(Tag);
+    auto RawSymbol = std::make_unique<MockRawSymbol>(Tag);
     auto Symbol = PDBSymbol::create(*Session, std::move(RawSymbol));
     SymbolMap.insert(std::make_pair(Tag, std::move(Symbol)));
   }
index 77b1085a852f04eda48e0d396cc9da5705de0c99..b92b3f6e9845dcbd5a304ceeb7104d963ee2ada8 100644 (file)
@@ -27,7 +27,7 @@ private:
 
 protected:
   ExecutionEngineTest() {
-    auto Owner = make_unique<Module>("<main>", Context);
+    auto Owner = std::make_unique<Module>("<main>", Context);
     M = Owner.get();
     Engine.reset(EngineBuilder(std::move(Owner)).setErrorStr(&Error).create());
   }
index b0c6d5b4481f2dd70541822a19e42096a1358f62..23f8a691c8ffefa30c8fc436fca0c005a57dc16f 100644 (file)
@@ -71,7 +71,7 @@ Error JITLinkTestCommon::TestResources::initializeTripleSpecifics(Triple &TT) {
   if (!STI)
     report_fatal_error("Could not build MCSubtargetInfo for triple");
 
-  DisCtx = llvm::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
+  DisCtx = std::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
   Dis.reset(TheTarget->createMCDisassembler(*STI, *DisCtx));
 
   if (!Dis)
@@ -83,7 +83,7 @@ Error JITLinkTestCommon::TestResources::initializeTripleSpecifics(Triple &TT) {
 void JITLinkTestCommon::TestResources::initializeTestSpecifics(
     StringRef AsmSrc, const Triple &TT, bool PIC, bool LargeCodeModel) {
   SrcMgr.AddNewSourceBuffer(MemoryBuffer::getMemBuffer(AsmSrc), SMLoc());
-  AsCtx = llvm::make_unique<MCContext>(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
+  AsCtx = std::make_unique<MCContext>(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
   MOFI.InitMCObjectFileInfo(TT, PIC, *AsCtx, LargeCodeModel);
 
   std::unique_ptr<MCCodeEmitter> CE(
@@ -131,7 +131,7 @@ JITLinkTestCommon::TestJITLinkContext::setMemoryManager(
 JITLinkMemoryManager &
 JITLinkTestCommon::TestJITLinkContext::getMemoryManager() {
   if (!MemMgr)
-    MemMgr = llvm::make_unique<InProcessMemoryManager>();
+    MemMgr = std::make_unique<InProcessMemoryManager>();
   return *MemMgr;
 }
 
index 98c5d44d46662489efea799ea1755bad2d9c77f9..e051ad551c757d8d98d0025d55c1ef35ab08bfe0 100644 (file)
@@ -39,7 +39,7 @@ public:
       return;
     }
 
-    auto JTCtx = llvm::make_unique<TestJITLinkContext>(
+    auto JTCtx = std::make_unique<TestJITLinkContext>(
         **TR, [&](AtomGraph &G) { RunGraphTest(G, (*TR)->getDisassembler()); });
 
     JTCtx->externals() = std::move(Externals);
index 375318c323fbf669066929f0f088caded2ed92e0..d52ff4ba651b964c6c2c6f6b66032b7725098e9d 100644 (file)
@@ -37,7 +37,7 @@ TEST_F(CoreAPIsStandardTest, BasicSuccessfulLookup) {
 
   std::shared_ptr<MaterializationResponsibility> FooMR;
 
-  cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+  cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         FooMR = std::make_shared<MaterializationResponsibility>(std::move(R));
@@ -105,7 +105,7 @@ TEST_F(CoreAPIsStandardTest, RemoveSymbolsTest) {
   // Bar will be unmaterialized.
   bool BarDiscarded = false;
   bool BarMaterializerDestructed = false;
-  cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+  cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
       [this](MaterializationResponsibility R) {
         ADD_FAILURE() << "Unexpected materialization of \"Bar\"";
@@ -122,7 +122,7 @@ TEST_F(CoreAPIsStandardTest, RemoveSymbolsTest) {
   // Baz will be in the materializing state initially, then
   // materialized for the final removal attempt.
   Optional<MaterializationResponsibility> BazR;
-  cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+  cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Baz, BazSym.getFlags()}}),
       [&](MaterializationResponsibility R) { BazR.emplace(std::move(R)); },
       [](const JITDylib &JD, const SymbolStringPtr &Name) {
@@ -217,7 +217,7 @@ TEST_F(CoreAPIsStandardTest, LookupFlagsTest) {
 
   BarSym.setFlags(static_cast<JITSymbolFlags::FlagNames>(
       JITSymbolFlags::Exported | JITSymbolFlags::Weak));
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
       [](MaterializationResponsibility R) {
         llvm_unreachable("Symbol materialized on flags lookup");
@@ -251,7 +251,7 @@ TEST_F(CoreAPIsStandardTest, LookupWithGeneratorFailure) {
     }
   };
 
-  JD.addGenerator(llvm::make_unique<BadGenerator>());
+  JD.addGenerator(std::make_unique<BadGenerator>());
 
   EXPECT_THAT_ERROR(JD.lookupFlags({Foo}).takeError(), Failed<StringError>())
       << "Generator failure did not propagate through lookupFlags";
@@ -314,7 +314,7 @@ TEST_F(CoreAPIsStandardTest, TestThatReExportsDontUnnecessarilyMaterialize) {
   cantFail(JD.define(absoluteSymbols({{Foo, FooSym}})));
 
   bool BarMaterialized = false;
-  auto BarMU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto BarMU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         BarMaterialized = true;
@@ -344,7 +344,7 @@ TEST_F(CoreAPIsStandardTest, TestReexportsGenerator) {
 
   auto Filter = [this](SymbolStringPtr Name) { return Name != Bar; };
 
-  JD.addGenerator(llvm::make_unique<ReexportsGenerator>(JD2, false, Filter));
+  JD.addGenerator(std::make_unique<ReexportsGenerator>(JD2, false, Filter));
 
   auto Flags = cantFail(JD.lookupFlags({Foo, Bar, Baz}));
   EXPECT_EQ(Flags.size(), 1U) << "Unexpected number of results";
@@ -358,7 +358,7 @@ TEST_F(CoreAPIsStandardTest, TestReexportsGenerator) {
 
 TEST_F(CoreAPIsStandardTest, TestTrivialCircularDependency) {
   Optional<MaterializationResponsibility> FooR;
-  auto FooMU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto FooMU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
       [&](MaterializationResponsibility R) { FooR.emplace(std::move(R)); });
 
@@ -394,15 +394,15 @@ TEST_F(CoreAPIsStandardTest, TestCircularDependenceInOneJITDylib) {
 
   // Create a MaterializationUnit for each symbol that moves the
   // MaterializationResponsibility into one of the locals above.
-  auto FooMU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto FooMU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
       [&](MaterializationResponsibility R) { FooR.emplace(std::move(R)); });
 
-  auto BarMU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto BarMU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) { BarR.emplace(std::move(R)); });
 
-  auto BazMU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto BazMU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Baz, BazSym.getFlags()}}),
       [&](MaterializationResponsibility R) { BazR.emplace(std::move(R)); });
 
@@ -524,7 +524,7 @@ TEST_F(CoreAPIsStandardTest, DropMaterializerWhenEmpty) {
   JITSymbolFlags WeakExported(JITSymbolFlags::Exported);
   WeakExported |= JITSymbolFlags::Weak;
 
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, WeakExported}, {Bar, WeakExported}}),
       [](MaterializationResponsibility R) {
         llvm_unreachable("Unexpected call to materialize");
@@ -555,7 +555,7 @@ TEST_F(CoreAPIsStandardTest, AddAndMaterializeLazySymbol) {
   JITSymbolFlags WeakExported(JITSymbolFlags::Exported);
   WeakExported |= JITSymbolFlags::Weak;
 
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}, {Bar, WeakExported}}),
       [&](MaterializationResponsibility R) {
         assert(BarDiscarded && "Bar should have been discarded by this point");
@@ -597,7 +597,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicWeakSymbolMaterialization) {
   BarSym.setFlags(BarSym.getFlags() | JITSymbolFlags::Weak);
 
   bool BarMaterialized = false;
-  auto MU1 = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU1 = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         R.notifyResolved(SymbolMap({{Foo, FooSym}, {Bar, BarSym}})), R.notifyEmitted();
@@ -605,7 +605,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicWeakSymbolMaterialization) {
       });
 
   bool DuplicateBarDiscarded = false;
-  auto MU2 = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU2 = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         ADD_FAILURE() << "Attempt to materialize Bar from the wrong unit";
@@ -644,7 +644,7 @@ TEST_F(CoreAPIsStandardTest, DefineMaterializingSymbol) {
         MU->doMaterialize(JD);
       });
 
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         cantFail(
@@ -690,7 +690,7 @@ TEST_F(CoreAPIsStandardTest, GeneratorTest) {
     SymbolMap Symbols;
   };
 
-  JD.addGenerator(llvm::make_unique<TestGenerator>(SymbolMap({{Bar, BarSym}})));
+  JD.addGenerator(std::make_unique<TestGenerator>(SymbolMap({{Bar, BarSym}})));
 
   auto Result =
       cantFail(ES.lookup(JITDylibSearchList({{&JD, false}}), {Foo, Bar}));
@@ -701,7 +701,7 @@ TEST_F(CoreAPIsStandardTest, GeneratorTest) {
 }
 
 TEST_F(CoreAPIsStandardTest, FailResolution) {
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, JITSymbolFlags::Exported | JITSymbolFlags::Weak},
                       {Bar, JITSymbolFlags::Exported | JITSymbolFlags::Weak}}),
       [&](MaterializationResponsibility R) {
@@ -737,7 +737,7 @@ TEST_F(CoreAPIsStandardTest, FailEmissionEarly) {
 
   cantFail(JD.define(absoluteSymbols({{Baz, BazSym}})));
 
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         R.notifyResolved(SymbolMap({{Foo, FooSym}, {Bar, BarSym}}));
@@ -769,7 +769,7 @@ TEST_F(CoreAPIsStandardTest, FailEmissionEarly) {
 }
 
 TEST_F(CoreAPIsStandardTest, TestLookupWithUnthreadedMaterialization) {
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}}),
       [&](MaterializationResponsibility R) {
         R.notifyResolved({{Foo, FooSym}});
@@ -821,14 +821,14 @@ TEST_F(CoreAPIsStandardTest, TestGetRequestedSymbolsAndReplace) {
   bool FooMaterialized = false;
   bool BarMaterialized = false;
 
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         auto Requested = R.getRequestedSymbols();
         EXPECT_EQ(Requested.size(), 1U) << "Expected one symbol requested";
         EXPECT_EQ(*Requested.begin(), Foo) << "Expected \"Foo\" requested";
 
-        auto NewMU = llvm::make_unique<SimpleMaterializationUnit>(
+        auto NewMU = std::make_unique<SimpleMaterializationUnit>(
             SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
             [&](MaterializationResponsibility R2) {
               R2.notifyResolved(SymbolMap({{Bar, BarSym}}));
@@ -865,7 +865,7 @@ TEST_F(CoreAPIsStandardTest, TestGetRequestedSymbolsAndReplace) {
 }
 
 TEST_F(CoreAPIsStandardTest, TestMaterializationResponsibilityDelegation) {
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         auto R2 = R.delegate({Bar});
@@ -896,11 +896,11 @@ TEST_F(CoreAPIsStandardTest, TestMaterializeWeakSymbol) {
   WeakExported &= JITSymbolFlags::Weak;
 
   std::unique_ptr<MaterializationResponsibility> FooResponsibility;
-  auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
       [&](MaterializationResponsibility R) {
         FooResponsibility =
-            llvm::make_unique<MaterializationResponsibility>(std::move(R));
+            std::make_unique<MaterializationResponsibility>(std::move(R));
       });
 
   cantFail(JD.define(MU));
@@ -911,7 +911,7 @@ TEST_F(CoreAPIsStandardTest, TestMaterializeWeakSymbol) {
   ES.lookup(JITDylibSearchList({{&JD, false}}), {Foo}, SymbolState::Ready,
             std::move(OnCompletion), NoDependenciesToRegister);
 
-  auto MU2 = llvm::make_unique<SimpleMaterializationUnit>(
+  auto MU2 = std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}}),
       [](MaterializationResponsibility R) {
         llvm_unreachable("This unit should never be materialized");
index 87d582b3c2726416b397f767ed04ce3a5d38652e..d4757e0f86e665a6d3529d90b3a71e45a032430e 100644 (file)
@@ -37,7 +37,7 @@ TEST_F(LazyReexportsTest, BasicLocalCallThroughManagerOperation) {
 
   bool DummyTargetMaterialized = false;
 
-  cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+  cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
       SymbolFlagsMap({{DummyTarget, JITSymbolFlags::Exported}}),
       [&](MaterializationResponsibility R) {
         DummyTargetMaterialized = true;
index 06b96f9fd38efbd87a0bc2d8ffe34cf4d70d8715..59cd11c5e5a683961c4b86d4cbbb60196d338978 100644 (file)
@@ -25,7 +25,7 @@ public:
 class DummyCallbackManager : public JITCompileCallbackManager {
 public:
   DummyCallbackManager(ExecutionSession &ES)
-      : JITCompileCallbackManager(llvm::make_unique<DummyTrampolinePool>(), ES,
+      : JITCompileCallbackManager(std::make_unique<DummyTrampolinePool>(), ES,
                                   0) {}
 };
 
@@ -78,7 +78,7 @@ TEST(LegacyCompileOnDemandLayerTest, FindSymbol) {
   llvm::orc::LegacyCompileOnDemandLayer<decltype(TestBaseLayer)> COD(
       AcknowledgeORCv1Deprecation, ES, TestBaseLayer, GetResolver, SetResolver,
       [](Function &F) { return std::set<Function *>{&F}; }, CallbackMgr,
-      [] { return llvm::make_unique<DummyStubsManager>(); }, true);
+      [] { return std::make_unique<DummyStubsManager>(); }, true);
 
   auto Sym = COD.findSymbol("foo", true);
 
index 001019daa4b37e87e3424efca49f57b0777102bd..3f0f85b69a71d1e82814c4dba90ad7ed1bc4a2cf 100644 (file)
@@ -75,7 +75,7 @@ TEST(LegacyRTDyldObjectLinkingLayerTest, TestSetProcessAllSections) {
       });
 
   LLVMContext Context;
-  auto M = llvm::make_unique<Module>("", Context);
+  auto M = std::make_unique<Module>("", Context);
   M->setTargetTriple("x86_64-unknown-linux-gnu");
   Type *Int32Ty = IntegerType::get(Context, 32);
   GlobalVariable *GV =
index 56a3926ee65bdf9ee3592091c5735dfec80184df..511f038dec1981461a92318c1f6001e4dad2b91f 100644 (file)
@@ -135,8 +135,8 @@ inline std::pair<std::unique_ptr<QueueChannel>, std::unique_ptr<QueueChannel>>
 createPairedQueueChannels() {
   auto Q1 = std::make_shared<Queue>();
   auto Q2 = std::make_shared<Queue>();
-  auto C1 = llvm::make_unique<QueueChannel>(Q1, Q2);
-  auto C2 = llvm::make_unique<QueueChannel>(Q2, Q1);
+  auto C1 = std::make_unique<QueueChannel>(Q1, Q2);
+  auto C2 = std::make_unique<QueueChannel>(Q2, Q1);
   return std::make_pair(std::move(C1), std::move(C2));
 }
 
index 440b840faaaf9d42bf6ccea70a918d3404cb8539..ecb8cf653937f1a5f9c900e2845cf93d604dfc48 100644 (file)
@@ -54,7 +54,7 @@ static bool testSetProcessAllSections(std::unique_ptr<MemoryBuffer> Obj,
   auto Foo = ES.intern("foo");
 
   RTDyldObjectLinkingLayer ObjLayer(ES, [&DebugSectionSeen]() {
-    return llvm::make_unique<MemoryManagerWrapper>(DebugSectionSeen);
+    return std::make_unique<MemoryManagerWrapper>(DebugSectionSeen);
   });
 
   auto OnResolveDoNothing = [](Expected<SymbolMap> R) {
@@ -71,7 +71,7 @@ static bool testSetProcessAllSections(std::unique_ptr<MemoryBuffer> Obj,
 
 TEST(RTDyldObjectLinkingLayerTest, TestSetProcessAllSections) {
   LLVMContext Context;
-  auto M = llvm::make_unique<Module>("", Context);
+  auto M = std::make_unique<Module>("", Context);
   M->setTargetTriple("x86_64-unknown-linux-gnu");
   Type *Int32Ty = IntegerType::get(Context, 32);
   GlobalVariable *GV =
@@ -123,7 +123,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestOverrideObjectFlags) {
   };
 
   // Create a module with two void() functions: foo and bar.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
   ThreadSafeModule M;
   {
     ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy");
@@ -153,7 +153,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestOverrideObjectFlags) {
   auto &JD = ES.createJITDylib("main");
   auto Foo = ES.intern("foo");
   RTDyldObjectLinkingLayer ObjLayer(
-      ES, []() { return llvm::make_unique<SectionMemoryManager>(); });
+      ES, []() { return std::make_unique<SectionMemoryManager>(); });
   IRCompileLayer CompileLayer(ES, ObjLayer, FunkySimpleCompiler(*TM));
 
   ObjLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
@@ -196,7 +196,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestAutoClaimResponsibilityForSymbols) {
   };
 
   // Create a module with two void() functions: foo and bar.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
   ThreadSafeModule M;
   {
     ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy");
@@ -218,7 +218,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestAutoClaimResponsibilityForSymbols) {
   auto &JD = ES.createJITDylib("main");
   auto Foo = ES.intern("foo");
   RTDyldObjectLinkingLayer ObjLayer(
-      ES, []() { return llvm::make_unique<SectionMemoryManager>(); });
+      ES, []() { return std::make_unique<SectionMemoryManager>(); });
   IRCompileLayer CompileLayer(ES, ObjLayer, FunkySimpleCompiler(*TM));
 
   ObjLayer.setAutoClaimResponsibilityForObjectSymbols(true);
index b50c5f99707b62ff1a5436438240349f6ee71d3a..1ffb06db659757d9428e1e567ac34524c67d6ece 100644 (file)
@@ -21,36 +21,36 @@ namespace {
 TEST(ThreadSafeModuleTest, ContextWhollyOwnedByOneModule) {
   // Test that ownership of a context can be transferred to a single
   // ThreadSafeModule.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
-  auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+  auto M = std::make_unique<Module>("M", *TSCtx.getContext());
   ThreadSafeModule TSM(std::move(M), std::move(TSCtx));
 }
 
 TEST(ThreadSafeModuleTest, ContextOwnershipSharedByTwoModules) {
   // Test that ownership of a context can be shared between more than one
   // ThreadSafeModule.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
 
-  auto M1 = llvm::make_unique<Module>("M1", *TSCtx.getContext());
+  auto M1 = std::make_unique<Module>("M1", *TSCtx.getContext());
   ThreadSafeModule TSM1(std::move(M1), TSCtx);
 
-  auto M2 = llvm::make_unique<Module>("M2", *TSCtx.getContext());
+  auto M2 = std::make_unique<Module>("M2", *TSCtx.getContext());
   ThreadSafeModule TSM2(std::move(M2), std::move(TSCtx));
 }
 
 TEST(ThreadSafeModuleTest, ContextOwnershipSharedWithClient) {
   // Test that ownership of a context can be shared with a client-held
   // ThreadSafeContext so that it can be re-used for new modules.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
 
   {
     // Create and destroy a module.
-    auto M1 = llvm::make_unique<Module>("M1", *TSCtx.getContext());
+    auto M1 = std::make_unique<Module>("M1", *TSCtx.getContext());
     ThreadSafeModule TSM1(std::move(M1), TSCtx);
   }
 
   // Verify that the context is still available for re-use.
-  auto M2 = llvm::make_unique<Module>("M2", *TSCtx.getContext());
+  auto M2 = std::make_unique<Module>("M2", *TSCtx.getContext());
   ThreadSafeModule TSM2(std::move(M2), std::move(TSCtx));
 }
 
@@ -58,16 +58,16 @@ TEST(ThreadSafeModuleTest, ThreadSafeModuleMoveAssignment) {
   // Move assignment needs to move the module before the context (opposite
   // to the field order) to ensure that overwriting with an empty
   // ThreadSafeModule does not destroy the context early.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
-  auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+  auto M = std::make_unique<Module>("M", *TSCtx.getContext());
   ThreadSafeModule TSM(std::move(M), std::move(TSCtx));
   TSM = ThreadSafeModule();
 }
 
 TEST(ThreadSafeModuleTest, BasicContextLockAPI) {
   // Test that basic lock API calls work.
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
-  auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+  auto M = std::make_unique<Module>("M", *TSCtx.getContext());
   ThreadSafeModule TSM(std::move(M), TSCtx);
 
   { auto L = TSCtx.getLock(); }
@@ -84,10 +84,10 @@ TEST(ThreadSafeModuleTest, ContextLockPreservesContext) {
   // has been destroyed) even though all references to the context have
   // been thrown away (apart from the lock).
 
-  ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+  ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
   auto L = TSCtx.getLock();
   auto &Ctx = *TSCtx.getContext();
-  auto M = llvm::make_unique<Module>("M", Ctx);
+  auto M = std::make_unique<Module>("M", Ctx);
   TSCtx = ThreadSafeContext();
 }
 
index 9ef88e226824edbdaa14a184866cb6ea990156a2..e710f4676225c6144a3a794551ed61c384d04385 100644 (file)
@@ -32,10 +32,10 @@ std::unique_ptr<IRMutator> createInjectorMutator() {
 
   std::vector<std::unique_ptr<IRMutationStrategy>> Strategies;
   Strategies.push_back(
-      llvm::make_unique<InjectorIRStrategy>(
+      std::make_unique<InjectorIRStrategy>(
           InjectorIRStrategy::getDefaultOps()));
 
-  return llvm::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
+  return std::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
 }
 
 std::unique_ptr<IRMutator> createDeleterMutator() {
@@ -44,9 +44,9 @@ std::unique_ptr<IRMutator> createDeleterMutator() {
       Type::getInt64Ty, Type::getFloatTy, Type::getDoubleTy};
 
   std::vector<std::unique_ptr<IRMutationStrategy>> Strategies;
-  Strategies.push_back(llvm::make_unique<InstDeleterIRStrategy>());
+  Strategies.push_back(std::make_unique<InstDeleterIRStrategy>());
 
-  return llvm::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
+  return std::make_unique<IRMutator>(std::move(Types), std::move(Strategies));
 }
 
 std::unique_ptr<Module> parseAssembly(
@@ -79,7 +79,7 @@ TEST(InjectorIRStrategyTest, EmptyModule) {
   // Test that we can inject into empty module
 
   LLVMContext Ctx;
-  auto M = llvm::make_unique<Module>("M", Ctx);
+  auto M = std::make_unique<Module>("M", Ctx);
   ASSERT_TRUE(M && !verifyModule(*M, &errs()));
 
   auto Mutator = createInjectorMutator();
index 1ce598799cafa24e23b4e2c91a5fb8bf0fa668c4..424a83bb635bee973d4f17bcdc506321830a8c81 100644 (file)
@@ -20,8 +20,8 @@
 using namespace llvm;
 
 CFGHolder::CFGHolder(StringRef ModuleName, StringRef FunctionName)
-    : Context(llvm::make_unique<LLVMContext>()),
-      M(llvm::make_unique<Module>(ModuleName, *Context)) {
+    : Context(std::make_unique<LLVMContext>()),
+      M(std::make_unique<Module>(ModuleName, *Context)) {
   FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Context), {}, false);
   F = Function::Create(FTy, Function::ExternalLinkage, FunctionName, M.get());
 }
index c1bce90d69a22acd3c5e5161012f6490b7f4945c..fa0dc61d3dfcefe2a21b6c8e7686f860b330dc1f 100644 (file)
@@ -34,7 +34,7 @@ TEST(ContextAndReplaceableUsesTest, FromContext) {
 
 TEST(ContextAndReplaceableUsesTest, FromReplaceableUses) {
   LLVMContext Context;
-  ContextAndReplaceableUses CRU(make_unique<ReplaceableMetadataImpl>(Context));
+  ContextAndReplaceableUses CRU(std::make_unique<ReplaceableMetadataImpl>(Context));
   EXPECT_EQ(&Context, &CRU.getContext());
   EXPECT_TRUE(CRU.hasReplaceableUses());
   EXPECT_TRUE(CRU.getReplaceableUses());
@@ -43,7 +43,7 @@ TEST(ContextAndReplaceableUsesTest, FromReplaceableUses) {
 TEST(ContextAndReplaceableUsesTest, makeReplaceable) {
   LLVMContext Context;
   ContextAndReplaceableUses CRU(Context);
-  CRU.makeReplaceable(make_unique<ReplaceableMetadataImpl>(Context));
+  CRU.makeReplaceable(std::make_unique<ReplaceableMetadataImpl>(Context));
   EXPECT_EQ(&Context, &CRU.getContext());
   EXPECT_TRUE(CRU.hasReplaceableUses());
   EXPECT_TRUE(CRU.getReplaceableUses());
@@ -51,7 +51,7 @@ TEST(ContextAndReplaceableUsesTest, makeReplaceable) {
 
 TEST(ContextAndReplaceableUsesTest, takeReplaceableUses) {
   LLVMContext Context;
-  auto ReplaceableUses = make_unique<ReplaceableMetadataImpl>(Context);
+  auto ReplaceableUses = std::make_unique<ReplaceableMetadataImpl>(Context);
   auto *Ptr = ReplaceableUses.get();
   ContextAndReplaceableUses CRU(std::move(ReplaceableUses));
   ReplaceableUses = CRU.takeReplaceableUses();
index a76652202b815f529a9d1dc36e36bf646574cb45..fb70503209d484b072566c06cd357537ae02dbdf 100644 (file)
@@ -127,7 +127,7 @@ TEST(TimePassesTest, CustomOut) {
 
   // Setup time-passes handler and redirect output to the stream.
   std::unique_ptr<TimePassesHandler> TimePasses =
-      llvm::make_unique<TimePassesHandler>(true);
+      std::make_unique<TimePassesHandler>(true);
   TimePasses->setOutStream(ReportStream);
   TimePasses->registerCallbacks(PIC);
 
index 832e50c19ee1fc29547e2570bf7291fdae62f18d..05523c56cc2aa0295090733c4add08f2d0f5808a 100644 (file)
@@ -277,7 +277,7 @@ TEST_F(LinkModuleTest, MoveDistinctMDs) {
   EXPECT_EQ(M3, M4->getOperand(0));
 
   // Link into destination module.
-  auto Dst = llvm::make_unique<Module>("Linked", C);
+  auto Dst = std::make_unique<Module>("Linked", C);
   ASSERT_TRUE(Dst.get());
   Ctx.setDiagnosticHandlerCallBack(expectNoDiags);
   Linker::linkModules(*Dst, std::move(Src));
@@ -346,7 +346,7 @@ TEST_F(LinkModuleTest, RemangleIntrinsics) {
   ASSERT_TRUE(Bar->getFunction("llvm.memset.p0s_struct.rtx_def.0s.i32"));
 
   // Link two modules together.
-  auto Dst = llvm::make_unique<Module>("Linked", C);
+  auto Dst = std::make_unique<Module>("Linked", C);
   ASSERT_TRUE(Dst.get());
   Ctx.setDiagnosticHandlerCallBack(expectNoDiags);
   bool Failed = Linker::linkModules(*Foo, std::move(Bar));
index af1250daee5a113b574913ea79368c52d3344a46..88e9565e1ca20dd10619d8f2b061d2625075b824 100644 (file)
@@ -38,7 +38,7 @@ struct Context {
 
     MRI.reset(TheTarget->createMCRegInfo(Triple));
     MAI.reset(TheTarget->createMCAsmInfo(*MRI, Triple));
-    Ctx = llvm::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
+    Ctx = std::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
   }
 
   operator bool() { return Ctx.get(); }
index 6b94fa16bfa74b7ff17a331a56469e2fff3fc897..82e7574d15c92d7940f8c89d8e215246ddcaa58a 100644 (file)
@@ -234,12 +234,12 @@ struct CoverageMappingTest : ::testing::TestWithParam<std::pair<bool, bool>> {
       for (const auto &OF : OutputFunctions) {
         ArrayRef<OutputFunctionCoverageData> Funcs(OF);
         CoverageReaders.push_back(
-            make_unique<CoverageMappingReaderMock>(Funcs));
+            std::make_unique<CoverageMappingReaderMock>(Funcs));
       }
     } else {
       ArrayRef<OutputFunctionCoverageData> Funcs(OutputFunctions);
       CoverageReaders.push_back(
-          make_unique<CoverageMappingReaderMock>(Funcs));
+          std::make_unique<CoverageMappingReaderMock>(Funcs));
     }
     return CoverageMapping::load(CoverageReaders, *ProfileReader);
   }
index b1e515984a4ac22b85fff5d41315e078b876b195..3e862aafcf05c9db27bf1117ccb2355f92b85a06 100644 (file)
@@ -889,7 +889,7 @@ TEST_P(MaybeSparseInstrProfTest, instr_prof_bogus_symtab_empty_func_name) {
 // Testing symtab creator interface used by value profile transformer.
 TEST_P(MaybeSparseInstrProfTest, instr_prof_symtab_module_test) {
   LLVMContext Ctx;
-  std::unique_ptr<Module> M = llvm::make_unique<Module>("MyModule.cpp", Ctx);
+  std::unique_ptr<Module> M = std::make_unique<Module>("MyModule.cpp", Ctx);
   FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx),
                                         /*isVarArg=*/false);
   Function::Create(FTy, Function::ExternalLinkage, "Gfoo", M.get());
index 5291a31013ca3472bafba71acec5845cb7804d8c..6d6ecc45c902120ce546b3c1ac7fa93c95691fbb 100644 (file)
@@ -144,8 +144,8 @@ protected:
 
     for (uint32_t I = 0; I < NumEndians; ++I) {
       auto InByteStream =
-          llvm::make_unique<BinaryByteStream>(InputData, Endians[I]);
-      auto InBrokenStream = llvm::make_unique<BrokenStream>(
+          std::make_unique<BinaryByteStream>(InputData, Endians[I]);
+      auto InBrokenStream = std::make_unique<BrokenStream>(
           BrokenInputData, Endians[I], Align);
 
       Streams[I * 2].Input = std::move(InByteStream);
@@ -159,8 +159,8 @@ protected:
 
     for (uint32_t I = 0; I < NumEndians; ++I) {
       Streams[I * 2].Output =
-          llvm::make_unique<MutableBinaryByteStream>(OutputData, Endians[I]);
-      Streams[I * 2 + 1].Output = llvm::make_unique<BrokenStream>(
+          std::make_unique<MutableBinaryByteStream>(OutputData, Endians[I]);
+      Streams[I * 2 + 1].Output = std::make_unique<BrokenStream>(
           BrokenOutputData, Endians[I], Align);
     }
   }
@@ -168,8 +168,8 @@ protected:
   void initializeOutputFromInput(uint32_t Align) {
     for (uint32_t I = 0; I < NumEndians; ++I) {
       Streams[I * 2].Output =
-          llvm::make_unique<MutableBinaryByteStream>(InputData, Endians[I]);
-      Streams[I * 2 + 1].Output = llvm::make_unique<BrokenStream>(
+          std::make_unique<MutableBinaryByteStream>(InputData, Endians[I]);
+      Streams[I * 2 + 1].Output = std::make_unique<BrokenStream>(
           BrokenInputData, Endians[I], Align);
     }
   }
@@ -177,8 +177,8 @@ protected:
   void initializeInputFromOutput(uint32_t Align) {
     for (uint32_t I = 0; I < NumEndians; ++I) {
       Streams[I * 2].Input =
-          llvm::make_unique<BinaryByteStream>(OutputData, Endians[I]);
-      Streams[I * 2 + 1].Input = llvm::make_unique<BrokenStream>(
+          std::make_unique<BinaryByteStream>(OutputData, Endians[I]);
+      Streams[I * 2 + 1].Input = std::make_unique<BrokenStream>(
           BrokenOutputData, Endians[I], Align);
     }
   }
index bcdaca94a3c29743021946105bae00bf2241505e..a196fc2ec5ed37287bd4b5c8b09d850de6c45456 100644 (file)
@@ -193,12 +193,12 @@ TEST(CastingTest, dyn_cast_or_null) {
   EXPECT_NE(F5, null_foo);
 }
 
-std::unique_ptr<derived> newd() { return llvm::make_unique<derived>(); }
-std::unique_ptr<base> newb() { return llvm::make_unique<derived>(); }
+std::unique_ptr<derived> newd() { return std::make_unique<derived>(); }
+std::unique_ptr<base> newb() { return std::make_unique<derived>(); }
 
 TEST(CastingTest, unique_dyn_cast) {
   derived *OrigD = nullptr;
-  auto D = llvm::make_unique<derived>();
+  auto D = std::make_unique<derived>();
   OrigD = D.get();
 
   // Converting from D to itself is valid, it should return a new unique_ptr
index d85690d633b0136223e71b9eede0be9ff9ae4dfd..375f8960c1036301560bfa8a6f52baac6c428e6c 100644 (file)
@@ -87,9 +87,9 @@ TEST_F(FileCheckTest, NumericVariable) {
   // returns true, getValue and eval return value of expression, setValue
   // clears expression.
   std::unique_ptr<FileCheckNumericVariableUse> FooVarUsePtr =
-      llvm::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
+      std::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
   std::unique_ptr<FileCheckExpressionLiteral> One =
-      llvm::make_unique<FileCheckExpressionLiteral>(1);
+      std::make_unique<FileCheckExpressionLiteral>(1);
   FileCheckASTBinop Binop =
       FileCheckASTBinop(doAdd, std::move(FooVarUsePtr), std::move(One));
   FileCheckNumericVariable FoobarExprVar =
@@ -126,11 +126,11 @@ TEST_F(FileCheckTest, Binop) {
   FileCheckNumericVariable FooVar = FileCheckNumericVariable("FOO", 1);
   FooVar.setValue(42);
   std::unique_ptr<FileCheckNumericVariableUse> FooVarUse =
-      llvm::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
+      std::make_unique<FileCheckNumericVariableUse>("FOO", &FooVar);
   FileCheckNumericVariable BarVar = FileCheckNumericVariable("BAR", 2);
   BarVar.setValue(18);
   std::unique_ptr<FileCheckNumericVariableUse> BarVarUse =
-      llvm::make_unique<FileCheckNumericVariableUse>("BAR", &BarVar);
+      std::make_unique<FileCheckNumericVariableUse>("BAR", &BarVar);
   FileCheckASTBinop Binop =
       FileCheckASTBinop(doAdd, std::move(FooVarUse), std::move(BarVarUse));
 
@@ -453,8 +453,8 @@ TEST_F(FileCheckTest, Substitution) {
   LineVar.setValue(42);
   NVar.setValue(10);
   auto LineVarUse =
-      llvm::make_unique<FileCheckNumericVariableUse>("@LINE", &LineVar);
-  auto NVarUse = llvm::make_unique<FileCheckNumericVariableUse>("N", &NVar);
+      std::make_unique<FileCheckNumericVariableUse>("@LINE", &LineVar);
+  auto NVarUse = std::make_unique<FileCheckNumericVariableUse>("N", &NVar);
   FileCheckNumericSubstitution SubstitutionLine = FileCheckNumericSubstitution(
       &Context, "@LINE", std::move(LineVarUse), 12);
   FileCheckNumericSubstitution SubstitutionN =
index ec9dd951a9f6fadc5bfa2c8bce9e0681fca9e8f2..4562d933df7adfbadeeb9f19501fe6e6cea26da4 100644 (file)
@@ -273,7 +273,7 @@ static bool runAndGetCommandOutput(
     Size = ::lseek(FD, 0, SEEK_END);
     ASSERT_NE(-1, Size);
     ::lseek(FD, 0, SEEK_SET);
-    Buffer = llvm::make_unique<char[]>(Size);
+    Buffer = std::make_unique<char[]>(Size);
     ASSERT_EQ(::read(FD, Buffer.get(), Size), Size);
     ::close(FD);
 
index 9b10daa86e8c28ee90224d5d1732055fcc8035ed..42b3fcdbd535ff12f53c13ab3846dca86f49d934 100644 (file)
@@ -22,7 +22,7 @@ protected:
   std::unique_ptr<TrigramIndex> makeTrigramIndex(
       std::vector<std::string> Rules) {
     std::unique_ptr<TrigramIndex> TI =
-        make_unique<TrigramIndex>();
+        std::make_unique<TrigramIndex>();
     for (auto &Rule : Rules)
       TI->insert(Rule);
     return TI;
index e02f68f2acea05b33b84c30f384bafd6c8ec749f..0c9df11703172231c62ed0aa30a67aa609f2f91f 100644 (file)
@@ -2841,19 +2841,19 @@ template <> struct PolymorphicTraits<std::unique_ptr<Poly>> {
 
   static Scalar &getAsScalar(std::unique_ptr<Poly> &N) {
     if (!N || !isa<Scalar>(*N))
-      N = llvm::make_unique<Scalar>();
+      N = std::make_unique<Scalar>();
     return *cast<Scalar>(N.get());
   }
 
   static Seq &getAsSequence(std::unique_ptr<Poly> &N) {
     if (!N || !isa<Seq>(*N))
-      N = llvm::make_unique<Seq>();
+      N = std::make_unique<Seq>();
     return *cast<Seq>(N.get());
   }
 
   static Map &getAsMap(std::unique_ptr<Poly> &N) {
     if (!N || !isa<Map>(*N))
-      N = llvm::make_unique<Map>();
+      N = std::make_unique<Map>();
     return *cast<Map>(N.get());
   }
 };
@@ -2932,7 +2932,7 @@ template <> struct SequenceTraits<Seq> {
 
 TEST(YAMLIO, TestReadWritePolymorphicScalar) {
   std::string intermediate;
-  std::unique_ptr<Poly> node = llvm::make_unique<Scalar>(true);
+  std::unique_ptr<Poly> node = std::make_unique<Scalar>(true);
 
   llvm::raw_string_ostream ostr(intermediate);
   Output yout(ostr);
@@ -2946,9 +2946,9 @@ TEST(YAMLIO, TestReadWritePolymorphicScalar) {
 TEST(YAMLIO, TestReadWritePolymorphicSeq) {
   std::string intermediate;
   {
-    auto seq = llvm::make_unique<Seq>();
-    seq->push_back(llvm::make_unique<Scalar>(true));
-    seq->push_back(llvm::make_unique<Scalar>(1.0));
+    auto seq = std::make_unique<Seq>();
+    seq->push_back(std::make_unique<Scalar>(true));
+    seq->push_back(std::make_unique<Scalar>(1.0));
     auto node = llvm::unique_dyn_cast<Poly>(seq);
 
     llvm::raw_string_ostream ostr(intermediate);
@@ -2978,9 +2978,9 @@ TEST(YAMLIO, TestReadWritePolymorphicSeq) {
 TEST(YAMLIO, TestReadWritePolymorphicMap) {
   std::string intermediate;
   {
-    auto map = llvm::make_unique<Map>();
-    (*map)["foo"] = llvm::make_unique<Scalar>(false);
-    (*map)["bar"] = llvm::make_unique<Scalar>(2.0);
+    auto map = std::make_unique<Map>();
+    (*map)["foo"] = std::make_unique<Scalar>(false);
+    (*map)["bar"] = std::make_unique<Scalar>(2.0);
     std::unique_ptr<Poly> node = llvm::unique_dyn_cast<Poly>(map);
 
     llvm::raw_string_ostream ostr(intermediate);
index a70f43c43796bfdd3bc743eef67e6d0599990608..8214d4f411363f14be612b363c5f3f590e68e489 100644 (file)
@@ -30,7 +30,7 @@ std::unique_ptr<LLVMTargetMachine> createTargetMachine() {
 std::unique_ptr<AArch64InstrInfo> createInstrInfo(TargetMachine *TM) {
   AArch64Subtarget ST(TM->getTargetTriple(), TM->getTargetCPU(),
                       TM->getTargetFeatureString(), *TM, /* isLittle */ false);
-  return llvm::make_unique<AArch64InstrInfo>(ST);
+  return std::make_unique<AArch64InstrInfo>(ST);
 }
 
 /// The \p InputIRSnippet is only needed for things that can't be expressed in
index 690f4340068422a60ee337ea5f83cd7124f8d6d3..a586ac7bb20ae2f1e69d5eef199ca9d2dcfce4b5 100644 (file)
@@ -66,9 +66,9 @@ TEST(ValueMapperTest, mapMDNodeCycle) {
 TEST(ValueMapperTest, mapMDNodeDuplicatedCycle) {
   LLVMContext Context;
   auto *PtrTy = Type::getInt8Ty(Context)->getPointerTo();
-  std::unique_ptr<GlobalVariable> G0 = llvm::make_unique<GlobalVariable>(
+  std::unique_ptr<GlobalVariable> G0 = std::make_unique<GlobalVariable>(
       PtrTy, false, GlobalValue::ExternalLinkage, nullptr, "G0");
-  std::unique_ptr<GlobalVariable> G1 = llvm::make_unique<GlobalVariable>(
+  std::unique_ptr<GlobalVariable> G1 = std::make_unique<GlobalVariable>(
       PtrTy, false, GlobalValue::ExternalLinkage, nullptr, "G1");
 
   // Create a cycle that references G0.
index 3ee811a68302f49a0b5a4b245acc383e89c9fbfc..d0bf3cf1a65fbdcd09fbfd5eec1f1efc2952866b 100644 (file)
@@ -48,7 +48,7 @@ protected:
   VPlanPtr buildHCFG(BasicBlock *LoopHeader) {
     doAnalysis(*LoopHeader->getParent());
 
-    auto Plan = llvm::make_unique<VPlan>();
+    auto Plan = std::make_unique<VPlan>();
     VPlanHCFGBuilder HCFGBuilder(LI->getLoopFor(LoopHeader), LI.get(), *Plan);
     HCFGBuilder.buildHierarchicalCFG();
     return Plan;
@@ -58,7 +58,7 @@ protected:
   VPlanPtr buildPlainCFG(BasicBlock *LoopHeader) {
     doAnalysis(*LoopHeader->getParent());
 
-    auto Plan = llvm::make_unique<VPlan>();
+    auto Plan = std::make_unique<VPlan>();
     VPlanHCFGBuilder HCFGBuilder(LI->getLoopFor(LoopHeader), LI.get(), *Plan);
     VPRegionBlock *TopRegion = HCFGBuilder.buildPlainCFG();
     Plan->setEntry(TopRegion);
index e1fa0e345d2fd2c8631cb7171a2e6ba033a190e2..6eff4dfcc505f874a518a2ceba96179d4910fa60 100644 (file)
@@ -34,43 +34,43 @@ using ::testing::SizeIs;
 template <class RecordType> std::unique_ptr<Record> MakeRecord();
 
 template <> std::unique_ptr<Record> MakeRecord<NewBufferRecord>() {
-  return make_unique<NewBufferRecord>(1);
+  return std::make_unique<NewBufferRecord>(1);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<NewCPUIDRecord>() {
-  return make_unique<NewCPUIDRecord>(1, 2);
+  return std::make_unique<NewCPUIDRecord>(1, 2);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<TSCWrapRecord>() {
-  return make_unique<TSCWrapRecord>(1);
+  return std::make_unique<TSCWrapRecord>(1);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<WallclockRecord>() {
-  return make_unique<WallclockRecord>(1, 2);
+  return std::make_unique<WallclockRecord>(1, 2);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<CustomEventRecord>() {
-  return make_unique<CustomEventRecord>(4, 1, 2, "data");
+  return std::make_unique<CustomEventRecord>(4, 1, 2, "data");
 }
 
 template <> std::unique_ptr<Record> MakeRecord<CallArgRecord>() {
-  return make_unique<CallArgRecord>(1);
+  return std::make_unique<CallArgRecord>(1);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<PIDRecord>() {
-  return make_unique<PIDRecord>(1);
+  return std::make_unique<PIDRecord>(1);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<FunctionRecord>() {
-  return make_unique<FunctionRecord>(RecordTypes::ENTER, 1, 2);
+  return std::make_unique<FunctionRecord>(RecordTypes::ENTER, 1, 2);
 }
 
 template <> std::unique_ptr<Record> MakeRecord<CustomEventRecordV5>() {
-  return make_unique<CustomEventRecordV5>(4, 1, "data");
+  return std::make_unique<CustomEventRecordV5>(4, 1, "data");
 }
 
 template <> std::unique_ptr<Record> MakeRecord<TypedEventRecord>() {
-  return make_unique<TypedEventRecord>(4, 1, 2, "data");
+  return std::make_unique<TypedEventRecord>(4, 1, 2, "data");
 }
 
 template <class T> class RoundTripTest : public ::testing::Test {
@@ -82,7 +82,7 @@ public:
     H.NonstopTSC = true;
     H.CycleFrequency = 3e9;
 
-    Writer = make_unique<FDRTraceWriter>(OS, H);
+    Writer = std::make_unique<FDRTraceWriter>(OS, H);
     Rec = MakeRecord<T>();
   }
 
@@ -105,7 +105,7 @@ public:
     H.NonstopTSC = true;
     H.CycleFrequency = 3e9;
 
-    Writer = make_unique<FDRTraceWriter>(OS, H);
+    Writer = std::make_unique<FDRTraceWriter>(OS, H);
     Rec = MakeRecord<T>();
   }
 
index 39c1e866f04e74e3a9ab7e58cdd5489bb7955700..bfee1c5d388c4a3a37f1cd550c33633c1d86251e 100644 (file)
@@ -22,7 +22,7 @@ template <class RecordType> struct Helper {};
 
 template <> struct Helper<BufferExtents> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<BufferExtents>(1);
+    return std::make_unique<BufferExtents>(1);
   }
 
   static const char *expected() { return "<Buffer: size = 1 bytes>"; }
@@ -30,7 +30,7 @@ template <> struct Helper<BufferExtents> {
 
 template <> struct Helper<WallclockRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<WallclockRecord>(1, 2);
+    return std::make_unique<WallclockRecord>(1, 2);
   }
 
   static const char *expected() { return "<Wall Time: seconds = 1.000002>"; }
@@ -38,7 +38,7 @@ template <> struct Helper<WallclockRecord> {
 
 template <> struct Helper<NewCPUIDRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<NewCPUIDRecord>(1, 2);
+    return std::make_unique<NewCPUIDRecord>(1, 2);
   }
 
   static const char *expected() { return "<CPU: id = 1, tsc = 2>"; }
@@ -46,7 +46,7 @@ template <> struct Helper<NewCPUIDRecord> {
 
 template <> struct Helper<TSCWrapRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<TSCWrapRecord>(1);
+    return std::make_unique<TSCWrapRecord>(1);
   }
 
   static const char *expected() { return "<TSC Wrap: base = 1>"; }
@@ -54,7 +54,7 @@ template <> struct Helper<TSCWrapRecord> {
 
 template <> struct Helper<CustomEventRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<CustomEventRecord>(4, 1, 2, "data");
+    return std::make_unique<CustomEventRecord>(4, 1, 2, "data");
   }
 
   static const char *expected() {
@@ -64,7 +64,7 @@ template <> struct Helper<CustomEventRecord> {
 
 template <> struct Helper<CallArgRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<CallArgRecord>(1);
+    return std::make_unique<CallArgRecord>(1);
   }
 
   static const char *expected() {
@@ -74,7 +74,7 @@ template <> struct Helper<CallArgRecord> {
 
 template <> struct Helper<PIDRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<PIDRecord>(1);
+    return std::make_unique<PIDRecord>(1);
   }
 
   static const char *expected() { return "<PID: 1>"; }
@@ -82,7 +82,7 @@ template <> struct Helper<PIDRecord> {
 
 template <> struct Helper<NewBufferRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<NewBufferRecord>(1);
+    return std::make_unique<NewBufferRecord>(1);
   }
 
   static const char *expected() { return "<Thread ID: 1>"; }
@@ -90,7 +90,7 @@ template <> struct Helper<NewBufferRecord> {
 
 template <> struct Helper<EndBufferRecord> {
   static std::unique_ptr<Record> construct() {
-    return make_unique<EndBufferRecord>();
+    return std::make_unique<EndBufferRecord>();
   }
 
   static const char *expected() { return "<End of Buffer>"; }
index 146d10835b8db02c1c449bcf6c125382886b5f61..f285b1d6767058e40bd0bddbf8e62b43ada12389 100644 (file)
@@ -1515,7 +1515,7 @@ void AsmMatcherInfo::buildInfo() {
       if (!V.empty() && V != Variant.Name)
         continue;
 
-      auto II = llvm::make_unique<MatchableInfo>(*CGI);
+      auto II = std::make_unique<MatchableInfo>(*CGI);
 
       II->initialize(*this, SingletonRegisters, Variant, HasMnemonicFirst);
 
@@ -1532,7 +1532,7 @@ void AsmMatcherInfo::buildInfo() {
     std::vector<Record*> AllInstAliases =
       Records.getAllDerivedDefinitions("InstAlias");
     for (unsigned i = 0, e = AllInstAliases.size(); i != e; ++i) {
-      auto Alias = llvm::make_unique<CodeGenInstAlias>(AllInstAliases[i],
+      auto Alias = std::make_unique<CodeGenInstAlias>(AllInstAliases[i],
                                                        Target);
 
       // If the tblgen -match-prefix option is specified (for tblgen hackers),
@@ -1546,7 +1546,7 @@ void AsmMatcherInfo::buildInfo() {
       if (!V.empty() && V != Variant.Name)
         continue;
 
-      auto II = llvm::make_unique<MatchableInfo>(std::move(Alias));
+      auto II = std::make_unique<MatchableInfo>(std::move(Alias));
 
       II->initialize(*this, SingletonRegisters, Variant, HasMnemonicFirst);
 
@@ -1615,7 +1615,7 @@ void AsmMatcherInfo::buildInfo() {
           II->TheDef->getValueAsString("TwoOperandAliasConstraint");
       if (Constraint != "") {
         // Start by making a copy of the original matchable.
-        auto AliasII = llvm::make_unique<MatchableInfo>(*II);
+        auto AliasII = std::make_unique<MatchableInfo>(*II);
 
         // Adjust it to be a two-operand alias.
         AliasII->formTwoOperandAlias(Constraint);
index de42365597140be7e91f36663fe0859728283096..c0e38c032e8710b87d470896837d6042e37a254f 100644 (file)
@@ -3101,7 +3101,7 @@ void CodeGenDAGPatterns::ParsePatternFragments(bool OutFrags) {
 
     ListInit *LI = Frag->getValueAsListInit("Fragments");
     TreePattern *P =
-        (PatternFragments[Frag] = llvm::make_unique<TreePattern>(
+        (PatternFragments[Frag] = std::make_unique<TreePattern>(
              Frag, LI, !Frag->isSubClassOf("OutPatFrag"),
              *this)).get();
 
index 9325c4641442f5ed9b646b39ce75a4e34bd3a764..689809a5cf76a17ff3c8f575eed31093d94731f7 100644 (file)
@@ -670,7 +670,7 @@ struct TupleExpander : SetTheory::Expander {
       // is only for consumption by CodeGenRegister, it is not added to the
       // RecordKeeper.
       SynthDefs.emplace_back(
-          llvm::make_unique<Record>(Name, Def->getLoc(), Def->getRecords()));
+          std::make_unique<Record>(Name, Def->getLoc(), Def->getRecords()));
       Record *NewReg = SynthDefs.back().get();
       Elts.insert(NewReg);
 
@@ -1098,7 +1098,7 @@ CodeGenRegBank::CodeGenRegBank(RecordKeeper &Records,
   Sets.addFieldExpander("RegisterClass", "MemberList");
   Sets.addFieldExpander("CalleeSavedRegs", "SaveList");
   Sets.addExpander("RegisterTuples",
-                   llvm::make_unique<TupleExpander>(SynthDefs));
+                   std::make_unique<TupleExpander>(SynthDefs));
 
   // Read in the user-defined (named) sub-register indices.
   // More indices will be synthesized later.
index fd007044a16e32623ed45e0aade740d38dc9a954..cb05f78fba411c53f2e4cf4c698947bda6cb8bd4 100644 (file)
@@ -172,8 +172,8 @@ CodeGenSchedModels::CodeGenSchedModels(RecordKeeper &RK,
 
   // Allow Set evaluation to recognize the dags used in InstRW records:
   // (instrs Op1, Op1...)
-  Sets.addOperator("instrs", llvm::make_unique<InstrsOp>());
-  Sets.addOperator("instregex", llvm::make_unique<InstRegexOp>(Target));
+  Sets.addOperator("instrs", std::make_unique<InstrsOp>());
+  Sets.addOperator("instregex", std::make_unique<InstRegexOp>(Target));
 
   // Instantiate a CodeGenProcModel for each SchedMachineModel with the values
   // that are explicitly referenced in tablegen records. Resources associated
index 05f9f22e2820880d34ef4823fe282072a23ba24e..2f8efbed410f6aab58f7ecd35d36111edbdb8d1c 100644 (file)
@@ -289,7 +289,7 @@ Record *CodeGenTarget::getAsmWriter() const {
 
 CodeGenRegBank &CodeGenTarget::getRegBank() const {
   if (!RegBank)
-    RegBank = llvm::make_unique<CodeGenRegBank>(Records, getHwModes());
+    RegBank = std::make_unique<CodeGenRegBank>(Records, getHwModes());
   return *RegBank;
 }
 
@@ -339,7 +339,7 @@ void CodeGenTarget::ReadLegalValueTypes() const {
 
 CodeGenSchedModels &CodeGenTarget::getSchedModels() const {
   if (!SchedModels)
-    SchedModels = llvm::make_unique<CodeGenSchedModels>(Records, *this);
+    SchedModels = std::make_unique<CodeGenSchedModels>(Records, *this);
   return *SchedModels;
 }
 
@@ -352,7 +352,7 @@ void CodeGenTarget::ReadInstructions() const {
 
   // Parse the instructions defined in the .td file.
   for (unsigned i = 0, e = Insts.size(); i != e; ++i)
-    Instructions[Insts[i]] = llvm::make_unique<CodeGenInstruction>(Insts[i]);
+    Instructions[Insts[i]] = std::make_unique<CodeGenInstruction>(Insts[i]);
 }
 
 static const CodeGenInstruction *
index fb0c6faa52957cc5173b9df22458b96b3d835ff8..d8e78ce55c7b660382630cd998421a2ce7b8746b 100644 (file)
@@ -173,7 +173,7 @@ void DAGISelEmitter::run(raw_ostream &OS) {
   }
 
   std::unique_ptr<Matcher> TheMatcher =
-    llvm::make_unique<ScopeMatcher>(PatternMatchers);
+    std::make_unique<ScopeMatcher>(PatternMatchers);
 
   OptimizeMatcher(TheMatcher, CGP);
   //Matcher->dump();
index cfe06dd4d7fb54b1d30dda0e69d896584c95933d..dc9dfa8ff5e44f54fe59e8605dab8e1c9ec798cf 100644 (file)
@@ -600,7 +600,7 @@ void Filter::recurse() {
     // Delegates to an inferior filter chooser for further processing on this
     // group of instructions whose segment values are variable.
     FilterChooserMap.insert(
-        std::make_pair(-1U, llvm::make_unique<FilterChooser>(
+        std::make_pair(-1U, std::make_unique<FilterChooser>(
                                 Owner->AllInstructions, VariableInstructions,
                                 Owner->Operands, BitValueArray, *Owner)));
   }
@@ -626,7 +626,7 @@ void Filter::recurse() {
     // Delegates to an inferior filter chooser for further processing on this
     // category of instructions.
     FilterChooserMap.insert(std::make_pair(
-        Inst.first, llvm::make_unique<FilterChooser>(
+        Inst.first, std::make_unique<FilterChooser>(
                                 Owner->AllInstructions, Inst.second,
                                 Owner->Operands, BitValueArray, *Owner)));
   }
index 06cdfd4ab5970c5f0eb4519c47e7c37473cd956e..aba2b9c3a6215cf7eb576cc6b03aa92a916d25cf 100644 (file)
@@ -1450,7 +1450,7 @@ public:
   Optional<Kind *> addPredicate(Args &&... args) {
     if (isSameAsAnotherOperand())
       return None;
-    Predicates.emplace_back(llvm::make_unique<Kind>(
+    Predicates.emplace_back(std::make_unique<Kind>(
         getInsnVarID(), getOpIdx(), std::forward<Args>(args)...));
     return static_cast<Kind *>(Predicates.back().get());
   }
@@ -1999,7 +1999,7 @@ public:
   template <class Kind, class... Args>
   Optional<Kind *> addPredicate(Args &&... args) {
     Predicates.emplace_back(
-        llvm::make_unique<Kind>(getInsnVarID(), std::forward<Args>(args)...));
+        std::make_unique<Kind>(getInsnVarID(), std::forward<Args>(args)...));
     return static_cast<Kind *>(Predicates.back().get());
   }
 
@@ -2662,7 +2662,7 @@ public:
   template <class Kind, class... Args>
   Kind &addRenderer(Args&&... args) {
     OperandRenderers.emplace_back(
-        llvm::make_unique<Kind>(InsnID, std::forward<Args>(args)...));
+        std::make_unique<Kind>(InsnID, std::forward<Args>(args)...));
     return *static_cast<Kind *>(OperandRenderers.back().get());
   }
 
@@ -2823,7 +2823,7 @@ const std::vector<Record *> &RuleMatcher::getRequiredFeatures() const {
 // iterator.
 template <class Kind, class... Args>
 Kind &RuleMatcher::addAction(Args &&... args) {
-  Actions.emplace_back(llvm::make_unique<Kind>(std::forward<Args>(args)...));
+  Actions.emplace_back(std::make_unique<Kind>(std::forward<Args>(args)...));
   return *static_cast<Kind *>(Actions.back().get());
 }
 
@@ -2838,7 +2838,7 @@ template <class Kind, class... Args>
 action_iterator RuleMatcher::insertAction(action_iterator InsertPt,
                                           Args &&... args) {
   return Actions.emplace(InsertPt,
-                         llvm::make_unique<Kind>(std::forward<Args>(args)...));
+                         std::make_unique<Kind>(std::forward<Args>(args)...));
 }
 
 unsigned RuleMatcher::implicitlyDefineInsnVar(InstructionMatcher &Matcher) {
@@ -4289,7 +4289,7 @@ std::vector<Matcher *> GlobalISelEmitter::optimizeRules(
     std::vector<std::unique_ptr<Matcher>> &MatcherStorage) {
 
   std::vector<Matcher *> OptRules;
-  std::unique_ptr<GroupT> CurrentGroup = make_unique<GroupT>();
+  std::unique_ptr<GroupT> CurrentGroup = std::make_unique<GroupT>();
   assert(CurrentGroup->empty() && "Newly created group isn't empty!");
   unsigned NumGroups = 0;
 
@@ -4310,7 +4310,7 @@ std::vector<Matcher *> GlobalISelEmitter::optimizeRules(
       MatcherStorage.emplace_back(std::move(CurrentGroup));
       ++NumGroups;
     }
-    CurrentGroup = make_unique<GroupT>();
+    CurrentGroup = std::make_unique<GroupT>();
   };
   for (Matcher *Rule : Rules) {
     // Greedily add as many matchers as possible to the current group:
index 954b63e7253cd3972be87500e07ddc3c4a8916fa..e274415f3ed0655fd8fbd9f7c2715b088137947f 100644 (file)
@@ -134,7 +134,7 @@ private:
   CodeGenIntrinsic &getIntrinsic(Init *I) {
     std::unique_ptr<CodeGenIntrinsic> &Intr = Intrinsics[I];
     if (!Intr)
-      Intr = make_unique<CodeGenIntrinsic>(cast<DefInit>(I)->getDef());
+      Intr = std::make_unique<CodeGenIntrinsic>(cast<DefInit>(I)->getDef());
     return *Intr;
   }
 
@@ -541,7 +541,7 @@ std::unique_ptr<SearchIndex>
 SearchableTableEmitter::parseSearchIndex(GenericTable &Table, StringRef Name,
                                          const std::vector<StringRef> &Key,
                                          bool EarlyOut) {
-  auto Index = llvm::make_unique<SearchIndex>();
+  auto Index = std::make_unique<SearchIndex>();
   Index->Name = Name;
   Index->EarlyOut = EarlyOut;
 
@@ -577,7 +577,7 @@ void SearchableTableEmitter::collectEnumEntries(
     if (!ValueField.empty())
       Value = getInt(EntryRec, ValueField);
 
-    Enum.Entries.push_back(llvm::make_unique<GenericEnum::Entry>(Name, Value));
+    Enum.Entries.push_back(std::make_unique<GenericEnum::Entry>(Name, Value));
     Enum.EntryMap.insert(std::make_pair(EntryRec, Enum.Entries.back().get()));
   }
 
@@ -647,7 +647,7 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
     if (!EnumRec->isValueUnset("ValueField"))
       ValueField = EnumRec->getValueAsString("ValueField");
 
-    auto Enum = llvm::make_unique<GenericEnum>();
+    auto Enum = std::make_unique<GenericEnum>();
     Enum->Name = EnumRec->getName();
     Enum->PreprocessorGuard = EnumRec->getName();
 
@@ -664,7 +664,7 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
   }
 
   for (auto TableRec : Records.getAllDerivedDefinitions("GenericTable")) {
-    auto Table = llvm::make_unique<GenericTable>();
+    auto Table = std::make_unique<GenericTable>();
     Table->Name = TableRec->getName();
     Table->PreprocessorGuard = TableRec->getName();
     Table->CppTypeName = TableRec->getValueAsString("CppTypeName");
@@ -733,7 +733,7 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
       if (!Class->isValueUnset("EnumValueField"))
         ValueField = Class->getValueAsString("EnumValueField");
 
-      auto Enum = llvm::make_unique<GenericEnum>();
+      auto Enum = std::make_unique<GenericEnum>();
       Enum->Name = (Twine(Class->getName()) + "Values").str();
       Enum->PreprocessorGuard = Class->getName().upper();
       Enum->Class = Class;
@@ -743,7 +743,7 @@ void SearchableTableEmitter::run(raw_ostream &OS) {
       Enums.emplace_back(std::move(Enum));
     }
 
-    auto Table = llvm::make_unique<GenericTable>();
+    auto Table = std::make_unique<GenericTable>();
     Table->Name = (Twine(Class->getName()) + "sList").str();
     Table->PreprocessorGuard = Class->getName().upper();
     Table->CppTypeName = Class->getName();
index 8036aecc4f4bc22abd44287d48996e2c663c0ec4..14bce4c2944624f8112a2bc57bf1eb0ebd0bc8cc 100644 (file)
@@ -651,7 +651,7 @@ static const char* stringForDecisionType(ModRMDecisionType dt) {
 
 DisassemblerTables::DisassemblerTables() {
   for (unsigned i = 0; i < array_lengthof(Tables); i++)
-    Tables[i] = llvm::make_unique<ContextDecision>();
+    Tables[i] = std::make_unique<ContextDecision>();
 
   HasConflicts = false;
 }
index 37bf3b82b01134f2f828a434db540d7f451f64f7..33dc6f3f9e2347cdeed311fea085f89cc4be944e 100644 (file)
@@ -749,7 +749,7 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
   case X86Local::RawFrmImm8:
   case X86Local::RawFrmImm16:
   case X86Local::AddCCFrm:
-    filter = llvm::make_unique<DumbFilter>();
+    filter = std::make_unique<DumbFilter>();
     break;
   case X86Local::MRMDestReg:
   case X86Local::MRMSrcReg:
@@ -758,7 +758,7 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
   case X86Local::MRMSrcRegCC:
   case X86Local::MRMXrCC:
   case X86Local::MRMXr:
-    filter = llvm::make_unique<ModFilter>(true);
+    filter = std::make_unique<ModFilter>(true);
     break;
   case X86Local::MRMDestMem:
   case X86Local::MRMSrcMem:
@@ -767,22 +767,22 @@ void RecognizableInstr::emitDecodePath(DisassemblerTables &tables) const {
   case X86Local::MRMSrcMemCC:
   case X86Local::MRMXmCC:
   case X86Local::MRMXm:
-    filter = llvm::make_unique<ModFilter>(false);
+    filter = std::make_unique<ModFilter>(false);
     break;
   case X86Local::MRM0r: case X86Local::MRM1r:
   case X86Local::MRM2r: case X86Local::MRM3r:
   case X86Local::MRM4r: case X86Local::MRM5r:
   case X86Local::MRM6r: case X86Local::MRM7r:
-    filter = llvm::make_unique<ExtendedFilter>(true, Form - X86Local::MRM0r);
+    filter = std::make_unique<ExtendedFilter>(true, Form - X86Local::MRM0r);
     break;
   case X86Local::MRM0m: case X86Local::MRM1m:
   case X86Local::MRM2m: case X86Local::MRM3m:
   case X86Local::MRM4m: case X86Local::MRM5m:
   case X86Local::MRM6m: case X86Local::MRM7m:
-    filter = llvm::make_unique<ExtendedFilter>(false, Form - X86Local::MRM0m);
+    filter = std::make_unique<ExtendedFilter>(false, Form - X86Local::MRM0m);
     break;
   X86_INSTR_MRM_MAPPING
-    filter = llvm::make_unique<ExactFilter>(0xC0 + Form - X86Local::MRM_C0);
+    filter = std::make_unique<ExactFilter>(0xC0 + Form - X86Local::MRM_C0);
     break;
   } // switch (Form)