Skip to content

Commit d5f236c

Browse files
author
Hal Finkel
committed
replace clang -> lfort
1 parent f6fd00b commit d5f236c

File tree

6,133 files changed

+22428
-22428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,133 files changed

+22428
-22428
lines changed

.arcconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"project_id" : "clang",
2+
"project_id" : "lfort",
33
"conduit_uri" : "http://llvm-reviews.chandlerc.com/"
44
}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cscope.out
2828
#==============================================================================#
2929
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
3030
#==============================================================================#
31-
# Clang extra user tools, which is tracked independently (clang-tools-extra).
31+
# LFort extra user tools, which is tracked independently (lfort-tools-extra).
3232
tools/extra
3333
# Sphinx build products
3434
docs/_build

CMakeLists.txt

+75-75
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
# If we are not building as a part of LLVM, build Clang as an
1+
# If we are not building as a part of LLVM, build LFort as an
22
# standalone project, using LLVM as an external library:
33
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
4-
project(Clang)
4+
project(LFort)
55
cmake_minimum_required(VERSION 2.8)
66

7-
set(CLANG_PATH_TO_LLVM_SOURCE "" CACHE PATH
7+
set(LFORT_PATH_TO_LLVM_SOURCE "" CACHE PATH
88
"Path to LLVM source code. Not necessary if using an installed LLVM.")
9-
set(CLANG_PATH_TO_LLVM_BUILD "" CACHE PATH
9+
set(LFORT_PATH_TO_LLVM_BUILD "" CACHE PATH
1010
"Path to the directory where LLVM was built or installed.")
1111

12-
if( CLANG_PATH_TO_LLVM_SOURCE )
13-
if( NOT EXISTS "${CLANG_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake" )
14-
message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_SOURCE to the root directory of LLVM source code.")
12+
if( LFORT_PATH_TO_LLVM_SOURCE )
13+
if( NOT EXISTS "${LFORT_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake" )
14+
message(FATAL_ERROR "Please set LFORT_PATH_TO_LLVM_SOURCE to the root directory of LLVM source code.")
1515
else()
16-
get_filename_component(LLVM_MAIN_SRC_DIR ${CLANG_PATH_TO_LLVM_SOURCE}
16+
get_filename_component(LLVM_MAIN_SRC_DIR ${LFORT_PATH_TO_LLVM_SOURCE}
1717
ABSOLUTE)
1818
list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
1919
endif()
2020
endif()
2121

22-
if( NOT EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
22+
if( NOT EXISTS "${LFORT_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
2323
# Looking for bin/Debug/llvm-tblgen is a complete hack. How can we get
2424
# around this?
25-
if( NOT EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/Debug/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
26-
message(FATAL_ERROR "Please set CLANG_PATH_TO_LLVM_BUILD to a directory containing a LLVM build.")
25+
if( NOT EXISTS "${LFORT_PATH_TO_LLVM_BUILD}/bin/Debug/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
26+
message(FATAL_ERROR "Please set LFORT_PATH_TO_LLVM_BUILD to a directory containing a LLVM build.")
2727
endif()
2828
endif()
2929

30-
list(APPEND CMAKE_MODULE_PATH "${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
30+
list(APPEND CMAKE_MODULE_PATH "${LFORT_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
3131

32-
get_filename_component(PATH_TO_LLVM_BUILD ${CLANG_PATH_TO_LLVM_BUILD}
32+
get_filename_component(PATH_TO_LLVM_BUILD ${LFORT_PATH_TO_LLVM_BUILD}
3333
ABSOLUTE)
3434

3535
include(AddLLVM)
3636
include(TableGen)
37-
include("${CLANG_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
37+
include("${LFORT_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
3838
include(HandleLLVMOptions)
3939

4040
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
@@ -46,7 +46,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
4646
include_directories("${PATH_TO_LLVM_BUILD}/include" "${LLVM_MAIN_INCLUDE_DIR}")
4747
link_directories("${PATH_TO_LLVM_BUILD}/lib")
4848

49-
if( EXISTS "${CLANG_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
49+
if( EXISTS "${LFORT_PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}" )
5050
set(LLVM_TABLEGEN_EXE "${PATH_TO_LLVM_BUILD}/bin/llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
5151
else()
5252
# FIXME: This is an utter hack.
@@ -65,33 +65,33 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
6565
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
6666
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib )
6767

68-
set( CLANG_BUILT_STANDALONE 1 )
68+
set( LFORT_BUILT_STANDALONE 1 )
6969

7070
find_package(LibXml2)
7171
if (LIBXML2_FOUND)
72-
set(CLANG_HAVE_LIBXML 1)
72+
set(LFORT_HAVE_LIBXML 1)
7373
endif ()
7474
endif()
7575

76-
set(CLANG_RESOURCE_DIR "" CACHE STRING
77-
"Relative directory from the Clang binary to its resource files.")
76+
set(LFORT_RESOURCE_DIR "" CACHE STRING
77+
"Relative directory from the LFort binary to its resource files.")
7878

7979
set(C_INCLUDE_DIRS "" CACHE STRING
80-
"Colon separated list of directories clang will search for headers.")
80+
"Colon separated list of directories lfort will search for headers.")
8181

8282
set(GCC_INSTALL_PREFIX "" CACHE PATH "Directory where gcc is installed." )
8383
set(DEFAULT_SYSROOT "" CACHE PATH
8484
"Default <path> to all compiler invocations for --sysroot=<path>." )
8585

86-
set(CLANG_VENDOR "" CACHE STRING
86+
set(LFORT_VENDOR "" CACHE STRING
8787
"Vendor-specific text for showing with version information.")
8888

89-
if( CLANG_VENDOR )
90-
add_definitions( -DCLANG_VENDOR="${CLANG_VENDOR} " )
89+
if( LFORT_VENDOR )
90+
add_definitions( -DLFORT_VENDOR="${LFORT_VENDOR} " )
9191
endif()
9292

93-
set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
94-
set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
93+
set(LFORT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
94+
set(LFORT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
9595

9696
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
9797
message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite "
@@ -104,36 +104,36 @@ endif()
104104
if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
105105
file(GLOB_RECURSE
106106
tablegenned_files_on_include_dir
107-
"${CLANG_SOURCE_DIR}/include/clang/*.inc")
107+
"${LFORT_SOURCE_DIR}/include/lfort/*.inc")
108108
if( tablegenned_files_on_include_dir )
109109
message(FATAL_ERROR "Apparently there is a previous in-source build, "
110110
"probably as the result of running `configure' and `make' on "
111-
"${CLANG_SOURCE_DIR}. This may cause problems. The suspicious files are:\n"
111+
"${LFORT_SOURCE_DIR}. This may cause problems. The suspicious files are:\n"
112112
"${tablegenned_files_on_include_dir}\nPlease clean the source directory.")
113113
endif()
114114
endif()
115115

116-
# Compute the Clang version from the LLVM version.
117-
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
116+
# Compute the LFort version from the LLVM version.
117+
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" LFORT_VERSION
118118
${PACKAGE_VERSION})
119-
message(STATUS "Clang version: ${CLANG_VERSION}")
120-
121-
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR
122-
${CLANG_VERSION})
123-
string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" CLANG_VERSION_MINOR
124-
${CLANG_VERSION})
125-
if (${CLANG_VERSION} MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
126-
set(CLANG_HAS_VERSION_PATCHLEVEL 1)
127-
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CLANG_VERSION_PATCHLEVEL
128-
${CLANG_VERSION})
119+
message(STATUS "LFort version: ${LFORT_VERSION}")
120+
121+
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" LFORT_VERSION_MAJOR
122+
${LFORT_VERSION})
123+
string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" LFORT_VERSION_MINOR
124+
${LFORT_VERSION})
125+
if (${LFORT_VERSION} MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
126+
set(LFORT_HAS_VERSION_PATCHLEVEL 1)
127+
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" LFORT_VERSION_PATCHLEVEL
128+
${LFORT_VERSION})
129129
else()
130-
set(CLANG_HAS_VERSION_PATCHLEVEL 0)
130+
set(LFORT_HAS_VERSION_PATCHLEVEL 0)
131131
endif()
132132

133133
# Configure the Version.inc file.
134134
configure_file(
135-
${CMAKE_CURRENT_SOURCE_DIR}/include/clang/Basic/Version.inc.in
136-
${CMAKE_CURRENT_BINARY_DIR}/include/clang/Basic/Version.inc)
135+
${CMAKE_CURRENT_SOURCE_DIR}/include/lfort/Basic/Version.inc.in
136+
${CMAKE_CURRENT_BINARY_DIR}/include/lfort/Basic/Version.inc)
137137

138138
# Add appropriate flags for GCC
139139
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
@@ -145,14 +145,14 @@ if (APPLE)
145145
endif ()
146146

147147
configure_file(
148-
${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake
149-
${CLANG_BINARY_DIR}/include/clang/Config/config.h)
148+
${LFORT_SOURCE_DIR}/include/lfort/Config/config.h.cmake
149+
${LFORT_BINARY_DIR}/include/lfort/Config/config.h)
150150

151151
include(LLVMParseArguments)
152152

153-
function(clang_tablegen)
153+
function(lfort_tablegen)
154154
# Syntax:
155-
# clang_tablegen output-file [tablegen-arg ...] SOURCE source-file
155+
# lfort_tablegen output-file [tablegen-arg ...] SOURCE source-file
156156
# [[TARGET cmake-target-name] [DEPENDS extra-dependency ...]]
157157
#
158158
# Generates a custom command for invoking tblgen as
@@ -166,36 +166,36 @@ function(clang_tablegen)
166166
parse_arguments( CTG "SOURCE;TARGET;DEPENDS" "" ${ARGN} )
167167

168168
if( NOT CTG_SOURCE )
169-
message(FATAL_ERROR "SOURCE source-file required by clang_tablegen")
169+
message(FATAL_ERROR "SOURCE source-file required by lfort_tablegen")
170170
endif()
171171

172172
set( LLVM_TARGET_DEFINITIONS ${CTG_SOURCE} )
173-
tablegen( CLANG ${CTG_DEFAULT_ARGS} )
173+
tablegen( LFORT ${CTG_DEFAULT_ARGS} )
174174

175175
list( GET CTG_DEFAULT_ARGS 0 output_file )
176176
if( CTG_TARGET )
177177
add_custom_target( ${CTG_TARGET} DEPENDS ${output_file} ${CTG_DEPENDS} )
178-
set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "Clang tablegenning")
178+
set_target_properties( ${CTG_TARGET} PROPERTIES FOLDER "LFort tablegenning")
179179
endif()
180-
endfunction(clang_tablegen)
180+
endfunction(lfort_tablegen)
181181

182-
macro(add_clang_library name)
182+
macro(add_lfort_library name)
183183
llvm_process_sources(srcs ${ARGN})
184184
if(MSVC_IDE OR XCODE)
185185
# Add public headers
186186
file(RELATIVE_PATH lib_path
187-
${CLANG_SOURCE_DIR}/lib/
187+
${LFORT_SOURCE_DIR}/lib/
188188
${CMAKE_CURRENT_SOURCE_DIR}
189189
)
190190
if(NOT lib_path MATCHES "^[.][.]")
191191
file( GLOB_RECURSE headers
192-
${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.h
193-
${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.def
192+
${LFORT_SOURCE_DIR}/include/lfort/${lib_path}/*.h
193+
${LFORT_SOURCE_DIR}/include/lfort/${lib_path}/*.def
194194
)
195195
set_source_files_properties(${headers} PROPERTIES HEADER_FILE_ONLY ON)
196196

197197
file( GLOB_RECURSE tds
198-
${CLANG_SOURCE_DIR}/include/clang/${lib_path}/*.td
198+
${LFORT_SOURCE_DIR}/include/lfort/${lib_path}/*.td
199199
)
200200
source_group("TableGen descriptions" FILES ${tds})
201201
set_source_files_properties(${tds}} PROPERTIES HEADER_FILE_ONLY ON)
@@ -223,13 +223,13 @@ macro(add_clang_library name)
223223
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
224224
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
225225
RUNTIME DESTINATION bin)
226-
set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
227-
endmacro(add_clang_library)
226+
set_target_properties(${name} PROPERTIES FOLDER "LFort libraries")
227+
endmacro(add_lfort_library)
228228

229-
macro(add_clang_executable name)
229+
macro(add_lfort_executable name)
230230
add_llvm_executable( ${name} ${ARGN} )
231-
set_target_properties(${name} PROPERTIES FOLDER "Clang executables")
232-
endmacro(add_clang_executable)
231+
set_target_properties(${name} PROPERTIES FOLDER "LFort executables")
232+
endmacro(add_lfort_executable)
233233

234234
include_directories(BEFORE
235235
${CMAKE_CURRENT_BINARY_DIR}/include
@@ -255,16 +255,16 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
255255
add_definitions( -D_GNU_SOURCE )
256256

257257
# FIXME: They should be options.
258-
add_definitions(-DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER)
258+
add_definitions(-DLFORT_ENABLE_ARCMT -DLFORT_ENABLE_REWRITER -DLFORT_ENABLE_STATIC_ANALYZER)
259259

260-
# Clang version information
261-
set(CLANG_EXECUTABLE_VERSION
262-
"${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
263-
"Version number that will be placed into the clang executable, in the form XX.YY")
264-
set(LIBCLANG_LIBRARY_VERSION
265-
"${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}" CACHE STRING
266-
"Version number that will be placed into the libclang library , in the form XX.YY")
267-
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
260+
# LFort version information
261+
set(LFORT_EXECUTABLE_VERSION
262+
"${LFORT_VERSION_MAJOR}.${LFORT_VERSION_MINOR}" CACHE STRING
263+
"Version number that will be placed into the lfort executable, in the form XX.YY")
264+
set(LIBLFORT_LIBRARY_VERSION
265+
"${LFORT_VERSION_MAJOR}.${LFORT_VERSION_MINOR}" CACHE STRING
266+
"Version number that will be placed into the liblfort library , in the form XX.YY")
267+
mark_as_advanced(LFORT_EXECUTABLE_VERSION LIBLFORT_LIBRARY_VERSION)
268268

269269
add_subdirectory(utils/TableGen)
270270

@@ -273,24 +273,24 @@ add_subdirectory(lib)
273273
add_subdirectory(tools)
274274
add_subdirectory(runtime)
275275

276-
option(CLANG_BUILD_EXAMPLES "Build CLANG example programs by default." OFF)
276+
option(LFORT_BUILD_EXAMPLES "Build LFORT example programs by default." OFF)
277277
add_subdirectory(examples)
278278

279279
# TODO: docs.
280280
add_subdirectory(test)
281281

282282
if( LLVM_INCLUDE_TESTS )
283-
if( NOT CLANG_BUILT_STANDALONE )
283+
if( NOT LFORT_BUILT_STANDALONE )
284284
add_subdirectory(unittests)
285285
endif()
286286
endif()
287287

288288
# Workaround for MSVS10 to avoid the Dialog Hell
289289
# FIXME: This could be removed with future version of CMake.
290-
if( CLANG_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 )
291-
set(CLANG_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/Clang.sln")
292-
if( EXISTS "${CLANG_SLN_FILENAME}" )
293-
file(APPEND "${CLANG_SLN_FILENAME}" "\n# This should be regenerated!\n")
290+
if( LFORT_BUILT_STANDALONE AND MSVC_VERSION EQUAL 1600 )
291+
set(LFORT_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/LFort.sln")
292+
if( EXISTS "${LFORT_SLN_FILENAME}" )
293+
file(APPEND "${LFORT_SLN_FILENAME}" "\n# This should be regenerated!\n")
294294
endif()
295295
endif()
296296

CODE_OWNERS.TXT

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This file is a list of the people responsible for ensuring that patches for a
2-
particular part of Clang are reviewed, either by themself or by someone else.
3-
They are also the gatekeepers for their part of Clang, with the final word on
2+
particular part of LFort are reviewed, either by themself or by someone else.
3+
They are also the gatekeepers for their part of LFort, with the final word on
44
what goes in or not.
55

66
The list is sorted by surname and formatted to allow easy grepping and
@@ -18,23 +18,23 @@ E: [email protected]
1818
D: Debug Information, autotools/configure/make build, inline assembly
1919

2020
N: Doug Gregor
21-
D: All parts of Clang not covered by someone else
21+
D: All parts of LFort not covered by someone else
2222

2323
N: Anton Korobeynikov
2424
2525
D: Exception handling, Windows codegen, ARM EABI
2626

2727
N: Ted Kremenek
28-
D: Clang Static Analyzer
28+
D: LFort Static Analyzer
2929

3030
N: John McCall
3131
32-
D: Clang LLVM IR generation
32+
D: LFort LLVM IR generation
3333

3434
N: Chad Rosier
3535
3636
D: MS-inline asm, and the compiler driver
3737

3838
N: Richard Smith
3939
40-
D: Clang Semantic Analysis (tools/clang/lib/Sema/* tools/clang/include/clang/Sema/*)
40+
D: LFort Semantic Analysis (tools/lfort/lib/Sema/* tools/lfort/include/lfort/Sema/*)

INPUTS/iostream.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// clang -I/usr/include/c++/4.0.0 -I/usr/include/c++/4.0.0/powerpc-apple-darwin8 -I/usr/include/c++/4.0.0/backward INPUTS/iostream.cc -Eonly
1+
// lfort -I/usr/include/c++/4.0.0 -I/usr/include/c++/4.0.0/powerpc-apple-darwin8 -I/usr/include/c++/4.0.0/backward INPUTS/iostream.cc -Eonly
22

33
#include <iostream>
44

0 commit comments

Comments
 (0)