Class ClangRewrite

java.lang.Object
org.lwjgl.llvm.ClangRewrite

public class ClangRewrite extends Object
Requires Clang 12 or higher.
  • Method Details

    • getLibrary

      public static org.lwjgl.system.SharedLibrary getLibrary()
      Returns the CLANG SharedLibrary.
    • clang_CXRewriter_create

      public static long clang_CXRewriter_create(long TU)
      Create CXRewriter.
    • 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

      public static void clang_CXRewriter_removeText(long Rew, CXSourceRange ToBeRemoved)
      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 to stdout.
    • clang_CXRewriter_dispose

      public static void clang_CXRewriter_dispose(long Rew)
      Free the given CXRewriter.