Home
last modified time | relevance | path

Searched full:rewrite (Results 1 – 25 of 908) sorted by relevance

12345678910>>...37

/openbsd-src/gnu/llvm/clang/lib/Tooling/
H A DRefactoring.cpp20 #include "clang/Rewrite/Core/Rewriter.h"
48 Rewriter Rewrite(Sources, DefaultLangOptions); in runAndSave() local
50 if (!applyAllReplacements(Rewrite)) { in runAndSave()
54 return saveRewrittenFiles(Rewrite); in runAndSave()
57 bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) { in applyAllReplacements() argument
60 Rewrite.getSourceMgr().getFileManager(), FileToReplaces)) in applyAllReplacements()
61 Result = tooling::applyAllReplacements(Entry.second, Rewrite) && Result; in applyAllReplacements()
65 int RefactoringTool::saveRewrittenFiles(Rewriter &Rewrite) { in saveRewrittenFiles() argument
66 return Rewrite.overwriteChangedFiles() ? 1 : 0; in saveRewrittenFiles()
71 Rewriter &Rewrite, StringRef Style) { in formatAndApplyAllReplacements() argument
[all …]
/openbsd-src/gnu/llvm/clang/lib/Frontend/Rewrite/
H A DFixItRewriter.cpp15 #include "clang/Rewrite/Frontend/FixItRewriter.h"
24 #include "clang/Rewrite/Core/RewriteBuffer.h"
25 #include "clang/Rewrite/Core/Rewriter.h"
40 : Diags(Diags), Editor(SourceMgr, LangOpts), Rewrite(SourceMgr, LangOpts), in FixItRewriter()
52 const RewriteBuffer *RewriteBuf = Rewrite.getRewriteBufferFor(ID); in WriteFixedFile()
62 Rewriter &Rewrite; member in __anon003cf0a90111::RewritesReceiver
65 RewritesReceiver(Rewriter &Rewrite) : Rewrite(Rewrite) {} in RewritesReceiver() argument
68 Rewrite.InsertText(loc, text); in insert()
72 Rewrite.ReplaceText(range.getBegin(), Rewrite.getRangeSize(range), text); in replace()
85 RewritesReceiver Rec(Rewrite); in WriteFixedFiles()
[all …]
H A DRewriteMacros.cpp1 //===--- RewriteMacros.cpp - Rewrite macros into their expansions ---------===//
14 #include "clang/Rewrite/Frontend/Rewriters.h"
17 #include "clang/Rewrite/Core/Rewriter.h"
88 /// RewriteMacrosInInput - Implement -rewrite-macros mode.
92 Rewriter Rewrite; in RewriteMacrosInInput() local
93 Rewrite.setSourceMgr(SM, PP.getLangOpts()); in RewriteMacrosInInput()
94 RewriteBuffer &RB = Rewrite.getEditBuffer(SM.getMainFileID()); in RewriteMacrosInInput()
209 Rewrite.getRewriteBufferFor(SM.getMainFileID())) { in RewriteMacrosInInput()
H A DFrontendActions.cpp9 #include "clang/Rewrite/Frontend/FrontendActions.h"
20 #include "clang/Rewrite/Frontend/ASTConsumers.h"
21 #include "clang/Rewrite/Frontend/FixItRewriter.h"
22 #include "clang/Rewrite/Frontend/Rewriters.h"
111 // Otherwise rewrite all files. in EndSourceFileAction()
218 // Only rewrite each module file once. in visitModuleFile()
231 assert(OS && "loaded module file after finishing rewrite action?"); in visitModuleFile()
243 // Rewrite the contents of the module in a separate compiler instance. in visitModuleFile()
257 // Don't recursively rewrite imports. We handle them all at the top level. in visitModuleFile()
H A DInclusionRewriter.cpp1 //===--- InclusionRewriter.cpp - Rewrite includes into their expansions ---===//
14 #include "clang/Rewrite/Frontend/Rewriters.h"
521 InclusionRewriter *Rewrite = new InclusionRewriter( in RewriteIncludesInInput() local
523 Rewrite->detectMainFileEOL(); in RewriteIncludesInInput()
525 PP.addPPCallbacks(std::unique_ptr<PPCallbacks>(Rewrite)); in RewriteIncludesInInput()
541 Rewrite->handleModuleBegin(Tok); in RewriteIncludesInInput()
543 Rewrite->setPredefinesBuffer(SM.getBufferOrFake(PP.getPredefinesFileID())); in RewriteIncludesInInput()
544 Rewrite->Process(PP.getPredefinesFileID(), SrcMgr::C_User); in RewriteIncludesInInput()
545 Rewrite->Process(SM.getMainFileID(), SrcMgr::C_User); in RewriteIncludesInInput()
H A DHTMLPrint.cpp20 #include "clang/Rewrite/Core/HTMLRewrite.h"
21 #include "clang/Rewrite/Core/Rewriter.h"
22 #include "clang/Rewrite/Frontend/ASTConsumers.h"
/openbsd-src/gnu/llvm/llvm/lib/Transforms/Utils/
H A DSymbolRewriter.cpp9 // SymbolRewriter is a LLVM pass which can rewrite symbols transparently within
43 // New rewrite descriptors can be created. Addding a new rewrite descriptor
46 // a) extended the rewrite descriptor kind enumeration
50 // c) extending the rewrite map parser
53 // Specify to rewrite the symbols using the `-rewrite-symbols` option, and
54 // specify the map file to use for the rewriting via the `-rewrite-map-file`
90 static cl::list<std::string> RewriteMapFiles("rewrite-map-file",
91 cl::desc("Symbol Rewrite Map"),
207 /// Represents a rewrite for an explicitly named (function) symbol. Both the
214 /// Represents a rewrite for an explicitly named (global variable) symbol. Both
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/Transforms/Utils/
H A DSymbolRewriter.h12 // The Symbol Rewriter pass takes a set of rewrite descriptors which define
57 /// The basic entity representing a rewrite operation. It serves as the base
58 /// class for any rewrite descriptor. It has a certain set of specializations
59 /// which describe a particular rewrite.
63 /// whether to rewrite a function, global variable, or global alias. Each of
66 /// select the symbols to rewrite. This descriptor list is passed to the
H A DSSAUpdater.h36 /// transformation wants to rewrite a set of uses of one value with uses of a
108 /// Rewrite a use of the symbolic value.
117 /// Rewrite a use like \c RewriteUse but handling in-block definitions.
119 /// This version of the method can rewrite uses in the same block as
/openbsd-src/gnu/llvm/llvm/lib/Target/AMDGPU/
H A DAMDGPURewriteUndefForPHI.cpp8 // This file implements the idea to rewrite undef incoming operand for certain
49 // block to get a separate join block, then we can rewrite the undef correctly.
68 #define DEBUG_TYPE "amdgpu-rewrite-undef-for-phi"
80 return "AMDGPU Rewrite Undef for PHI"; in getPassName()
97 "Rewrite undef for PHI", false, false)
101 "Rewrite undef for PHI", false, false) in INITIALIZE_PASS_DEPENDENCY()
/openbsd-src/gnu/llvm/clang/include/clang/Rewrite/Frontend/
H A DFixItRewriter.h22 #include "clang/Rewrite/Core/Rewriter.h"
70 Rewriter Rewrite; variable
97 return Rewrite.getRewriteBufferFor(ID) != nullptr; in IsModified()
103 iterator buffer_begin() { return Rewrite.buffer_begin(); } in buffer_begin()
104 iterator buffer_end() { return Rewrite.buffer_end(); } in buffer_end()
/openbsd-src/gnu/llvm/clang/docs/
H A DClangTransformerTutorial.rst17 The core abstraction of Transformer is the *rewrite rule*, which specifies how
69 can express this a Transformer rewrite rule:
77 ``makeRule`` is our go-to function for generating rewrite rules. It takes three
150 Now, we probably don't want to rewrite *all* invocations of "size" methods, just
182 This rule isn't quite what we want: it will rewrite ``my_object.child().foo()`` to
183 ``my_object.foo()``, but it will also rewrite ``my_ptr->child().foo()`` to
186 *want* to rewrite calls through pointers.
208 The above examples demonstrate just the basics of rewrite rules. Every element
212 rewrite rules are actually rewriting.
218 explanation of what the rewrite rules are actually rewriting. We've referred to
[all …]
/openbsd-src/gnu/usr.bin/perl/cpan/Unicode-Collate/t/
H A Drewrite.t40 table => 'keys.txt', normalization => undef, rewrite => $code,
55 normalization => undef, rewrite => $code,
73 rewrite => sub {
84 # HIRAGANA are undefined via rewrite
/openbsd-src/gnu/llvm/clang/include/clang/Tooling/
H A DRefactoring.h64 bool applyAllReplacements(Rewriter &Rewrite);
68 int saveRewrittenFiles(Rewriter &Rewrite);
87 /// \param[in] Rewrite The `Rewritter` to apply replacements on.
94 Rewriter &Rewrite, StringRef Style = "file");
/openbsd-src/gnu/llvm/clang/tools/libclang/
H A DRewrite.cpp1 //===- Rewrite.cpp --------------------------------------------------------===//
9 #include "clang-c/Rewrite.h"
14 #include "clang/Rewrite/Core/Rewriter.h"
/openbsd-src/gnu/llvm/llvm/utils/gn/secondary/clang/lib/Frontend/Rewrite/
H A DBUILD.gn1 static_library("Rewrite") {
10 "//clang/lib/Rewrite",
/openbsd-src/gnu/llvm/clang/lib/StaticAnalyzer/Core/
H A DTextDiagnostics.cpp20 #include "clang/Rewrite/Core/Rewriter.h"
130 Rewriter Rewrite(SM, LO); in FlushDiagnosticsImpl() local
131 if (!applyAllReplacements(Repls, Rewrite)) { in FlushDiagnosticsImpl()
135 Rewrite.overwriteChangedFiles(); in FlushDiagnosticsImpl()
/openbsd-src/gnu/llvm/clang/www/demo/
H A Dwhat is this directory.txt7 …k right in this location on the server. As such, someone will need to edit the file or rewrite it.
11 …see if there are any takers who would be interested (and willing to do a rewrite to their language…
/openbsd-src/gnu/usr.bin/texinfo/info/
H A DREADME10 Info 2.0 is a complete rewrite of the original standalone Info I wrote in
16 The rewrite consists of about 12,000 lines of code written in about 12
/openbsd-src/gnu/llvm/clang/include/clang/Rewrite/Core/
H A DRewriter.h19 #include "clang/Rewrite/Core/RewriteBuffer.h"
29 /// Rewriter - This is the main interface to the rewrite buffers. Its primary
50 /// FIXME: This sometimes corrupts the file's rewrite buffer due to
196 /// getRewriteBufferFor - Return the rewrite buffer for the specified FileID.
204 // Iterators over rewrite buffers.
H A DRewriteBuffer.h13 #include "clang/Rewrite/Core/DeltaTree.h"
14 #include "clang/Rewrite/Core/RewriteRope.h"
41 /// Initialize - Start this rewrite buffer out with a copy of the unmodified
/openbsd-src/gnu/llvm/clang/lib/Tooling/Core/
H A DReplacement.cpp22 #include "clang/Rewrite/Core/RewriteBuffer.h"
23 #include "clang/Rewrite/Core/Rewriter.h"
68 bool Replacement::apply(Rewriter &Rewrite) const { in apply()
69 SourceManager &SM = Rewrite.getSourceMgr(); in apply()
81 bool RewriteSucceeded = !Rewrite.ReplaceText( in apply()
567 bool applyAllReplacements(const Replacements &Replaces, Rewriter &Rewrite) { in applyAllReplacements() argument
571 Result = I->apply(Rewrite) && Result; in applyAllReplacements()
591 Rewriter Rewrite(SourceMgr, LangOptions()); in applyAllReplacements() local
600 if (!Replace.apply(Rewrite)) in applyAllReplacements()
606 Rewrite.getEditBuffer(ID).write(OS); in applyAllReplacements()
/openbsd-src/gnu/llvm/llvm/lib/CodeGen/
H A DPeepholeOptimizer.cpp50 // Rewrite copies and bitcasts to avoid cross register bank copies
127 "rewrite-phi-limit", cl::Hidden, cl::init(10),
354 /// The given source can be used to rewrite the definition into
677 /// then be capable to rewrite all intermediate PHIs to get the next source.
824 /// For instance, let CopyLike be the instruction to rewrite.
842 /// Rewrite the current source with \p NewReg and \p NewSubReg if possible.
882 /// Helper class to rewrite uncoalescable copy like instructions
894 /// rewrite a uncoalescable copy-like instruction. This method return
933 /// nothing to rewrite.
942 // If we already get the only source we can rewrite, return false. in getNextRewritableSource()
[all …]
/openbsd-src/gnu/llvm/llvm/include/llvm/MC/MCParser/
H A DMCTargetAsmParser.h36 AOK_Align, // Rewrite align as .align.
37 AOK_EVEN, // Rewrite even as .even.
38 AOK_Emit, // Rewrite _emit as .byte.
39 AOK_CallInput, // Rewrite in terms of ${N:P}.
40 AOK_Input, // Rewrite in terms of $N.
41 AOK_Output, // Rewrite in terms of $N.
43 AOK_Label, // Rewrite local labels.
/openbsd-src/gnu/llvm/llvm/utils/gn/secondary/lldb/source/Plugins/ExpressionParser/Clang/
H A DBUILD.gn13 "//clang/lib/Frontend/Rewrite",
16 "//clang/lib/Rewrite",

12345678910>>...37