forked from llvm-mirror/clang
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from RadeonOpenCompute/roc-1.6.4
roc-1.6.4 updates
- Loading branch information
Showing
1,557 changed files
with
74,834 additions
and
27,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
from clang.cindex import LinkageKind | ||
from clang.cindex import Cursor | ||
from clang.cindex import TranslationUnit | ||
|
||
from .util import get_cursor | ||
from .util import get_tu | ||
|
||
def test_linkage(): | ||
"""Ensure that linkage specifers are available on cursors""" | ||
|
||
tu = get_tu(""" | ||
void foo() { int no_linkage; } | ||
static int internal; | ||
namespace { extern int unique_external; } | ||
extern int external; | ||
""", lang = 'cpp') | ||
|
||
no_linkage = get_cursor(tu.cursor, 'no_linkage') | ||
assert no_linkage.linkage == LinkageKind.NO_LINKAGE; | ||
|
||
internal = get_cursor(tu.cursor, 'internal') | ||
assert internal.linkage == LinkageKind.INTERNAL | ||
|
||
unique_external = get_cursor(tu.cursor, 'unique_external') | ||
assert unique_external.linkage == LinkageKind.UNIQUE_EXTERNAL | ||
|
||
external = get_cursor(tu.cursor, 'external') | ||
assert external.linkage == LinkageKind.EXTERNAL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
from clang.cindex import TLSKind | ||
from clang.cindex import Cursor | ||
from clang.cindex import TranslationUnit | ||
|
||
from .util import get_cursor | ||
from .util import get_tu | ||
|
||
def test_tls_kind(): | ||
"""Ensure that thread-local storage kinds are available on cursors.""" | ||
|
||
tu = get_tu(""" | ||
int tls_none; | ||
thread_local int tls_dynamic; | ||
_Thread_local int tls_static; | ||
""", lang = 'cpp') | ||
|
||
tls_none = get_cursor(tu.cursor, 'tls_none') | ||
assert tls_none.tls_kind == TLSKind.NONE; | ||
|
||
tls_dynamic = get_cursor(tu.cursor, 'tls_dynamic') | ||
assert tls_dynamic.tls_kind == TLSKind.DYNAMIC | ||
|
||
tls_static = get_cursor(tu.cursor, 'tls_static') | ||
assert tls_static.tls_kind == TLSKind.STATIC | ||
|
||
# The following case tests '__declspec(thread)'. Since it is a Microsoft | ||
# specific extension, specific flags are required for the parser to pick | ||
# these up. | ||
flags = ['-fms-extensions', '-target', 'x86_64-unknown-windows-win32'] | ||
tu = get_tu(""" | ||
__declspec(thread) int tls_declspec; | ||
""", lang = 'cpp', flags=flags) | ||
|
||
tls_declspec = get_cursor(tu.cursor, 'tls_declspec') | ||
assert tls_declspec.tls_kind == TLSKind.STATIC | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "") | ||
|
||
set(CLANG_VENDOR Android CACHE STRING "") | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "") | ||
set(LLVM_ENABLE_THREADS OFF CACHE BOOL "") | ||
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(LLVM_LIBDIR_SUFFIX 64 CACHE STRING "") | ||
set(LLVM_ENABLE_LIBCXX ON CACHE BOOL "") | ||
|
||
set(ANDROID_RUNTIMES_ENABLE_ASSERTIONS ON CACHE BOOL "") | ||
set(ANDROID_RUNTIMES_BUILD_TYPE Release CACHE STRING "") | ||
set(ANDROID_BUILTINS_BUILD_TYPE Release CACHE STRING "") | ||
|
||
set(LLVM_BUILTIN_TARGETS "i686-linux-android;x86_64-linux-android;aarch64-linux-android;armv7-linux-android" CACHE STRING "") | ||
foreach(target i686;x86_64;aarch64;armv7) | ||
set(BUILTINS_${target}-linux-android_ANDROID 1 CACHE STRING "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_BUILD_TYPE ${ANDROID_BUILTINS_BUILD_TYPE} CACHE STRING "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_ASM_FLAGS ${ANDROID_${target}_C_FLAGS} CACHE PATH "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_C_FLAGS ${ANDROID_${target}_C_FLAGS} CACHE PATH "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_SYSROOT ${ANDROID_${target}_SYSROOT} CACHE PATH "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_EXE_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_SHARED_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
set(BUILTINS_${target}-linux-android_CMAKE_MOUDLE_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
endforeach() | ||
|
||
|
||
set(LLVM_RUNTIME_TARGETS "i686-linux-android;x86_64-linux-android;aarch64-linux-android;armv7-linux-android" CACHE STRING "") | ||
foreach(target i686;x86_64;aarch64;armv7) | ||
set(RUNTIMES_${target}-linux-android_ANDROID 1 CACHE STRING "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_ASM_FLAGS ${ANDROID_${target}_C_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_BUILD_TYPE ${ANDROID_RUNTIMES_BUILD_TYPE} CACHE STRING "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_C_FLAGS ${ANDROID_${target}_C_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_CXX_FLAGS ${ANDROID_${target}_CXX_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_SYSROOT ${ANDROID_${target}_SYSROOT} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_EXE_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_SHARED_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_CMAKE_MODULE_LINKER_FLAGS ${ANDROID_${target}_LINKER_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_COMPILER_RT_ENABLE_WERROR ON CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_COMPILER_RT_TEST_COMPILER_CFLAGS ${ANDROID_${target}_C_FLAGS} CACHE PATH "") | ||
set(RUNTIMES_${target}-linux-android_COMPILER_RT_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LLVM_ENABLE_ASSERTIONS ${ANDROID_RUNTIMES_ENABLE_ASSERTIONS} CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LLVM_ENABLE_LIBCXX ON CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LLVM_ENABLE_THREADS OFF CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LLVM_INCLUDE_TESTS OFF CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LIBUNWIND_HAS_NO_EXCEPTIONS_FLAG ON CACHE BOOL "") | ||
set(RUNTIMES_${target}-linux-android_LIBUNWIND_HAS_FUNWIND_TABLES ON CACHE BOOL "") | ||
endforeach() | ||
|
||
set(RUNTIMES_armv7-linux-android_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "") | ||
|
Oops, something went wrong.