Lines Matching full:auto
57 for (auto *Arg : HelperPrefixArgs) in addHelperAndWrapper()
59 for (auto *T : WrapperFnType->params()) in addHelperAndWrapper()
61 auto *HelperFnType = in addHelperAndWrapper()
63 auto *HelperFn = Function::Create(HelperFnType, GlobalValue::ExternalLinkage, in addHelperAndWrapper()
66 auto *WrapperFn = Function::Create( in addHelperAndWrapper()
70 auto *EntryBlock = BasicBlock::Create(M.getContext(), "entry", WrapperFn); in addHelperAndWrapper()
74 for (auto *Arg : HelperPrefixArgs) in addHelperAndWrapper()
76 for (auto &Arg : WrapperFn->args()) in addHelperAndWrapper()
78 auto *HelperResult = IB.CreateCall(HelperFn, HelperArgs); in addHelperAndWrapper()
168 auto Ctx = std::make_unique<LLVMContext>(); in setupJITDylib()
169 auto M = std::make_unique<Module>("__standard_lib", *Ctx); in setupJITDylib()
172 auto *Int64Ty = Type::getInt64Ty(*Ctx); in setupJITDylib()
173 auto *DSOHandle = new GlobalVariable( in setupJITDylib()
181 auto *GenericIRPlatformSupportTy = in setupJITDylib()
184 auto *PlatformInstanceDecl = new GlobalVariable( in setupJITDylib()
188 auto *VoidTy = Type::getVoidTy(*Ctx); in setupJITDylib()
194 auto *IntTy = Type::getIntNTy(*Ctx, sizeof(int) * CHAR_BIT); in setupJITDylib()
195 auto *AtExitCallbackTy = FunctionType::get(VoidTy, {}, false); in setupJITDylib()
196 auto *AtExitCallbackPtrTy = PointerType::getUnqual(AtExitCallbackTy); in setupJITDylib()
206 auto &JD = RT.getJITDylib(); in notifyAdding()
207 if (auto &InitSym = MU.getInitializerSymbol()) in notifyAdding()
215 for (auto &KV : MU.getSymbols()) in notifyAdding()
231 if (auto Initializers = getInitializers(JD)) { in initialize()
234 for (auto InitFnAddr : *Initializers) { in initialize()
239 auto *InitFn = InitFnAddr.toPtr<void (*)()>(); in initialize()
251 if (auto Deinitializers = getDeinitializers(JD)) { in deinitialize()
255 for (auto DeinitFnAddr : *Deinitializers) { in deinitialize()
260 auto *DeinitFn = DeinitFnAddr.toPtr<void (*)()>(); in deinitialize()
282 if (auto Err = issueInitLookups(JD)) in getInitializers()
288 if (auto Err = getExecutionSession().runSessionLocked([&]() -> Error { in getInitializers()
289 if (auto DFSLinkOrderOrErr = JD.getDFSLinkOrder()) in getInitializers()
294 for (auto &NextJD : DFSLinkOrder) { in getInitializers()
295 auto IFItr = InitFunctions.find(NextJD.get()); in getInitializers()
307 for (auto &JD : llvm::reverse(DFSLinkOrder)) in getInitializers()
311 for (auto &KV : LookupSymbols) in getInitializers()
315 auto &ES = getExecutionSession(); in getInitializers()
316 auto LookupResult = Platform::lookupInitSymbols(ES, LookupSymbols); in getInitializers()
323 auto &NextJD = *DFSLinkOrder.back(); in getInitializers()
325 auto InitsItr = LookupResult->find(&NextJD); in getInitializers()
328 for (auto &KV : InitsItr->second) in getInitializers()
336 auto &ES = getExecutionSession(); in getDeinitializers()
338 auto LLJITRunAtExits = J.mangleAndIntern("__lljit_run_atexits"); in getDeinitializers()
343 if (auto Err = ES.runSessionLocked([&]() -> Error { in getDeinitializers()
344 if (auto DFSLinkOrderOrErr = JD.getDFSLinkOrder()) in getDeinitializers()
349 for (auto &NextJD : DFSLinkOrder) { in getDeinitializers()
350 auto &JDLookupSymbols = LookupSymbols[NextJD.get()]; in getDeinitializers()
351 auto DIFItr = DeInitFunctions.find(NextJD.get()); in getDeinitializers()
365 for (auto &JD : DFSLinkOrder) in getDeinitializers()
369 for (auto &KV : LookupSymbols) in getDeinitializers()
373 auto LookupResult = Platform::lookupInitSymbols(ES, LookupSymbols); in getDeinitializers()
379 for (auto &NextJD : DFSLinkOrder) { in getDeinitializers()
380 auto DeInitsItr = LookupResult->find(NextJD.get()); in getDeinitializers()
384 auto RunAtExitsItr = DeInitsItr->second.find(LLJITRunAtExits); in getDeinitializers()
388 for (auto &KV : DeInitsItr->second) in getDeinitializers()
402 if (auto Err = getExecutionSession().runSessionLocked([&]() -> Error { in issueInitLookups()
403 if (auto DFSLinkOrderOrErr = JD.getDFSLinkOrder()) in issueInitLookups()
408 for (auto &NextJD : DFSLinkOrder) { in issueInitLookups()
409 auto ISItr = InitSymbols.find(NextJD.get()); in issueInitLookups()
455 auto Ctx = std::make_unique<LLVMContext>(); in createPlatformRuntimeModule()
456 auto M = std::make_unique<Module>("__standard_lib", *Ctx); in createPlatformRuntimeModule()
459 auto *GenericIRPlatformSupportTy = in createPlatformRuntimeModule()
462 auto *PlatformInstanceDecl = new GlobalVariable( in createPlatformRuntimeModule()
466 auto *Int8Ty = Type::getInt8Ty(*Ctx); in createPlatformRuntimeModule()
467 auto *IntTy = Type::getIntNTy(*Ctx, sizeof(int) * CHAR_BIT); in createPlatformRuntimeModule()
468 auto *VoidTy = Type::getVoidTy(*Ctx); in createPlatformRuntimeModule()
469 auto *BytePtrTy = PointerType::getUnqual(Int8Ty); in createPlatformRuntimeModule()
470 auto *CxaAtExitCallbackTy = FunctionType::get(VoidTy, {BytePtrTy}, false); in createPlatformRuntimeModule()
471 auto *CxaAtExitCallbackPtrTy = PointerType::getUnqual(CxaAtExitCallbackTy); in createPlatformRuntimeModule()
508 auto Err = TSM.withModuleDo([&](Module &M) -> Error { in operator ()()
509 auto &Ctx = M.getContext(); in operator ()()
510 auto *GlobalCtors = M.getNamedGlobal("llvm.global_ctors"); in operator ()()
511 auto *GlobalDtors = M.getNamedGlobal("llvm.global_dtors"); in operator ()()
513 auto RegisterCOrDtors = [&](GlobalVariable *GlobalCOrDtors, in operator ()()
527 auto InternedInitOrDeInitName = Mangle(InitOrDeInitFunctionName); in operator ()()
528 if (auto Err = R.defineMaterializing( in operator ()()
532 auto *InitOrDeInitFunc = Function::Create( in operator ()()
537 auto COrDtors = isCtor ? getConstructors(M) : getDestructors(M); in operator ()()
539 for (auto E : COrDtors) in operator ()()
543 auto *InitOrDeInitFuncEntryBlock = in operator ()()
546 for (auto &KV : InitsOrDeInits) in operator ()()
559 if (auto Err = RegisterCOrDtors(GlobalCtors, true)) in operator ()()
561 if (auto Err = RegisterCOrDtors(GlobalDtors, false)) in operator ()()
611 auto &ES = J.getExecutionSession(); in initialize()
612 auto MainSearchOrder = J.getMainJITDylib().withLinkOrderDo( in initialize()
615 if (auto WrapperAddr = ES.lookup( in initialize()
628 auto &ES = J.getExecutionSession(); in deinitialize()
629 auto MainSearchOrder = J.getMainJITDylib().withLinkOrderDo( in deinitialize()
632 if (auto WrapperAddr = ES.lookup( in deinitialize()
635 auto E = J.getExecutionSession().callSPSWrapper<SPSDLCloseSig>( in deinitialize()
664 if (auto JTMBOrErr = JITTargetMachineBuilder::detectHost()) in prepareForConstruction()
732 if (auto DLOrErr = JTMB->getDefaultDataLayoutForTarget()) in prepareForConstruction()
755 if (auto EPCOrErr = in prepareForConstruction()
772 // If the client didn't configure any linker options then auto-configure the in prepareForConstruction()
775 auto &TT = JTMB->getTargetTriple(); in prepareForConstruction()
810 auto ObjLinkingLayer = std::make_unique<ObjectLinkingLayer>(ES); in prepareForConstruction()
811 if (auto EHFrameRegistrar = EPCEHFrameRegistrar::Create(ES)) in prepareForConstruction()
827 auto &JD = in prepareForConstruction()
829 auto G = EPCDynamicLibrarySearchGenerator::GetForTargetProcess( in prepareForConstruction()
842 if (auto Err = ES->endSession()) in ~LLJIT()
851 auto JD = ES->createJITDylib(std::move(Name)); in createJITDylib()
860 auto G = EPCDynamicLibrarySearchGenerator::Load(*ES, Path); in loadPlatformDynamicLibrary()
864 if (auto *ExistingJD = ES->getJITDylibByName(Path)) in loadPlatformDynamicLibrary()
867 auto &JD = ES->createBareJITDylib(Path); in loadPlatformDynamicLibrary()
874 auto G = StaticLibraryDefinitionGenerator::Create(*ObjLinkingLayer, in linkStaticLibraryInto()
885 auto G = StaticLibraryDefinitionGenerator::Load(*ObjLinkingLayer, Path); in linkStaticLibraryInto()
897 if (auto Err = in addIRModule()
921 if (auto Sym = ES->lookup( in lookupLinkerMangled()
938 auto GetMemMgr = []() { return std::make_unique<SectionMemoryManager>(); }; in createObjectLinkingLayer()
939 auto Layer = in createObjectLinkingLayer()
970 auto TM = JTMB.createTargetMachine(); in createCompileFunction()
989 if (auto EPC = SelfExecutorProcessControl::Create()) { in LLJIT()
997 auto ObjLayer = createObjectLinkingLayer(S, *ES); in LLJIT()
1007 auto CompileFunction = createCompileFunction(S, std::move(*S.JTMB)); in LLJIT()
1023 if (auto ProcSymsJD = S.SetupProcessSymbolsJITDylib(*this)) { in LLJIT()
1032 if (auto Err2 = S.PrePlatformSetup(*this)) { in LLJIT()
1041 if (auto PlatformJDOrErr = S.SetUpPlatform(*this)) { in LLJIT()
1055 if (auto MainOrErr = createJITDylib("main")) in LLJIT()
1099 auto DLLNameStr = DLLName.str(); // Guarantees null-termination. in operator ()()
1100 auto DLLJD = J.loadPlatformDynamicLibrary(DLLNameStr.c_str()); in operator ()()
1112 auto ProcessSymbolsJD = J.getProcessSymbolsJITDylib(); in operator ()()
1129 auto A = errorOrToExpected(MemoryBuffer::getFile(std::get<0>(OrcRuntime))); in operator ()()
1136 auto &ES = J.getExecutionSession(); in operator ()()
1137 auto &PlatformJD = ES.createBareJITDylib("<Platform>"); in operator ()()
1150 if (auto P = COFFPlatform::Create( in operator ()()
1159 auto G = StaticLibraryDefinitionGenerator::Create( in operator ()()
1164 if (auto P = ELFNixPlatform::Create(ES, *ObjLinkingLayer, PlatformJD, in operator ()()
1172 auto G = StaticLibraryDefinitionGenerator::Create( in operator ()()
1177 if (auto P = MachOPlatform::Create(ES, *ObjLinkingLayer, PlatformJD, in operator ()()
1196 auto ProcessSymbolsJD = J.getProcessSymbolsJITDylib(); in setUpGenericLLVMIRPlatform()
1202 auto &PlatformJD = J.getExecutionSession().createBareJITDylib("<Platform>"); in setUpGenericLLVMIRPlatform()
1219 if (auto Err = LLJITBuilderState::prepareForConstruction()) in prepareForConstruction()
1228 if (auto Err = TSM.withModuleDo( in addLazyIRModule()
1247 if (auto LCTMgrOrErr = createLocalLazyCallThroughManager( in LLLazyJIT()
1257 auto ISMBuilder = std::move(S.ISMBuilder); in LLLazyJIT()