1 /* 2 * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 // Generated by jextract 27 28 package jdk.internal.clang.libclang; 29 30 import java.lang.invoke.MethodHandle; 31 import java.lang.invoke.VarHandle; 32 import java.nio.ByteOrder; 33 import jdk.incubator.foreign.*; 34 import static jdk.incubator.foreign.ValueLayout.*; 35 class constants$4 { 36 37 static final FunctionDescriptor clang_getDiagnosticLocation$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 38 MemoryLayout.sequenceLayout(2, ADDRESS).withName("ptr_data"), 39 JAVA_INT.withName("int_data"), 40 MemoryLayout.paddingLayout(32) 41 ), 42 ADDRESS 43 ); 44 static final MethodHandle clang_getDiagnosticLocation$MH = RuntimeHelper.downcallHandle( 45 "clang_getDiagnosticLocation", 46 constants$4.clang_getDiagnosticLocation$FUNC, false 47 ); 48 static final FunctionDescriptor clang_getDiagnosticSpelling$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 49 ADDRESS.withName("data"), 50 JAVA_INT.withName("private_flags"), 51 MemoryLayout.paddingLayout(32) 52 ), 53 ADDRESS 54 ); 55 static final MethodHandle clang_getDiagnosticSpelling$MH = RuntimeHelper.downcallHandle( 56 "clang_getDiagnosticSpelling", 57 constants$4.clang_getDiagnosticSpelling$FUNC, false 58 ); 59 static final FunctionDescriptor clang_parseTranslationUnit$FUNC = FunctionDescriptor.of(ADDRESS, 60 ADDRESS, 61 ADDRESS, 62 ADDRESS, 63 JAVA_INT, 64 ADDRESS, 65 JAVA_INT, 66 JAVA_INT 67 ); 68 static final MethodHandle clang_parseTranslationUnit$MH = RuntimeHelper.downcallHandle( 69 "clang_parseTranslationUnit", 70 constants$4.clang_parseTranslationUnit$FUNC, false 71 ); 72 static final FunctionDescriptor clang_parseTranslationUnit2$FUNC = FunctionDescriptor.of(JAVA_INT, 73 ADDRESS, 74 ADDRESS, 75 ADDRESS, 76 JAVA_INT, 77 ADDRESS, 78 JAVA_INT, 79 JAVA_INT, 80 ADDRESS 81 ); 82 static final MethodHandle clang_parseTranslationUnit2$MH = RuntimeHelper.downcallHandle( 83 "clang_parseTranslationUnit2", 84 constants$4.clang_parseTranslationUnit2$FUNC, false 85 ); 86 static final FunctionDescriptor clang_saveTranslationUnit$FUNC = FunctionDescriptor.of(JAVA_INT, 87 ADDRESS, 88 ADDRESS, 89 JAVA_INT 90 ); 91 static final MethodHandle clang_saveTranslationUnit$MH = RuntimeHelper.downcallHandle( 92 "clang_saveTranslationUnit", 93 constants$4.clang_saveTranslationUnit$FUNC, false 94 ); 95 static final FunctionDescriptor clang_disposeTranslationUnit$FUNC = FunctionDescriptor.ofVoid( 96 ADDRESS 97 ); 98 static final MethodHandle clang_disposeTranslationUnit$MH = RuntimeHelper.downcallHandle( 99 "clang_disposeTranslationUnit", 100 constants$4.clang_disposeTranslationUnit$FUNC, false 101 ); 102 } 103 104