Home
last modified time | relevance | path

Searched refs:Replacement (Results 1 – 25 of 114) sorted by relevance

12345

/freebsd/contrib/llvm-project/clang/include/clang/Tooling/Core/
H A DReplacement.h83 class Replacement {
86 Replacement();
94 Replacement(StringRef FilePath, unsigned Offset, unsigned Length,
99 Replacement(const SourceManager &Sources, SourceLocation Start,
103 Replacement(const SourceManager &Sources, const CharSourceRange &Range,
109 Replacement(const SourceManager &Sources, const Node &NodeToReplace,
159 ReplacementError(replacement_error Err, Replacement Existing) in ReplacementError()
164 ReplacementError(replacement_error Err, Replacement New, Replacement Existing) in ReplacementError()
176 const std::optional<Replacement> &getNewReplacement() const { in getNewReplacement()
180 const std::optional<Replacement> &getExistingReplacement() const { in getExistingReplacement()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Tooling/Core/
H A DReplacement.cpp45 Replacement::Replacement() : FilePath(InvalidLocation) {} in Replacement() function in Replacement
47 Replacement::Replacement(StringRef FilePath, unsigned Offset, unsigned Length, in Replacement() function in Replacement
52 Replacement::Replacement(const SourceManager &Sources, SourceLocation Start, in Replacement() function in Replacement
57 Replacement::Replacement(const SourceManager &Sources, in Replacement() function in Replacement
64 bool Replacement::isApplicable() const { in isApplicable()
68 bool Replacement::apply(Rewriter &Rewrite) const { in apply()
87 std::string Replacement::toString() const { in toString()
98 bool operator<(const Replacement &LHS, const Replacement &RHS) { in operator <()
110 bool operator==(const Replacement &LHS, const Replacement &RHS) { in operator ==()
120 void Replacement::setFromSourceLocation(const SourceManager &Sources, in setFromSourceLocation()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Tooling/
H A DReplacementsYaml.h22 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::Replacement) in LLVM_YAML_IS_SEQUENCE_VECTOR() argument
29 template <> struct MappingTraits<clang::tooling::Replacement> { in LLVM_YAML_IS_SEQUENCE_VECTOR()
35 NormalizedReplacement(const IO &, const clang::tooling::Replacement &R) in LLVM_YAML_IS_SEQUENCE_VECTOR()
39 clang::tooling::Replacement denormalize(const IO &) { in LLVM_YAML_IS_SEQUENCE_VECTOR()
40 return clang::tooling::Replacement(FilePath, Offset, Length, in LLVM_YAML_IS_SEQUENCE_VECTOR()
50 static void mapping(IO &Io, clang::tooling::Replacement &R) { in LLVM_YAML_IS_SEQUENCE_VECTOR()
51 MappingNormalization<NormalizedReplacement, clang::tooling::Replacement> in LLVM_YAML_IS_SEQUENCE_VECTOR()
/freebsd/contrib/llvm-project/clang/lib/Tooling/
H A DRefactoringCallbacks.cpp51 for (const auto &Replacement : Callback->getReplacements()) { in HandleTranslationUnit() local
53 Refactoring.FileToReplaces[std::string(Replacement.getFilePath())] in HandleTranslationUnit()
54 .add(Replacement); in HandleTranslationUnit()
56 llvm::errs() << "Skipping replacement " << Replacement.toString() in HandleTranslationUnit()
72 static Replacement replaceStmtWithText(SourceManager &Sources, const Stmt &From, in replaceStmtWithText()
74 return tooling::Replacement( in replaceStmtWithText()
77 static Replacement replaceStmtWithStmt(SourceManager &Sources, const Stmt &From, in replaceStmtWithStmt()
91 auto Err = Replace.add(tooling::Replacement( in run()
229 auto Replacement = in run() local
230 tooling::Replacement(*Result.SourceManager, &It->second, ToText, in run()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/
H A DFatLTOCleanup.cpp92 Value *Replacement = PoisonValue::get(I->getType()); in cleanUpTypeCheckedLoad() local
93 Replacement = IRB.CreateInsertValue(Replacement, True, {1}); in cleanUpTypeCheckedLoad()
94 Replacement = IRB.CreateInsertValue(Replacement, Load, {0}); in cleanUpTypeCheckedLoad()
95 I->replaceAllUsesWith(Replacement); in cleanUpTypeCheckedLoad()
/freebsd/contrib/llvm-project/clang/include/clang/Tooling/Transformer/
H A DRewriteRule.h48 std::string Replacement; member
110 TextGenerator Replacement; member
182 ASTEdit changeTo(RangeSelector Target, TextGenerator Replacement);
184 inline ASTEdit change(RangeSelector Target, TextGenerator Replacement) { in change() argument
185 return changeTo(std::move(Target), std::move(Replacement)); in change()
194 inline ASTEdit changeTo(TextGenerator Replacement) { in changeTo() argument
195 return changeTo(node(RootID), std::move(Replacement)); in changeTo()
198 inline ASTEdit change(TextGenerator Replacement) { in change() argument
199 return changeTo(std::move(Replacement)); in change()
204 inline ASTEdit insertBefore(RangeSelector S, TextGenerator Replacement) { in insertBefore() argument
[all …]
/freebsd/sys/contrib/dev/acpica/compiler/
H A Dprmacros.c184 0, DefineInfo->Identifier, DefineInfo->Replacement); in PrDumpPredefinedNames()
208 char *Replacement, in PrAddDefine() argument
216 if (!Replacement) in PrAddDefine()
218 Replacement = ""; in PrAddDefine()
234 if (strcmp (Replacement, DefineInfo->Replacement)) in PrAddDefine()
250 ReplacementString = UtLocalCalloc (strlen (Replacement) + 1); in PrAddDefine()
251 strcpy (ReplacementString, Replacement); in PrAddDefine()
256 DefineInfo->Replacement = ReplacementString; in PrAddDefine()
H A Dprexpress.c242 DefineInfo->Replacement); in PrExpandMacros()
249 ReplaceString = DefineInfo->Replacement; in PrExpandMacros()
/freebsd/contrib/llvm-project/clang/lib/Tooling/Syntax/
H A DComputeReplacements.cpp100 std::string Replacement; in computeReplacements() local
102 if (ReplacedRange.empty() && Replacement.empty()) in computeReplacements()
104 llvm::cantFail(Replacements.add(tooling::Replacement( in computeReplacements()
106 Replacement))); in computeReplacements()
107 Replacement = ""; in computeReplacements()
113 Replacement += in computeReplacements()
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DR600OpenCLImageTypeLoweringPass.cpp165 Value *Replacement = nullptr; in replaceImageUses() local
168 Replacement = ConstantInt::get(Int32Type, ResourceID); in replaceImageUses()
170 Replacement = &ImageSizeArg; in replaceImageUses()
172 Replacement = &ImageFormatArg; in replaceImageUses()
177 Inst->replaceAllUsesWith(Replacement); in replaceImageUses()
198 Value *Replacement = nullptr; in replaceSamplerUses() local
201 Replacement = ConstantInt::get(Int32Type, ResourceID); in replaceSamplerUses()
206 Inst->replaceAllUsesWith(Replacement); in replaceSamplerUses()
H A DAMDGPULowerModuleLDSPass.cpp357 auto Replacement = KernelToReplacement.find(kernels[i]); in buildLookupTable() local
359 (Replacement == KernelToReplacement.end()) in buildLookupTable()
362 Ctx, Variables, Replacement->second.LDSVarsToConstantGEP); in buildLookupTable()
791 auto Replacement = in lowerKernelScopeStructVariables() local
800 markUsedByKernel(&Func, Replacement.SGV); in lowerKernelScopeStructVariables()
804 KernelToReplacement[&Func] = Replacement; in lowerKernelScopeStructVariables()
808 M, KernelUsedVariables, Replacement, [&Func](Use &U) { in lowerKernelScopeStructVariables()
1104 LDSVariableReplacement Replacement = in runOnModule() local
1110 replaceLDSVariablesWithStruct(M, Vec, Replacement, [](Use &U) { in runOnModule()
1173 auto Replacement = KernelToReplacement.find(&Func); in runOnModule() local
[all …]
H A DAMDGPUSwLowerLDS.cpp521 Value *Replacement) { in replacesUsesOfGlobalInFunction() argument
532 GV->replaceUsesWithIf(Replacement, ReplaceUsesLambda); in replacesUsesOfGlobalInFunction()
690 Value *Replacement = in translateLDSMemoryOperationsToGlobalMemory() local
692 LoadInst *NewLI = IRB.CreateAlignedLoad(LI->getType(), Replacement, in translateLDSMemoryOperationsToGlobalMemory()
700 Value *Replacement = in translateLDSMemoryOperationsToGlobalMemory() local
703 SI->getValueOperand(), Replacement, SI->getAlign(), SI->isVolatile()); in translateLDSMemoryOperationsToGlobalMemory()
711 Value *Replacement = in translateLDSMemoryOperationsToGlobalMemory() local
714 RMW->getOperation(), Replacement, RMWValOperand, RMW->getAlign(), in translateLDSMemoryOperationsToGlobalMemory()
722 Value *Replacement = in translateLDSMemoryOperationsToGlobalMemory() local
725 Replacement, XCHG->getCompareOperand(), XCHG->getNewValOperand(), in translateLDSMemoryOperationsToGlobalMemory()
[all …]
H A DAMDGPURewriteOutArguments.cpp332 for (std::pair<ReturnInst *, ReplacementVec> &Replacement : Replacements) { in runOnFunction()
333 ReturnInst *RI = Replacement.first; in runOnFunction()
344 for (std::pair<Argument *, Value *> ReturnPoint : Replacement.second) in runOnFunction()
/freebsd/contrib/llvm-project/clang/lib/Tooling/Transformer/
H A DRewriteRule.cpp54 if (E.Replacement) { in translateEdits()
55 auto Replacement = E.Replacement->eval(Result); in translateEdits() local
56 if (!Replacement) in translateEdits()
57 return Replacement.takeError(); in translateEdits()
58 T.Replacement = std::move(*Replacement); in translateEdits()
125 ASTEdit transformer::changeTo(RangeSelector Target, TextGenerator Replacement) { in changeTo() argument
128 E.Replacement = std::move(Replacement); in changeTo()
180 E.Replacement = makeText(formatHeaderPath(Header, Format)); in addInclude()
H A DTransformer.cpp50 AC.replace(*Result.SourceManager, T.Range, T.Replacement)) { in convertToAtomicChanges()
55 AC.addHeader(T.Replacement); in convertToAtomicChanges()
/freebsd/contrib/llvm-project/clang/lib/Tooling/Refactoring/
H A DAtomicChange.cpp45 std::vector<clang::tooling::Replacement> Replaces;
118 for (const clang::tooling::Replacement &R : Replaces) { in getRangesForFormatting()
160 tooling::Replacement(FilePath, UINT_MAX, 0, ReplacementText)); in createReplacementsForHeaders()
168 HeaderReplacements.add(Replacement(FilePath, UINT_MAX, 1, Header)); in createReplacementsForHeaders()
188 if (auto Err = Replaces.add(Replacement( in combineReplacementsInChanges()
259 return Replaces.add(Replacement(SM, Range, ReplacementText)); in replace()
264 return Replaces.add(Replacement(SM, Loc, Length, Text)); in replace()
271 Replacement R(SM, Loc, 0, Text); in insert()
282 Replacement NewR(R.getFilePath(), NewOffset, 0, Text); in insert()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/ObjCARC/
H A DObjCARCContract.cpp663 Instruction *Replacement = Inst; in run() local
669 if (Replacement->getType() != UseTy) { in run()
680 Replacement = new BitCastInst(Replacement, UseTy, "", in run()
694 PHI->setIncomingValue(i, Replacement); in run()
697 if (Replacement->getType() != UseTy) in run()
698 Replacement = in run()
699 new BitCastInst(Replacement, UseTy, "", in run()
701 U.set(Replacement); in run()
/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DTemplateName.h413 TemplateName Replacement; variable
416 SubstTemplateTemplateParmStorage(TemplateName Replacement, in SubstTemplateTemplateParmStorage() argument
422 Replacement(Replacement), AssociatedDecl(AssociatedDecl) { in SubstTemplateTemplateParmStorage()
444 TemplateName getReplacement() const { return Replacement; } in getReplacement()
448 static void Profile(llvm::FoldingSetNodeID &ID, TemplateName Replacement,
/freebsd/contrib/llvm-project/llvm/lib/Target/DirectX/
H A DDXILLegalizePass.cpp198 auto *Replacement = ReplacedValues[Cast->getOperand(0)]; in fixI8UseChain() local
199 if (Cast->getType() == Replacement->getType()) { in fixI8UseChain()
200 Cast->replaceAllUsesWith(Replacement); in fixI8UseChain()
206 AdjustedCast = Builder.CreateZExtOrTrunc(Replacement, Cast->getType()); in fixI8UseChain()
208 AdjustedCast = Builder.CreateSExtOrTrunc(Replacement, Cast->getType()); in fixI8UseChain()
540 auto *Replacement = ReplacedValues[Extract->getVectorOperand()]; in legalizeGetHighLowi64Bytes() local
541 assert(Replacement && "The BitCast replacement should have been set " in legalizeGetHighLowi64Bytes()
545 Replacement, Type::getInt32Ty(I.getContext())); in legalizeGetHighLowi64Bytes()
550 Replacement, in legalizeGetHighLowi64Bytes()
552 Replacement->getType(), in legalizeGetHighLowi64Bytes()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DReplaceWithVeclib.cpp90 auto *Replacement = IRBuilder.CreateCall(TLIVecFunc, Args, OpBundles); in replaceWithTLIFunction() local
91 II->replaceAllUsesWith(Replacement); in replaceWithTLIFunction()
93 if (isa<FPMathOperator>(Replacement)) in replaceWithTLIFunction()
94 Replacement->copyFastMathFlags(II); in replaceWithTLIFunction()
/freebsd/contrib/llvm-project/clang/lib/Format/
H A DObjCPropertyAttributeOrderFixer.cpp145 auto Replacement = tooling::Replacement(SourceMgr, Range, NewText); in sortPropertyAttributes() local
146 auto Err = Fixes.add(Replacement); in sortPropertyAttributes()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DFunctionImportUtils.cpp362 auto Replacement = RenamedComdats.find(C); in processGlobalsForThinLTO() local
363 if (Replacement != RenamedComdats.end()) in processGlobalsForThinLTO()
364 GO.setComdat(Replacement->second); in processGlobalsForThinLTO()
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DSourceMgr.h263 LLVM_ABI SMFixIt(SMRange R, const Twine &Replacement);
265 SMFixIt(SMLoc Loc, const Twine &Replacement) in SMFixIt() argument
266 : SMFixIt(SMRange(Loc, Loc), Replacement) {} in SMFixIt()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaAPINotes.cpp30 enum class IsSubstitution_t : bool { Original, Replacement }; enumerator
39 IsSubstitution_t Replacement) in VersionedInfoMetadata()
41 IsReplacement(Replacement == IsSubstitution_t::Replacement) {} in VersionedInfoMetadata()
854 SelectedVersion, IsActive_t::Inactive, IsSubstitution_t::Replacement); in maybeAttachUnversionedSwiftName()
879 auto Replacement = IsSubstitution_t::Original; in ProcessVersionedAPINotes() local
886 Replacement = IsSubstitution_t::Original; in ProcessVersionedAPINotes()
888 Replacement = IsSubstitution_t::Replacement; in ProcessVersionedAPINotes()
893 VersionedInfoMetadata(Version, Active, Replacement)); in ProcessVersionedAPINotes()
/freebsd/contrib/llvm-project/llvm/lib/Target/BPF/
H A DBPFCheckAndAdjustIR.cpp290 Value *Replacement; in sinkMinMaxInBB() local
296 Replacement = Builder.CreateLogicalAnd(LHS, RHS); in sinkMinMaxInBB()
300 Replacement = Builder.CreateLogicalOr(LHS, RHS); in sinkMinMaxInBB()
302 ICmp->replaceAllUsesWith(Replacement); in sinkMinMaxInBB()

12345