< prev index next >
test/jdk/com/sun/tools/jextract/jclang-ffi/src/jdk/internal/clang/Index.java
Print this page
@@ -28,12 +28,12 @@
import java.foreign.memory.Pointer;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
-import clang.Index.CXTranslationUnitImpl;
-import clang.Index.CXDiagnostic;
+import clang.Index_h.CXTranslationUnitImpl;
+import clang.Index_h.CXDiagnostic;
public class Index {
// Pointer to CXIndex
private final Pointer<Void> ptr;
// Set of TranslationUnit
@@ -43,11 +43,11 @@
this.ptr = ptr;
translationUnits = new ArrayList<>();
}
public TranslationUnit parseTU(String file, String... args) {
- final clang.Index lclang = LibClang.lib;
+ final clang.Index_h lclang = LibClang.lib;
try (Scope scope = Scope.globalScope().fork()) {
Pointer<Byte> src = scope.allocateCString(file);
Pointer<Pointer<Byte>> cargs = toCStrArray(scope, args);
Pointer<CXTranslationUnitImpl> tu = lclang.clang_parseTranslationUnit(
@@ -56,11 +56,11 @@
return new TranslationUnit(tu);
}
}
public Cursor parse(String file, Consumer<Diagnostic> eh, boolean detailedPreprocessorRecord, String... args) {
- final clang.Index lclang = LibClang.lib;
+ final clang.Index_h lclang = LibClang.lib;
try (Scope scope = Scope.globalScope().fork()) {
Pointer<Byte> src = scope.allocateCString(file);
Pointer<Pointer<Byte>> cargs = toCStrArray(scope, args);
Pointer<CXTranslationUnitImpl> tu = lclang.clang_parseTranslationUnit(
< prev index next >