ArrayRef<EnumEntry<uint16_t>> getExportSymFlagNames() { return makeArrayRef(ExportSymFlagNames); }
ArrayRef<EnumEntry<uint32_t>> getModuleSubstreamKindNames() { return makeArrayRef(ModuleSubstreamKindNames); }
ArrayRef<EnumEntry<unsigned>> getCPUTypeNames() { return makeArrayRef(CPUTypeNames); }
ArrayRef<EnumEntry<uint32_t>> getFrameProcSymFlagNames() { return makeArrayRef(FrameProcSymFlagNames); }
ArrayRef<EnumEntry<SymbolKind>> getSymbolTypeNames() { return makeArrayRef(SymbolTypeNames); }
ArrayRef<EnumEntry<uint32_t>> getFileChecksumNames() { return makeArrayRef(FileChecksumNames); }
ArrayRef<EnumEntry<uint8_t>> getFrameCookieKindNames() { return makeArrayRef(FrameCookieKinds); }
ArrayRef<EnumEntry<COFF::SectionCharacteristics>> getImageSectionCharacteristicNames() { return makeArrayRef(ImageSectionCharacteristicNames); }
ArrayRef<EnumEntry<uint8_t>> getProcSymFlagNames() { return makeArrayRef(ProcSymFlagNames); }
ArrayRef<EnumEntry<uint16_t>> getLocalFlagNames() { return makeArrayRef(LocalFlags); }
ArrayRef<EnumEntry<uint32_t>> getPublicSymFlagNames() { return makeArrayRef(PublicSymFlagNames); }
ArrayRef<EnumEntry<uint16_t>> getRegisterNames() { return makeArrayRef(RegisterNames); }
ArrayRef<EnumEntry<TypeLeafKind>> getTypeLeafNames() { return makeArrayRef(TypeLeafNames); }
ArrayRef<EnumEntry<uint8_t>> getThunkOrdinalNames() { return makeArrayRef(ThunkOrdinalNames); }
ArrayRef<EnumEntry<SourceLanguage>> getSourceLanguageNames() { return makeArrayRef(SourceLanguages); }
ArrayRef<EnumEntry<uint16_t>> getTrampolineNames() { return makeArrayRef(TrampolineNames); }
ArrayRef<EnumEntry<uint32_t>> getCompileSym3FlagNames() { return makeArrayRef(CompileSym3FlagNames); }
SEXP R_IRBuilder_CreateGEP(SEXP r_builder, SEXP r_val, SEXP r_idx, SEXP r_id) { llvm::IRBuilder<> *builder; builder = GET_REF(r_builder, IRBuilder<>); llvm::Value *val = GET_REF(r_val, Value); llvm::Value *ans; if(TYPEOF(r_idx) == VECSXP) { int nargs = Rf_length(r_idx); std::vector<llvm::Value *> args; // does this disappear and we lose the elements? for(int i = 0; i < nargs; i++) args.push_back(GET_REF(VECTOR_ELT(r_idx, i), Value)); llvm::ArrayRef<llvm::Value *> idxs = makeArrayRef(args); #ifdef USE_EXCEPTIONS try { #endif #if 1 ans = builder->CreateGEP(val, idxs); #else fprintf(stderr, "Calling GetElementPtrInst::Create()\n"); ans = llvm::GetElementPtrInst::Create(val, args); // idxs ans = builder->Insert(ans, ""); #endif #ifdef USE_EXCEPTIONS } catch(std::exception &e) { PROBLEM "failed to create GEP" ERROR; } #else if(!ans) { PROBLEM "failed to create GEP" ERROR; } #endif } else { llvm::Value *idx = GET_REF(r_idx, Value); #ifdef USE_EXCEPTIONS try { #endif ans = builder->CreateGEP(val, idx); #ifdef USE_EXCEPTIONS } catch(std::exception &e) { PROBLEM "failed to create GEP" ERROR; } #else if(!ans) { PROBLEM "failed to create GEP" ERROR; } #endif } if(Rf_length(r_id)) ans->setName(makeTwine(r_id)); return(R_createRef(ans, "Value")); }
static ArrayRef<MCPhysReg> CC_X86_64_VectorCallGetGPRs() { static const MCPhysReg RegListGPR[] = {X86::RCX, X86::RDX, X86::R8, X86::R9}; return makeArrayRef(std::begin(RegListGPR), std::end(RegListGPR)); }