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$0 {
36 
37     static final FunctionDescriptor clang_getCString$FUNC = FunctionDescriptor.of(ADDRESS,
38         MemoryLayout.structLayout(
39             ADDRESS.withName("data"),
40             JAVA_INT.withName("private_flags"),
41             MemoryLayout.paddingLayout(32)
42         )
43     );
44     static final MethodHandle clang_getCString$MH = RuntimeHelper.downcallHandle(
45         "clang_getCString",
46         constants$0.clang_getCString$FUNC, false
47     );
48     static final FunctionDescriptor clang_disposeString$FUNC = FunctionDescriptor.ofVoid(
49         MemoryLayout.structLayout(
50             ADDRESS.withName("data"),
51             JAVA_INT.withName("private_flags"),
52             MemoryLayout.paddingLayout(32)
53         )
54     );
55     static final MethodHandle clang_disposeString$MH = RuntimeHelper.downcallHandle(
56         "clang_disposeString",
57         constants$0.clang_disposeString$FUNC, false
58     );
59     static final FunctionDescriptor clang_createIndex$FUNC = FunctionDescriptor.of(ADDRESS,
60         JAVA_INT,
61         JAVA_INT
62     );
63     static final MethodHandle clang_createIndex$MH = RuntimeHelper.downcallHandle(
64         "clang_createIndex",
65         constants$0.clang_createIndex$FUNC, false
66     );
67     static final FunctionDescriptor clang_disposeIndex$FUNC = FunctionDescriptor.ofVoid(
68         ADDRESS
69     );
70     static final MethodHandle clang_disposeIndex$MH = RuntimeHelper.downcallHandle(
71         "clang_disposeIndex",
72         constants$0.clang_disposeIndex$FUNC, false
73     );
74     static final FunctionDescriptor clang_getFileName$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout(
75         ADDRESS.withName("data"),
76         JAVA_INT.withName("private_flags"),
77         MemoryLayout.paddingLayout(32)
78     ),
79         ADDRESS
80     );
81     static final MethodHandle clang_getFileName$MH = RuntimeHelper.downcallHandle(
82         "clang_getFileName",
83         constants$0.clang_getFileName$FUNC, false
84     );
85     static final FunctionDescriptor clang_getNullLocation$FUNC = FunctionDescriptor.of(MemoryLayout.structLayout(
86         MemoryLayout.sequenceLayout(2, ADDRESS).withName("ptr_data"),
87         JAVA_INT.withName("int_data"),
88         MemoryLayout.paddingLayout(32)
89     ));
90     static final MethodHandle clang_getNullLocation$MH = RuntimeHelper.downcallHandle(
91         "clang_getNullLocation",
92         constants$0.clang_getNullLocation$FUNC, false
93     );
94 }
95 
96