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$16 {
 36 
 37     static final FunctionDescriptor clang_getTokenLocation$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         MemoryLayout.structLayout(
 44             MemoryLayout.sequenceLayout(4, JAVA_INT).withName("int_data"),
 45             ADDRESS.withName("ptr_data")
 46         )
 47     );
 48     static final MethodHandle clang_getTokenLocation$MH = RuntimeHelper.downcallHandle(
 49         "clang_getTokenLocation",
 50         constants$16.clang_getTokenLocation$FUNC, false
 51     );
 52     static final FunctionDescriptor clang_getTokenExtent$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout(
 53         MemoryLayout.sequenceLayout(2, ADDRESS).withName("ptr_data"),
 54         JAVA_INT.withName("begin_int_data"),
 55         JAVA_INT.withName("end_int_data")
 56     ),
 57         ADDRESS,
 58         MemoryLayout.structLayout(
 59             MemoryLayout.sequenceLayout(4, JAVA_INT).withName("int_data"),
 60             ADDRESS.withName("ptr_data")
 61         )
 62     );
 63     static final MethodHandle clang_getTokenExtent$MH = RuntimeHelper.downcallHandle(
 64         "clang_getTokenExtent",
 65         constants$16.clang_getTokenExtent$FUNC, false
 66     );
 67     static final FunctionDescriptor clang_tokenize$FUNC = FunctionDescriptor.ofVoid(
 68         ADDRESS,
 69         MemoryLayout.structLayout(
 70             MemoryLayout.sequenceLayout(2, ADDRESS).withName("ptr_data"),
 71             JAVA_INT.withName("begin_int_data"),
 72             JAVA_INT.withName("end_int_data")
 73         ),
 74         ADDRESS,
 75         ADDRESS
 76     );
 77     static final MethodHandle clang_tokenize$MH = RuntimeHelper.downcallHandle(
 78         "clang_tokenize",
 79         constants$16.clang_tokenize$FUNC, false
 80     );
 81     static final FunctionDescriptor clang_disposeTokens$FUNC = FunctionDescriptor.ofVoid(
 82         ADDRESS,
 83         ADDRESS,
 84         JAVA_INT
 85     );
 86     static final MethodHandle clang_disposeTokens$MH = RuntimeHelper.downcallHandle(
 87         "clang_disposeTokens",
 88         constants$16.clang_disposeTokens$FUNC, false
 89     );
 90     static final FunctionDescriptor clang_getCursorKindSpelling$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout(
 91         ADDRESS.withName("data"),
 92         JAVA_INT.withName("private_flags"),
 93         MemoryLayout.paddingLayout(32)
 94     ),
 95         JAVA_INT
 96     );
 97     static final MethodHandle clang_getCursorKindSpelling$MH = RuntimeHelper.downcallHandle(
 98         "clang_getCursorKindSpelling",
 99         constants$16.clang_getCursorKindSpelling$FUNC, false
100     );
101     static final FunctionDescriptor clang_getClangVersion$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout(
102         ADDRESS.withName("data"),
103         JAVA_INT.withName("private_flags"),
104         MemoryLayout.paddingLayout(32)
105     ));
106     static final MethodHandle clang_getClangVersion$MH = RuntimeHelper.downcallHandle(
107         "clang_getClangVersion",
108         constants$16.clang_getClangVersion$FUNC, false
109     );
110 }
111 
112