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