Package org.lwjgl.llvm
Class ClangRewrite
java.lang.Object
org.lwjgl.llvm.ClangRewrite
Requires Clang 12 or higher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded from the CLANGSharedLibrary. -
Method Summary
Modifier and TypeMethodDescriptionstatic longclang_CXRewriter_create(long TU) CreateCXRewriter.static voidclang_CXRewriter_dispose(long Rew) Free the givenCXRewriter.static voidclang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, CharSequence Insert) Insert the specified string at the specified location in the original buffer.static voidclang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, ByteBuffer Insert) Insert the specified string at the specified location in the original buffer.static booleanclang_CXRewriter_overwriteChangedFiles(long Rew) Save all changed files to disk.static voidclang_CXRewriter_removeText(long Rew, CXSourceRange ToBeRemoved) Remove the specified range.static voidclang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, CharSequence Replacement) Replace the specified range of characters in the input with the specified replacement.static voidclang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, ByteBuffer Replacement) Replace the specified range of characters in the input with the specified replacement.static voidclang_CXRewriter_writeMainFileToStdOut(long Rew) Write out rewritten version of the main file tostdout.static org.lwjgl.system.SharedLibraryReturns the CLANGSharedLibrary.static voidnclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert) Unsafe version of:insertTextBeforestatic voidnclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert, long __functionAddress) Unsafe version of:insertTextBeforestatic voidnclang_CXRewriter_removeText(long Rew, long ToBeRemoved) Unsafe version of:removeTextstatic voidnclang_CXRewriter_removeText(long Rew, long ToBeRemoved, long __functionAddress) Unsafe version of:removeTextstatic voidnclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement) Unsafe version of:replaceTextstatic voidnclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement, long __functionAddress) Unsafe version of:replaceText
-
Method Details
-
getLibrary
public static org.lwjgl.system.SharedLibrary getLibrary()Returns the CLANGSharedLibrary. -
clang_CXRewriter_create
public static long clang_CXRewriter_create(long TU) CreateCXRewriter. -
nclang_CXRewriter_insertTextBefore
public static void nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert, long __functionAddress) Unsafe version of:insertTextBefore -
nclang_CXRewriter_insertTextBefore
public static void nclang_CXRewriter_insertTextBefore(long Rew, long Loc, long Insert) Unsafe version of:insertTextBefore -
clang_CXRewriter_insertTextBefore
public static void clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, ByteBuffer Insert) Insert the specified string at the specified location in the original buffer. -
clang_CXRewriter_insertTextBefore
public static void clang_CXRewriter_insertTextBefore(long Rew, CXSourceLocation Loc, CharSequence Insert) Insert the specified string at the specified location in the original buffer. -
nclang_CXRewriter_replaceText
public static void nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement, long __functionAddress) Unsafe version of:replaceText -
nclang_CXRewriter_replaceText
public static void nclang_CXRewriter_replaceText(long Rew, long ToBeReplaced, long Replacement) Unsafe version of:replaceText -
clang_CXRewriter_replaceText
public static void clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, ByteBuffer Replacement) Replace the specified range of characters in the input with the specified replacement. -
clang_CXRewriter_replaceText
public static void clang_CXRewriter_replaceText(long Rew, CXSourceRange ToBeReplaced, CharSequence Replacement) Replace the specified range of characters in the input with the specified replacement. -
nclang_CXRewriter_removeText
public static void nclang_CXRewriter_removeText(long Rew, long ToBeRemoved, long __functionAddress) Unsafe version of:removeText -
nclang_CXRewriter_removeText
public static void nclang_CXRewriter_removeText(long Rew, long ToBeRemoved) Unsafe version of:removeText -
clang_CXRewriter_removeText
Remove the specified range. -
clang_CXRewriter_overwriteChangedFiles
public static boolean clang_CXRewriter_overwriteChangedFiles(long Rew) Save all changed files to disk.- Returns:
- 1 if any files were not saved successfully, returns 0 otherwise
-
clang_CXRewriter_writeMainFileToStdOut
public static void clang_CXRewriter_writeMainFileToStdOut(long Rew) Write out rewritten version of the main file tostdout. -
clang_CXRewriter_dispose
public static void clang_CXRewriter_dispose(long Rew) Free the givenCXRewriter.
-