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