2013-12-10 03:04:43 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
|
|
|
Support
|
|
|
|
)
|
2011-02-12 07:46:38 +08:00
|
|
|
|
2019-02-06 11:51:00 +08:00
|
|
|
find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
|
|
|
|
find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
|
2014-11-20 06:03:48 +08:00
|
|
|
|
2014-12-06 06:32:49 +08:00
|
|
|
# The VC revision include that we want to generate.
|
2019-02-06 11:51:00 +08:00
|
|
|
set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
|
|
|
|
|
|
|
|
set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
|
|
|
|
|
2020-01-17 08:04:08 +08:00
|
|
|
if(llvm_vc AND LLVM_APPEND_VC_REV)
|
2019-02-06 11:51:00 +08:00
|
|
|
set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
|
2019-01-31 15:12:43 +08:00
|
|
|
endif()
|
2020-01-17 08:04:08 +08:00
|
|
|
if(clang_vc AND LLVM_APPEND_VC_REV)
|
2019-02-06 11:51:00 +08:00
|
|
|
set(clang_source_dir ${CLANG_SOURCE_DIR})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Create custom target to generate the VC revision include.
|
|
|
|
add_custom_command(OUTPUT "${version_inc}"
|
|
|
|
DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\""
|
|
|
|
"-DLLVM_SOURCE_DIR=${llvm_source_dir}"
|
|
|
|
"-DCLANG_SOURCE_DIR=${clang_source_dir}"
|
|
|
|
"-DHEADER_FILE=${version_inc}"
|
|
|
|
-P "${generate_vcs_version_script}")
|
|
|
|
|
|
|
|
# Mark the generated header as being generated.
|
|
|
|
set_source_files_properties("${version_inc}"
|
|
|
|
PROPERTIES GENERATED TRUE
|
|
|
|
HEADER_FILE_ONLY TRUE)
|
|
|
|
|
2020-10-31 08:42:09 +08:00
|
|
|
if(CLANG_VENDOR)
|
|
|
|
set_source_files_properties(Version.cpp
|
|
|
|
PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
|
|
|
|
endif()
|
|
|
|
|
2008-10-26 08:56:18 +08:00
|
|
|
add_clang_library(clangBasic
|
2014-03-31 21:14:44 +08:00
|
|
|
Attributes.cpp
|
2009-06-14 09:05:48 +08:00
|
|
|
Builtins.cpp
|
2013-02-09 06:30:22 +08:00
|
|
|
CharInfo.cpp
|
2018-12-11 11:18:39 +08:00
|
|
|
CodeGenOptions.cpp
|
2016-07-07 05:21:39 +08:00
|
|
|
Cuda.cpp
|
2021-06-30 22:44:42 +08:00
|
|
|
DarwinSDKInfo.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
Diagnostic.cpp
|
2010-11-19 05:19:52 +08:00
|
|
|
DiagnosticIDs.cpp
|
2015-06-13 15:11:40 +08:00
|
|
|
DiagnosticOptions.cpp
|
2020-06-11 21:08:27 +08:00
|
|
|
ExpressionTraits.cpp
|
2020-10-17 04:37:14 +08:00
|
|
|
FileEntry.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
FileManager.cpp
|
2010-11-24 03:19:34 +08:00
|
|
|
FileSystemStatCache.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
IdentifierTable.cpp
|
2011-09-14 01:21:33 +08:00
|
|
|
LangOptions.cpp
|
2019-08-05 21:59:26 +08:00
|
|
|
LangStandards.cpp
|
2011-12-01 07:21:26 +08:00
|
|
|
Module.cpp
|
2012-06-20 14:18:46 +08:00
|
|
|
ObjCRuntime.cpp
|
2021-01-26 00:23:58 +08:00
|
|
|
OpenCLOptions.cpp
|
2013-03-22 14:34:35 +08:00
|
|
|
OpenMPKinds.cpp
|
2012-12-21 04:25:19 +08:00
|
|
|
OperatorPrecedence.cpp
|
2021-01-15 17:14:37 +08:00
|
|
|
ProfileList.cpp
|
2021-02-23 03:47:29 +08:00
|
|
|
NoSanitizeList.cpp
|
2017-09-26 06:11:12 +08:00
|
|
|
SanitizerSpecialCaseList.cpp
|
2014-11-11 09:26:14 +08:00
|
|
|
Sanitizers.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
SourceLocation.cpp
|
|
|
|
SourceManager.cpp
|
Improve behavior in the case of stack exhaustion.
Summary:
Clang performs various recursive operations (such as template instantiation),
and may use non-trivial amounts of stack space in each recursive step (for
instance, due to recursive AST walks). While we try to keep the stack space
used by such steps to a minimum and we have explicit limits on the number of
such steps we perform, it's impractical to guarantee that we won't blow out the
stack on deeply recursive template instantiations on complex ASTs, even with
only a moderately high instantiation depth limit.
The user experience in these cases is generally terrible: we crash with
no hint of what went wrong. Under this patch, we attempt to do better:
* Detect when the stack is nearly exhausted, and produce a warning with a
nice template instantiation backtrace, telling the user that we might
run slowly or crash.
* For cases where we're forced to trigger recursive template
instantiation in arbitrarily-deeply-nested contexts, check whether
we're nearly out of stack space and allocate a new stack (by spawning
a new thread) after producing the warning.
Reviewers: rnk, aaron.ballman
Subscribers: mgorny, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D66361
llvm-svn: 369940
2019-08-27 02:18:07 +08:00
|
|
|
Stack.cpp
|
2020-05-05 11:22:06 +08:00
|
|
|
TargetID.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
TargetInfo.cpp
|
|
|
|
Targets.cpp
|
2017-07-22 06:37:03 +08:00
|
|
|
Targets/AArch64.cpp
|
|
|
|
Targets/AMDGPU.cpp
|
2018-11-28 03:52:10 +08:00
|
|
|
Targets/ARC.cpp
|
2017-07-22 06:37:03 +08:00
|
|
|
Targets/ARM.cpp
|
|
|
|
Targets/AVR.cpp
|
|
|
|
Targets/BPF.cpp
|
|
|
|
Targets/Hexagon.cpp
|
|
|
|
Targets/Lanai.cpp
|
2021-04-23 01:18:44 +08:00
|
|
|
Targets/Le64.cpp
|
2021-03-08 08:33:22 +08:00
|
|
|
Targets/M68k.cpp
|
2017-07-22 06:37:03 +08:00
|
|
|
Targets/MSP430.cpp
|
|
|
|
Targets/Mips.cpp
|
|
|
|
Targets/NVPTX.cpp
|
|
|
|
Targets/OSTargets.cpp
|
|
|
|
Targets/PNaCl.cpp
|
|
|
|
Targets/PPC.cpp
|
2018-01-11 21:36:56 +08:00
|
|
|
Targets/RISCV.cpp
|
2017-07-22 06:37:03 +08:00
|
|
|
Targets/SPIR.cpp
|
|
|
|
Targets/Sparc.cpp
|
|
|
|
Targets/SystemZ.cpp
|
|
|
|
Targets/TCE.cpp
|
2020-06-24 16:11:59 +08:00
|
|
|
Targets/VE.cpp
|
2017-07-22 06:37:03 +08:00
|
|
|
Targets/WebAssembly.cpp
|
|
|
|
Targets/X86.cpp
|
|
|
|
Targets/XCore.cpp
|
2008-10-26 08:56:18 +08:00
|
|
|
TokenKinds.cpp
|
2020-06-11 21:08:27 +08:00
|
|
|
TypeTraits.cpp
|
2009-10-06 04:33:49 +08:00
|
|
|
Version.cpp
|
2014-04-30 00:25:26 +08:00
|
|
|
Warnings.cpp
|
2018-04-13 10:31:58 +08:00
|
|
|
XRayInstr.cpp
|
2017-03-30 08:29:36 +08:00
|
|
|
XRayLists.cpp
|
2014-11-20 06:03:48 +08:00
|
|
|
${version_inc}
|
[openmp] Base of tablegen generated OpenMP common declaration
Summary:
As discussed previously when landing patch for OpenMP in Flang, the idea is
to share common part of the OpenMP declaration between the different Frontend.
While doing this it was thought that moving to tablegen instead of Macros will also
give a cleaner and more powerful way of generating these declaration.
This first part of a future series of patches is setting up the base .td file for
DirectiveLanguage as well as the OpenMP version of it. The base file is meant to
be used by other directive language such as OpenACC.
In this first patch, the Directive and Clause enums are generated with tablegen
instead of the macros on OMPConstants.h. The next pacth will extend this
to other enum and move the Flang frontend to use it.
Reviewers: jdoerfert, DavidTruby, fghanim, ABataev, jdenny, hfinkel, jhuber6, kiranchandramohan, kiranktp
Reviewed By: jdoerfert, jdenny
Subscribers: arphaman, martong, cfe-commits, mgorny, yaxunl, hiraditya, guansong, jfb, sstefan1, aaron.ballman, llvm-commits
Tags: #llvm, #openmp, #clang
Differential Revision: https://reviews.llvm.org/D81736
2020-06-23 21:29:50 +08:00
|
|
|
|
|
|
|
DEPENDS
|
|
|
|
omp_gen
|
2008-10-26 08:56:18 +08:00
|
|
|
)
|
2009-03-17 07:06:59 +08:00
|
|
|
|