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$11 { 36 37 static final FunctionDescriptor clang_getArgType$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 38 JAVA_INT.withName("kind"), 39 MemoryLayout.paddingLayout(32), 40 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 41 ), 42 MemoryLayout.structLayout( 43 JAVA_INT.withName("kind"), 44 MemoryLayout.paddingLayout(32), 45 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 46 ), 47 JAVA_INT 48 ); 49 static final MethodHandle clang_getArgType$MH = RuntimeHelper.downcallHandle( 50 "clang_getArgType", 51 constants$11.clang_getArgType$FUNC, false 52 ); 53 static final FunctionDescriptor clang_isFunctionTypeVariadic$FUNC = FunctionDescriptor.of(JAVA_INT, 54 MemoryLayout.structLayout( 55 JAVA_INT.withName("kind"), 56 MemoryLayout.paddingLayout(32), 57 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 58 ) 59 ); 60 static final MethodHandle clang_isFunctionTypeVariadic$MH = RuntimeHelper.downcallHandle( 61 "clang_isFunctionTypeVariadic", 62 constants$11.clang_isFunctionTypeVariadic$FUNC, false 63 ); 64 static final FunctionDescriptor clang_getCursorResultType$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 65 JAVA_INT.withName("kind"), 66 MemoryLayout.paddingLayout(32), 67 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 68 ), 69 MemoryLayout.structLayout( 70 JAVA_INT.withName("kind"), 71 JAVA_INT.withName("xdata"), 72 MemoryLayout.sequenceLayout(3, ADDRESS).withName("data") 73 ) 74 ); 75 static final MethodHandle clang_getCursorResultType$MH = RuntimeHelper.downcallHandle( 76 "clang_getCursorResultType", 77 constants$11.clang_getCursorResultType$FUNC, false 78 ); 79 static final FunctionDescriptor clang_getElementType$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 80 JAVA_INT.withName("kind"), 81 MemoryLayout.paddingLayout(32), 82 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 83 ), 84 MemoryLayout.structLayout( 85 JAVA_INT.withName("kind"), 86 MemoryLayout.paddingLayout(32), 87 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 88 ) 89 ); 90 static final MethodHandle clang_getElementType$MH = RuntimeHelper.downcallHandle( 91 "clang_getElementType", 92 constants$11.clang_getElementType$FUNC, false 93 ); 94 static final FunctionDescriptor clang_getNumElements$FUNC = FunctionDescriptor.of(JAVA_LONG, 95 MemoryLayout.structLayout( 96 JAVA_INT.withName("kind"), 97 MemoryLayout.paddingLayout(32), 98 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 99 ) 100 ); 101 static final MethodHandle clang_getNumElements$MH = RuntimeHelper.downcallHandle( 102 "clang_getNumElements", 103 constants$11.clang_getNumElements$FUNC, false 104 ); 105 static final FunctionDescriptor clang_getArrayElementType$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout( 106 JAVA_INT.withName("kind"), 107 MemoryLayout.paddingLayout(32), 108 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 109 ), 110 MemoryLayout.structLayout( 111 JAVA_INT.withName("kind"), 112 MemoryLayout.paddingLayout(32), 113 MemoryLayout.sequenceLayout(2, ADDRESS).withName("data") 114 ) 115 ); 116 static final MethodHandle clang_getArrayElementType$MH = RuntimeHelper.downcallHandle( 117 "clang_getArrayElementType", 118 constants$11.clang_getArrayElementType$FUNC, false 119 ); 120 } 121 122