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