mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 01:15:36 +00:00
Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9363f739cd
commit
1f6efa3996
@ -276,7 +276,7 @@ endif( MSVC )
|
|||||||
include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR})
|
include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR})
|
||||||
|
|
||||||
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
||||||
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-include llvm/System/Solaris.h")
|
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-include llvm/Support/Solaris.h")
|
||||||
endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
|
||||||
|
|
||||||
include(AddLLVM)
|
include(AddLLVM)
|
||||||
@ -292,9 +292,8 @@ if( MINGW )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(lib/Support)
|
add_subdirectory(lib/Support)
|
||||||
add_subdirectory(lib/System)
|
|
||||||
|
|
||||||
# Everything else depends on Support and System:
|
# Everything else depends on Support:
|
||||||
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} )
|
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} )
|
||||||
|
|
||||||
set(LLVM_TABLEGEN "tblgen" CACHE
|
set(LLVM_TABLEGEN "tblgen" CACHE
|
||||||
@ -346,7 +345,7 @@ foreach(t ${LLVM_TARGETS_TO_BUILD})
|
|||||||
set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
|
set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
|
||||||
file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
|
file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
|
||||||
if( asmp_file )
|
if( asmp_file )
|
||||||
set(LLVM_ENUM_ASM_PRINTERS
|
set(LLVM_ENUM_ASM_PRINTERS
|
||||||
"${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
|
"${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
|
||||||
endif()
|
endif()
|
||||||
if( EXISTS ${td}/InstPrinter/CMakeLists.txt )
|
if( EXISTS ${td}/InstPrinter/CMakeLists.txt )
|
||||||
@ -354,7 +353,7 @@ foreach(t ${LLVM_TARGETS_TO_BUILD})
|
|||||||
endif()
|
endif()
|
||||||
if( EXISTS ${td}/AsmParser/CMakeLists.txt )
|
if( EXISTS ${td}/AsmParser/CMakeLists.txt )
|
||||||
add_subdirectory(lib/Target/${t}/AsmParser)
|
add_subdirectory(lib/Target/${t}/AsmParser)
|
||||||
set(LLVM_ENUM_ASM_PARSERS
|
set(LLVM_ENUM_ASM_PARSERS
|
||||||
"${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
|
"${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
|
||||||
endif()
|
endif()
|
||||||
if( EXISTS ${td}/Disassembler/CMakeLists.txt )
|
if( EXISTS ${td}/Disassembler/CMakeLists.txt )
|
||||||
|
10
Makefile
10
Makefile
@ -10,7 +10,7 @@
|
|||||||
LEVEL := .
|
LEVEL := .
|
||||||
|
|
||||||
# Top-Level LLVM Build Stages:
|
# Top-Level LLVM Build Stages:
|
||||||
# 1. Build lib/System and lib/Support, which are used by utils (tblgen).
|
# 1. Build lib/Support, which is used by utils (tblgen).
|
||||||
# 2. Build utils, which is used by VMCore.
|
# 2. Build utils, which is used by VMCore.
|
||||||
# 3. Build VMCore, which builds the Intrinsics.inc file used by libs.
|
# 3. Build VMCore, which builds the Intrinsics.inc file used by libs.
|
||||||
# 4. Build libs, which are needed by llvm-config.
|
# 4. Build libs, which are needed by llvm-config.
|
||||||
@ -27,10 +27,10 @@ LEVEL := .
|
|||||||
ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style").
|
ifneq ($(findstring llvmCore, $(RC_ProjectName)),llvmCore) # Normal build (not "Apple-style").
|
||||||
|
|
||||||
ifeq ($(BUILD_DIRS_ONLY),1)
|
ifeq ($(BUILD_DIRS_ONLY),1)
|
||||||
DIRS := lib/System lib/Support utils
|
DIRS := lib/Support utils
|
||||||
OPTIONAL_DIRS :=
|
OPTIONAL_DIRS :=
|
||||||
else
|
else
|
||||||
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-shlib \
|
DIRS := lib/Support utils lib/VMCore lib tools/llvm-shlib \
|
||||||
tools/llvm-config tools runtime docs unittests
|
tools/llvm-config tools runtime docs unittests
|
||||||
OPTIONAL_DIRS := projects bindings
|
OPTIONAL_DIRS := projects bindings
|
||||||
endif
|
endif
|
||||||
@ -159,7 +159,7 @@ dist-hook::
|
|||||||
$(Echo) Eliminating files constructed by configure
|
$(Echo) Eliminating files constructed by configure
|
||||||
$(Verb) $(RM) -f \
|
$(Verb) $(RM) -f \
|
||||||
$(TopDistDir)/include/llvm/Config/config.h \
|
$(TopDistDir)/include/llvm/Config/config.h \
|
||||||
$(TopDistDir)/include/llvm/System/DataTypes.h
|
$(TopDistDir)/include/llvm/Support/DataTypes.h
|
||||||
|
|
||||||
clang-only: all
|
clang-only: all
|
||||||
tools-only: all
|
tools-only: all
|
||||||
@ -178,7 +178,7 @@ FilesToConfig := \
|
|||||||
include/llvm/Config/AsmPrinters.def \
|
include/llvm/Config/AsmPrinters.def \
|
||||||
include/llvm/Config/AsmParsers.def \
|
include/llvm/Config/AsmParsers.def \
|
||||||
include/llvm/Config/Disassemblers.def \
|
include/llvm/Config/Disassemblers.def \
|
||||||
include/llvm/System/DataTypes.h \
|
include/llvm/Support/DataTypes.h \
|
||||||
tools/llvmc/src/Base.td
|
tools/llvmc/src/Base.td
|
||||||
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
|
FilesToConfigPATH := $(addprefix $(LLVM_OBJ_ROOT)/,$(FilesToConfig))
|
||||||
|
|
||||||
|
@ -634,11 +634,11 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),SunOS)
|
ifeq ($(HOST_OS),SunOS)
|
||||||
CPP.BaseFlags += -include llvm/System/Solaris.h
|
CPP.BaseFlags += -include llvm/Support/Solaris.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HOST_OS),AuroraUX)
|
ifeq ($(HOST_OS),AuroraUX)
|
||||||
CPP.BaseFlags += -include llvm/System/Solaris.h
|
CPP.BaseFlags += -include llvm/Support/Solaris.h
|
||||||
endif # !HOST_OS - AuroraUX.
|
endif # !HOST_OS - AuroraUX.
|
||||||
|
|
||||||
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
|
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
|
||||||
|
@ -319,7 +319,7 @@ AC_SUBST(LINKALL,$llvm_cv_link_all_option)
|
|||||||
AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option)
|
AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option)
|
||||||
|
|
||||||
dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type
|
dnl Set the "LLVM_ON_*" variables based on llvm_cv_platform_type
|
||||||
dnl This is used by lib/System to determine the basic kind of implementation
|
dnl This is used by lib/Support to determine the basic kind of implementation
|
||||||
dnl to use.
|
dnl to use.
|
||||||
case $llvm_cv_platform_type in
|
case $llvm_cv_platform_type in
|
||||||
Unix)
|
Unix)
|
||||||
@ -1625,7 +1625,7 @@ AC_CONFIG_FILES([include/llvm/Config/Targets.def])
|
|||||||
AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
|
AC_CONFIG_FILES([include/llvm/Config/AsmPrinters.def])
|
||||||
AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
|
AC_CONFIG_FILES([include/llvm/Config/AsmParsers.def])
|
||||||
AC_CONFIG_FILES([include/llvm/Config/Disassemblers.def])
|
AC_CONFIG_FILES([include/llvm/Config/Disassemblers.def])
|
||||||
AC_CONFIG_HEADERS([include/llvm/System/DataTypes.h])
|
AC_CONFIG_HEADERS([include/llvm/Support/DataTypes.h])
|
||||||
|
|
||||||
dnl Configure the makefile's configuration data
|
dnl Configure the makefile's configuration data
|
||||||
AC_CONFIG_FILES([Makefile.config])
|
AC_CONFIG_FILES([Makefile.config])
|
||||||
|
@ -277,7 +277,7 @@ configure_file(
|
|||||||
)
|
)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${LLVM_MAIN_INCLUDE_DIR}/llvm/System/DataTypes.h.cmake
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
|
||||||
${LLVM_BINARY_DIR}/include/llvm/System/DataTypes.h
|
${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
configure
vendored
4
configure
vendored
@ -20920,7 +20920,7 @@ ac_config_files="$ac_config_files include/llvm/Config/AsmParsers.def"
|
|||||||
|
|
||||||
ac_config_files="$ac_config_files include/llvm/Config/Disassemblers.def"
|
ac_config_files="$ac_config_files include/llvm/Config/Disassemblers.def"
|
||||||
|
|
||||||
ac_config_headers="$ac_config_headers include/llvm/System/DataTypes.h"
|
ac_config_headers="$ac_config_headers include/llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile.config"
|
ac_config_files="$ac_config_files Makefile.config"
|
||||||
@ -21546,7 +21546,7 @@ do
|
|||||||
"include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;;
|
"include/llvm/Config/AsmPrinters.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmPrinters.def" ;;
|
||||||
"include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;;
|
"include/llvm/Config/AsmParsers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/AsmParsers.def" ;;
|
||||||
"include/llvm/Config/Disassemblers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Disassemblers.def" ;;
|
"include/llvm/Config/Disassemblers.def") CONFIG_FILES="$CONFIG_FILES include/llvm/Config/Disassemblers.def" ;;
|
||||||
"include/llvm/System/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/System/DataTypes.h" ;;
|
"include/llvm/Support/DataTypes.h") CONFIG_HEADERS="$CONFIG_HEADERS include/llvm/Support/DataTypes.h" ;;
|
||||||
"Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
|
"Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
|
||||||
"llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;;
|
"llvm.spec") CONFIG_FILES="$CONFIG_FILES llvm.spec" ;;
|
||||||
"tools/llvmc/src/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/src/Base.td" ;;
|
"tools/llvmc/src/Base.td") CONFIG_FILES="$CONFIG_FILES tools/llvmc/src/Base.td" ;;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef LLVM_C_ENHANCEDDISASSEMBLY_H
|
#ifndef LLVM_C_ENHANCEDDISASSEMBLY_H
|
||||||
#define LLVM_C_ENHANCEDDISASSEMBLY_H
|
#define LLVM_C_ENHANCEDDISASSEMBLY_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_ADT_EQUIVALENCECLASSES_H
|
#ifndef LLVM_ADT_EQUIVALENCECLASSES_H
|
||||||
#define LLVM_ADT_EQUIVALENCECLASSES_H
|
#define LLVM_ADT_EQUIVALENCECLASSES_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#ifndef LLVM_ADT_FOLDINGSET_H
|
#ifndef LLVM_ADT_FOLDINGSET_H
|
||||||
#define LLVM_ADT_FOLDINGSET_H
|
#define LLVM_ADT_FOLDINGSET_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/Support/Allocator.h"
|
#include "llvm/Support/Allocator.h"
|
||||||
#include "llvm/ADT/FoldingSet.h"
|
#include "llvm/ADT/FoldingSet.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/Support/Allocator.h"
|
#include "llvm/Support/Allocator.h"
|
||||||
#include "llvm/ADT/FoldingSet.h"
|
#include "llvm/ADT/FoldingSet.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/PointerLikeTypeTraits.h"
|
#include "llvm/Support/PointerLikeTypeTraits.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/ADT/ilist_node.h"
|
#include "llvm/ADT/ilist_node.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#ifndef LLVM_ADT_STATISTIC_H
|
#ifndef LLVM_ADT_STATISTIC_H
|
||||||
#define LLVM_ADT_STATISTIC_H
|
#define LLVM_ADT_STATISTIC_H
|
||||||
|
|
||||||
#include "llvm/System/Atomic.h"
|
#include "llvm/Support/Atomic.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class raw_ostream;
|
class raw_ostream;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_ADT_STRINGEXTRAS_H
|
#ifndef LLVM_ADT_STRINGEXTRAS_H
|
||||||
#define LLVM_ADT_STRINGEXTRAS_H
|
#define LLVM_ADT_STRINGEXTRAS_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/ADT/APFloat.h"
|
#include "llvm/ADT/APFloat.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#define LLVM_ADT_TWINE_H
|
#define LLVM_ADT_TWINE_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/Support/ValueHandle.h"
|
#include "llvm/Support/ValueHandle.h"
|
||||||
#include "llvm/Support/type_traits.h"
|
#include "llvm/Support/type_traits.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/Support/Mutex.h"
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
#include "llvm/Support/ValueHandle.h"
|
#include "llvm/Support/ValueHandle.h"
|
||||||
#include "llvm/System/IncludeFile.h"
|
#include "llvm/Support/IncludeFile.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_ANALYSIS_DIBUILDER_H
|
#ifndef LLVM_ANALYSIS_DIBUILDER_H
|
||||||
#define LLVM_ANALYSIS_DIBUILDER_H
|
#define LLVM_ANALYSIS_DIBUILDER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Instructions.h"
|
#include "llvm/Instructions.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/ValueHandle.h"
|
#include "llvm/Support/ValueHandle.h"
|
||||||
#include "llvm/Support/Allocator.h"
|
#include "llvm/Support/Allocator.h"
|
||||||
#include "llvm/Support/ConstantRange.h"
|
#include "llvm/Support/ConstantRange.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_ANALYSIS_VALUETRACKING_H
|
#ifndef LLVM_ANALYSIS_VALUETRACKING_H
|
||||||
#define LLVM_ANALYSIS_VALUETRACKING_H
|
#define LLVM_ANALYSIS_VALUETRACKING_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "llvm/SymbolTableListTraits.h"
|
#include "llvm/SymbolTableListTraits.h"
|
||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/ADT/Twine.h"
|
#include "llvm/ADT/Twine.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -58,9 +58,9 @@ private:
|
|||||||
/// tables. The type of a BasicBlock is "Type::LabelTy" because the basic block
|
/// tables. The type of a BasicBlock is "Type::LabelTy" because the basic block
|
||||||
/// represents a label to which a branch can jump.
|
/// represents a label to which a branch can jump.
|
||||||
///
|
///
|
||||||
/// A well formed basic block is formed of a list of non-terminating
|
/// A well formed basic block is formed of a list of non-terminating
|
||||||
/// instructions followed by a single TerminatorInst instruction.
|
/// instructions followed by a single TerminatorInst instruction.
|
||||||
/// TerminatorInst's may not occur in the middle of basic blocks, and must
|
/// TerminatorInst's may not occur in the middle of basic blocks, and must
|
||||||
/// terminate the blocks. The BasicBlock class allows malformed basic blocks to
|
/// terminate the blocks. The BasicBlock class allows malformed basic blocks to
|
||||||
/// occur because it may be useful in the intermediate stage of constructing or
|
/// occur because it may be useful in the intermediate stage of constructing or
|
||||||
/// modifying a program. However, the verifier will ensure that basic blocks
|
/// modifying a program. However, the verifier will ensure that basic blocks
|
||||||
@ -90,7 +90,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
/// getContext - Get the context in which this basic block lives.
|
/// getContext - Get the context in which this basic block lives.
|
||||||
LLVMContext &getContext() const;
|
LLVMContext &getContext() const;
|
||||||
|
|
||||||
/// Instruction iterators...
|
/// Instruction iterators...
|
||||||
typedef InstListType::iterator iterator;
|
typedef InstListType::iterator iterator;
|
||||||
typedef InstListType::const_iterator const_iterator;
|
typedef InstListType::const_iterator const_iterator;
|
||||||
@ -98,7 +98,7 @@ public:
|
|||||||
/// Create - Creates a new BasicBlock. If the Parent parameter is specified,
|
/// Create - Creates a new BasicBlock. If the Parent parameter is specified,
|
||||||
/// the basic block is automatically inserted at either the end of the
|
/// the basic block is automatically inserted at either the end of the
|
||||||
/// function (if InsertBefore is 0), or before the specified basic block.
|
/// function (if InsertBefore is 0), or before the specified basic block.
|
||||||
static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "",
|
static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "",
|
||||||
Function *Parent = 0,BasicBlock *InsertBefore = 0) {
|
Function *Parent = 0,BasicBlock *InsertBefore = 0) {
|
||||||
return new BasicBlock(Context, Name, Parent, InsertBefore);
|
return new BasicBlock(Context, Name, Parent, InsertBefore);
|
||||||
}
|
}
|
||||||
@ -114,15 +114,15 @@ public:
|
|||||||
/// and BlockAddress's).
|
/// and BlockAddress's).
|
||||||
User *use_back() { return cast<User>(*use_begin());}
|
User *use_back() { return cast<User>(*use_begin());}
|
||||||
const User *use_back() const { return cast<User>(*use_begin());}
|
const User *use_back() const { return cast<User>(*use_begin());}
|
||||||
|
|
||||||
/// getTerminator() - If this is a well formed basic block, then this returns
|
/// getTerminator() - If this is a well formed basic block, then this returns
|
||||||
/// a pointer to the terminator instruction. If it is not, then you get a
|
/// a pointer to the terminator instruction. If it is not, then you get a
|
||||||
/// null pointer back.
|
/// null pointer back.
|
||||||
///
|
///
|
||||||
TerminatorInst *getTerminator();
|
TerminatorInst *getTerminator();
|
||||||
const TerminatorInst *getTerminator() const;
|
const TerminatorInst *getTerminator() const;
|
||||||
|
|
||||||
/// Returns a pointer to the first instructon in this block that is not a
|
/// Returns a pointer to the first instructon in this block that is not a
|
||||||
/// PHINode instruction. When adding instruction to the beginning of the
|
/// PHINode instruction. When adding instruction to the beginning of the
|
||||||
/// basic block, they should be added before the returned value, not before
|
/// basic block, they should be added before the returned value, not before
|
||||||
/// the first instruction, which might be PHI.
|
/// the first instruction, which might be PHI.
|
||||||
@ -137,7 +137,7 @@ public:
|
|||||||
const Instruction* getFirstNonPHIOrDbg() const {
|
const Instruction* getFirstNonPHIOrDbg() const {
|
||||||
return const_cast<BasicBlock*>(this)->getFirstNonPHIOrDbg();
|
return const_cast<BasicBlock*>(this)->getFirstNonPHIOrDbg();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// removeFromParent - This method unlinks 'this' from the containing
|
/// removeFromParent - This method unlinks 'this' from the containing
|
||||||
/// function, but does not delete it.
|
/// function, but does not delete it.
|
||||||
///
|
///
|
||||||
@ -147,15 +147,15 @@ public:
|
|||||||
/// and deletes it.
|
/// and deletes it.
|
||||||
///
|
///
|
||||||
void eraseFromParent();
|
void eraseFromParent();
|
||||||
|
|
||||||
/// moveBefore - Unlink this basic block from its current function and
|
/// moveBefore - Unlink this basic block from its current function and
|
||||||
/// insert it into the function that MovePos lives in, right before MovePos.
|
/// insert it into the function that MovePos lives in, right before MovePos.
|
||||||
void moveBefore(BasicBlock *MovePos);
|
void moveBefore(BasicBlock *MovePos);
|
||||||
|
|
||||||
/// moveAfter - Unlink this basic block from its current function and
|
/// moveAfter - Unlink this basic block from its current function and
|
||||||
/// insert it into the function that MovePos lives in, right after MovePos.
|
/// insert it into the function that MovePos lives in, right after MovePos.
|
||||||
void moveAfter(BasicBlock *MovePos);
|
void moveAfter(BasicBlock *MovePos);
|
||||||
|
|
||||||
|
|
||||||
/// getSinglePredecessor - If this basic block has a single predecessor block,
|
/// getSinglePredecessor - If this basic block has a single predecessor block,
|
||||||
/// return the block, otherwise return a null pointer.
|
/// return the block, otherwise return a null pointer.
|
||||||
@ -166,8 +166,8 @@ public:
|
|||||||
|
|
||||||
/// getUniquePredecessor - If this basic block has a unique predecessor block,
|
/// getUniquePredecessor - If this basic block has a unique predecessor block,
|
||||||
/// return the block, otherwise return a null pointer.
|
/// return the block, otherwise return a null pointer.
|
||||||
/// Note that unique predecessor doesn't mean single edge, there can be
|
/// Note that unique predecessor doesn't mean single edge, there can be
|
||||||
/// multiple edges from the unique predecessor to this block (for example
|
/// multiple edges from the unique predecessor to this block (for example
|
||||||
/// a switch statement with multiple cases having the same destination).
|
/// a switch statement with multiple cases having the same destination).
|
||||||
BasicBlock *getUniquePredecessor();
|
BasicBlock *getUniquePredecessor();
|
||||||
const BasicBlock *getUniquePredecessor() const {
|
const BasicBlock *getUniquePredecessor() const {
|
||||||
@ -247,7 +247,7 @@ public:
|
|||||||
/// hasAddressTaken - returns true if there are any uses of this basic block
|
/// hasAddressTaken - returns true if there are any uses of this basic block
|
||||||
/// other than direct branches, switches, etc. to it.
|
/// other than direct branches, switches, etc. to it.
|
||||||
bool hasAddressTaken() const { return getSubclassDataFromValue() != 0; }
|
bool hasAddressTaken() const { return getSubclassDataFromValue() != 0; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress
|
/// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress
|
||||||
/// objects using it. This is almost always 0, sometimes one, possibly but
|
/// objects using it. This is almost always 0, sometimes one, possibly but
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/ADT/ilist_node.h"
|
#include "llvm/ADT/ilist_node.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define LLVM_BITCODE_BITCODES_H
|
#define LLVM_BITCODE_BITCODES_H
|
||||||
|
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define LLVM_CODEGEN_ASMPRINTER_H
|
#define LLVM_CODEGEN_ASMPRINTER_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class BlockAddress;
|
class BlockAddress;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define LLVM_CODEGEN_BINARYOBJECT_H
|
#define LLVM_CODEGEN_BINARYOBJECT_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/MachineRelocation.h"
|
#include "llvm/CodeGen/MachineRelocation.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#define LLVM_CODEGEN_JITCODEEMITTER_H
|
#define LLVM_CODEGEN_JITCODEEMITTER_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/CodeGen/MachineCodeEmitter.h"
|
#include "llvm/CodeGen/MachineCodeEmitter.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHO_RELOCATION_H
|
#ifndef LLVM_CODEGEN_MACHO_RELOCATION_H
|
||||||
#define LLVM_CODEGEN_MACHO_RELOCATION_H
|
#define LLVM_CODEGEN_MACHO_RELOCATION_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINECODEEMITTER_H
|
#ifndef LLVM_CODEGEN_MACHINECODEEMITTER_H
|
||||||
#define LLVM_CODEGEN_MACHINECODEEMITTER_H
|
#define LLVM_CODEGEN_MACHINECODEEMITTER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifndef EE_MACHINE_CODE_INFO_H
|
#ifndef EE_MACHINE_CODE_INFO_H
|
||||||
#define EE_MACHINE_CODE_INFO_H
|
#define EE_MACHINE_CODE_INFO_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
//#include "llvm/ADT/IndexedMap.h"
|
//#include "llvm/ADT/IndexedMap.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
|
#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
|
||||||
#define LLVM_CODEGEN_MACHINEMEMOPERAND_H
|
#define LLVM_CODEGEN_MACHINEMEMOPERAND_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
#include "llvm/Support/Dwarf.h"
|
#include "llvm/Support/Dwarf.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
#include "llvm/Support/ValueHandle.h"
|
#include "llvm/Support/ValueHandle.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/ADT/PointerIntPair.h"
|
#include "llvm/ADT/PointerIntPair.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINEOPERAND_H
|
#ifndef LLVM_CODEGEN_MACHINEOPERAND_H
|
||||||
#define LLVM_CODEGEN_MACHINEOPERAND_H
|
#define LLVM_CODEGEN_MACHINEOPERAND_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_CODEGEN_MACHINERELOCATION_H
|
#ifndef LLVM_CODEGEN_MACHINERELOCATION_H
|
||||||
#define LLVM_CODEGEN_MACHINERELOCATION_H
|
#define LLVM_CODEGEN_MACHINERELOCATION_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#define LLVM_CODEGEN_EXACTHAZARDRECOGNIZER_H
|
#define LLVM_CODEGEN_EXACTHAZARDRECOGNIZER_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/ScheduleHazardRecognizer.h"
|
#include "llvm/CodeGen/ScheduleHazardRecognizer.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/System/IncludeFile.h"
|
#include "llvm/Support/IncludeFile.h"
|
||||||
#include "llvm/CodeGen/LiveInterval.h"
|
#include "llvm/CodeGen/LiveInterval.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "llvm/CodeGen/ValueTypes.h"
|
#include "llvm/CodeGen/ValueTypes.h"
|
||||||
#include "llvm/CodeGen/MachineMemOperand.h"
|
#include "llvm/CodeGen/MachineMemOperand.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/StringMap.h"
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/ADT/StringSet.h"
|
#include "llvm/ADT/StringSet.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
||||||
#include "llvm/ADT/StringSet.h"
|
#include "llvm/ADT/StringSet.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define LLVM_DERIVED_TYPES_H
|
#define LLVM_DERIVED_TYPES_H
|
||||||
|
|
||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/ADT/ValueMap.h"
|
#include "llvm/ADT/ValueMap.h"
|
||||||
#include "llvm/Support/ValueHandle.h"
|
#include "llvm/Support/ValueHandle.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/Support/Mutex.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#define GENERIC_VALUE_H
|
#define GENERIC_VALUE_H
|
||||||
|
|
||||||
#include "llvm/ADT/APInt.h"
|
#include "llvm/ADT/APInt.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
|
#ifndef LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
|
||||||
#define LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
|
#define LLVM_EXECUTION_ENGINE_JIT_EVENTLISTENER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
|
#ifndef LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
|
||||||
#define LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
|
#define LLVM_EXECUTION_ENGINE_JIT_MEMMANAGER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -22,15 +22,15 @@
|
|||||||
#include "llvm/IntrinsicInst.h"
|
#include "llvm/IntrinsicInst.h"
|
||||||
#include "llvm/InlineAsm.h"
|
#include "llvm/InlineAsm.h"
|
||||||
#include "llvm/Analysis/Verifier.h"
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include "llvm/System/Alarm.h"
|
#include "llvm/Support/Alarm.h"
|
||||||
#include "llvm/System/DynamicLibrary.h"
|
#include "llvm/Support/DynamicLibrary.h"
|
||||||
#include "llvm/System/Memory.h"
|
#include "llvm/Support/Memory.h"
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/Support/Mutex.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include "llvm/System/Process.h"
|
#include "llvm/Support/Process.h"
|
||||||
#include "llvm/System/Program.h"
|
#include "llvm/Support/Program.h"
|
||||||
#include "llvm/System/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
#include "llvm/System/TimeValue.h"
|
#include "llvm/Support/TimeValue.h"
|
||||||
#include "llvm/Support/Dwarf.h"
|
#include "llvm/Support/Dwarf.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef EDINSTINFO_H
|
#ifndef EDINSTINFO_H
|
||||||
#define EDINSTINFO_H
|
#define EDINSTINFO_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "llvm/Support/Casting.h"
|
#include "llvm/Support/Casting.h"
|
||||||
#include "llvm/MC/MCFixup.h"
|
#include "llvm/MC/MCFixup.h"
|
||||||
#include "llvm/MC/MCInst.h"
|
#include "llvm/MC/MCInst.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <vector> // FIXME: Shouldn't be needed.
|
#include <vector> // FIXME: Shouldn't be needed.
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef MCDISASSEMBLER_H
|
#ifndef MCDISASSEMBLER_H
|
||||||
#define MCDISASSEMBLER_H
|
#define MCDISASSEMBLER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#define LLVM_MC_MCEXPR_H
|
#define LLVM_MC_MCEXPR_H
|
||||||
|
|
||||||
#include "llvm/Support/Casting.h"
|
#include "llvm/Support/Casting.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class MCAsmInfo;
|
class MCAsmInfo;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef LLVM_MC_MCFIXUP_H
|
#ifndef LLVM_MC_MCFIXUP_H
|
||||||
#define LLVM_MC_MCFIXUP_H
|
#define LLVM_MC_MCFIXUP_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class raw_ostream;
|
class raw_ostream;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/Triple.h"
|
#include "llvm/ADT/Triple.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#define LLVM_MC_MCASMLEXER_H
|
#define LLVM_MC_MCASMLEXER_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/SMLoc.h"
|
#include "llvm/Support/SMLoc.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef LLVM_MC_MCASMPARSER_H
|
#ifndef LLVM_MC_MCASMPARSER_H
|
||||||
#define LLVM_MC_MCASMPARSER_H
|
#define LLVM_MC_MCASMPARSER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class AsmToken;
|
class AsmToken;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_MC_MCSTREAMER_H
|
#ifndef LLVM_MC_MCSTREAMER_H
|
||||||
#define LLVM_MC_MCSTREAMER_H
|
#define LLVM_MC_MCSTREAMER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/MC/MCDirectives.h"
|
#include "llvm/MC/MCDirectives.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_MC_MCVALUE_H
|
#ifndef LLVM_MC_MCVALUE_H
|
||||||
#define LLVM_MC_MCVALUE_H
|
#define LLVM_MC_MCVALUE_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/MC/MCSymbol.h"
|
#include "llvm/MC/MCSymbol.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "llvm/GlobalAlias.h"
|
#include "llvm/GlobalAlias.h"
|
||||||
#include "llvm/Metadata.h"
|
#include "llvm/Metadata.h"
|
||||||
#include "llvm/ADT/OwningPtr.h"
|
#include "llvm/ADT/OwningPtr.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#ifndef LLVM_OBJECT_MACHOFORMAT_H
|
#ifndef LLVM_OBJECT_MACHOFORMAT_H
|
||||||
#define LLVM_OBJECT_MACHOFORMAT_H
|
#define LLVM_OBJECT_MACHOFORMAT_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace object {
|
namespace object {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define LLVM_OBJECT_OBJECT_FILE_H
|
#define LLVM_OBJECT_OBJECT_FILE_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "Pass.h"
|
#include "Pass.h"
|
||||||
#include "llvm/PassRegistry.h"
|
#include "llvm/PassRegistry.h"
|
||||||
#include "llvm/InitializePasses.h"
|
#include "llvm/InitializePasses.h"
|
||||||
#include "llvm/System/Atomic.h"
|
#include "llvm/Support/Atomic.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/Support/AlignOf.h"
|
#include "llvm/Support/AlignOf.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_ATOMIC_H
|
#ifndef LLVM_SYSTEM_ATOMIC_H
|
||||||
#define LLVM_SYSTEM_ATOMIC_H
|
#define LLVM_SYSTEM_ATOMIC_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace sys {
|
namespace sys {
|
@ -23,7 +23,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_WIN_COFF_H
|
#ifndef LLVM_SUPPORT_WIN_COFF_H
|
||||||
#define LLVM_SUPPORT_WIN_COFF_H
|
#define LLVM_SUPPORT_WIN_COFF_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define LLVM_SUPPORT_CONSTANT_RANGE_H
|
#define LLVM_SUPPORT_CONSTANT_RANGE_H
|
||||||
|
|
||||||
#include "llvm/ADT/APInt.h"
|
#include "llvm/ADT/APInt.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*===-- include/System/DataTypes.h - Define fixed size types -----*- C -*-===*\
|
/*===-- include/Support/DataTypes.h - Define fixed size types -----*- C -*-===*\
|
||||||
|* *|
|
|* *|
|
||||||
|* The LLVM Compiler Infrastructure *|
|
|* The LLVM Compiler Infrastructure *|
|
||||||
|* *|
|
|* *|
|
||||||
@ -43,12 +43,12 @@
|
|||||||
happening when system headers or C++ STL headers include stdint.h before we
|
happening when system headers or C++ STL headers include stdint.h before we
|
||||||
define it here, we define it on the g++ command line (in Makefile.rules). */
|
define it here, we define it on the g++ command line (in Makefile.rules). */
|
||||||
#if !defined(__STDC_LIMIT_MACROS)
|
#if !defined(__STDC_LIMIT_MACROS)
|
||||||
# error "Must #define __STDC_LIMIT_MACROS before #including System/DataTypes.h"
|
# error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__STDC_CONSTANT_MACROS)
|
#if !defined(__STDC_CONSTANT_MACROS)
|
||||||
# error "Must #define __STDC_CONSTANT_MACROS before " \
|
# error "Must #define __STDC_CONSTANT_MACROS before " \
|
||||||
"#including System/DataTypes.h"
|
"#including Support/DataTypes.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note that <inttypes.h> includes <stdint.h>, if this is a C99 system. */
|
/* Note that <inttypes.h> includes <stdint.h>, if this is a C99 system. */
|
||||||
@ -65,7 +65,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AIX
|
#ifdef _AIX
|
||||||
#include "llvm/System/AIXDataTypesFix.h"
|
#include "llvm/Support/AIXDataTypesFix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Handle incorrect definition of uint64_t as u_int64_t */
|
/* Handle incorrect definition of uint64_t as u_int64_t */
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_DISASSEMBLER_H
|
#ifndef LLVM_SYSTEM_DISASSEMBLER_H
|
||||||
#define LLVM_SYSTEM_DISASSEMBLER_H
|
#define LLVM_SYSTEM_DISASSEMBLER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_ELF_H
|
#ifndef LLVM_SUPPORT_ELF_H
|
||||||
#define LLVM_SUPPORT_ELF_H
|
#define LLVM_SUPPORT_ELF_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#define LLVM_SUPPORT_ENDIAN_H
|
#define LLVM_SUPPORT_ENDIAN_H
|
||||||
|
|
||||||
#include "llvm/Config/config.h"
|
#include "llvm/Config/config.h"
|
||||||
#include "llvm/System/Host.h"
|
#include "llvm/Support/Host.h"
|
||||||
#include "llvm/System/SwapByteOrder.h"
|
#include "llvm/Support/SwapByteOrder.h"
|
||||||
#include "llvm/Support/type_traits.h"
|
#include "llvm/Support/type_traits.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_FILEUTILITIES_H
|
#ifndef LLVM_SUPPORT_FILEUTILITIES_H
|
||||||
#define LLVM_SUPPORT_FILEUTILITIES_H
|
#define LLVM_SUPPORT_FILEUTILITIES_H
|
||||||
|
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "llvm/Support/DOTGraphTraits.h"
|
#include "llvm/Support/DOTGraphTraits.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/ADT/GraphTraits.h"
|
#include "llvm/ADT/GraphTraits.h"
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@
|
|||||||
#define LLVM_SYSTEM_INCLUDEFILE_H
|
#define LLVM_SYSTEM_INCLUDEFILE_H
|
||||||
|
|
||||||
/// This macro is the public interface that IncludeFile.h exports. This gives
|
/// This macro is the public interface that IncludeFile.h exports. This gives
|
||||||
/// us the option to implement the "link the definition" capability in any
|
/// us the option to implement the "link the definition" capability in any
|
||||||
/// manner that we choose. All header files that depend on a specific .cpp
|
/// manner that we choose. All header files that depend on a specific .cpp
|
||||||
/// file being linked at run time should use this macro instead of the
|
/// file being linked at run time should use this macro instead of the
|
||||||
/// IncludeFile class directly.
|
/// IncludeFile class directly.
|
||||||
///
|
///
|
||||||
/// For example, foo.h would use:<br/>
|
/// For example, foo.h would use:<br/>
|
||||||
/// <tt>FORCE_DEFINING_FILE_TO_BE_LINKED(foo)</tt><br/>
|
/// <tt>FORCE_DEFINING_FILE_TO_BE_LINKED(foo)</tt><br/>
|
||||||
///
|
///
|
||||||
/// And, foo.cp would use:<br/>
|
/// And, foo.cp would use:<br/>
|
||||||
/// <tt>DEFINING_FILE_FOR(foo)</tt><br/>
|
/// <tt>DEFINING_FILE_FOR(foo)</tt><br/>
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
@ -34,14 +34,14 @@
|
|||||||
extern const char name ## LinkVar; \
|
extern const char name ## LinkVar; \
|
||||||
__attribute__((used)) static const char *const name ## LinkObj = \
|
__attribute__((used)) static const char *const name ## LinkObj = \
|
||||||
&name ## LinkVar; \
|
&name ## LinkVar; \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Otherwise use a constructor call.
|
// Otherwise use a constructor call.
|
||||||
#define FORCE_DEFINING_FILE_TO_BE_LINKED(name) \
|
#define FORCE_DEFINING_FILE_TO_BE_LINKED(name) \
|
||||||
namespace llvm { \
|
namespace llvm { \
|
||||||
extern const char name ## LinkVar; \
|
extern const char name ## LinkVar; \
|
||||||
static const IncludeFile name ## LinkObj ( &name ## LinkVar ); \
|
static const IncludeFile name ## LinkObj ( &name ## LinkVar ); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// This macro is the counterpart to FORCE_DEFINING_FILE_TO_BE_LINKED. It should
|
/// This macro is the counterpart to FORCE_DEFINING_FILE_TO_BE_LINKED. It should
|
||||||
@ -53,9 +53,9 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
/// This class is used in the implementation of FORCE_DEFINING_FILE_TO_BE_LINKED
|
/// This class is used in the implementation of FORCE_DEFINING_FILE_TO_BE_LINKED
|
||||||
/// macro to make sure that the implementation of a header file is included
|
/// macro to make sure that the implementation of a header file is included
|
||||||
/// into a tool that uses the header. This is solely
|
/// into a tool that uses the header. This is solely
|
||||||
/// to overcome problems linking .a files and not getting the implementation
|
/// to overcome problems linking .a files and not getting the implementation
|
||||||
/// of compilation units we need. This is commonly an issue with the various
|
/// of compilation units we need. This is commonly an issue with the various
|
||||||
/// Passes but also occurs elsewhere in LLVM. We like to use .a files because
|
/// Passes but also occurs elsewhere in LLVM. We like to use .a files because
|
||||||
/// they link faster and provide the smallest executables. However, sometimes
|
/// they link faster and provide the smallest executables. However, sometimes
|
@ -1,6 +1,6 @@
|
|||||||
LLVM System Interface Library
|
LLVM System Interface Library
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
The LLVM System Interface Library is licensed under the Illinois Open Source
|
The LLVM System Interface Library is licensed under the Illinois Open Source
|
||||||
License and has the following additional copyright:
|
License and has the following additional copyright:
|
||||||
|
|
||||||
Copyright (C) 2004 eXtensible Systems, Inc.
|
Copyright (C) 2004 eXtensible Systems, Inc.
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_MACHO_H
|
#ifndef LLVM_SUPPORT_MACHO_H
|
||||||
#define LLVM_SUPPORT_MACHO_H
|
#define LLVM_SUPPORT_MACHO_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
// NOTE: The enums in this file are intentially named to be different than those
|
// NOTE: The enums in this file are intentially named to be different than those
|
||||||
// in the headers in /usr/include/mach (on darwin systems) to avoid conflicts
|
// in the headers in /usr/include/mach (on darwin systems) to avoid conflicts
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
#ifndef LLVM_SUPPORT_MANAGED_STATIC_H
|
#ifndef LLVM_SUPPORT_MANAGED_STATIC_H
|
||||||
#define LLVM_SUPPORT_MANAGED_STATIC_H
|
#define LLVM_SUPPORT_MANAGED_STATIC_H
|
||||||
|
|
||||||
#include "llvm/System/Atomic.h"
|
#include "llvm/Support/Atomic.h"
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_MATHEXTRAS_H
|
#ifndef LLVM_SUPPORT_MATHEXTRAS_H
|
||||||
#define LLVM_SUPPORT_MATHEXTRAS_H
|
#define LLVM_SUPPORT_MATHEXTRAS_H
|
||||||
|
|
||||||
#include "llvm/System/SwapByteOrder.h"
|
#include "llvm/Support/SwapByteOrder.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_MEMORY_H
|
#ifndef LLVM_SYSTEM_MEMORY_H
|
||||||
#define LLVM_SYSTEM_MEMORY_H
|
#define LLVM_SYSTEM_MEMORY_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -51,7 +51,7 @@ namespace sys {
|
|||||||
///
|
///
|
||||||
/// On success, this returns a non-null memory block, otherwise it returns
|
/// On success, this returns a non-null memory block, otherwise it returns
|
||||||
/// a null memory block and fills in *ErrMsg.
|
/// a null memory block and fills in *ErrMsg.
|
||||||
///
|
///
|
||||||
/// @brief Allocate Read/Write/Execute memory.
|
/// @brief Allocate Read/Write/Execute memory.
|
||||||
static MemoryBlock AllocateRWX(size_t NumBytes,
|
static MemoryBlock AllocateRWX(size_t NumBytes,
|
||||||
const MemoryBlock *NearBlock,
|
const MemoryBlock *NearBlock,
|
||||||
@ -65,8 +65,8 @@ namespace sys {
|
|||||||
/// in *ErrMsg.
|
/// in *ErrMsg.
|
||||||
/// @brief Release Read/Write/Execute memory.
|
/// @brief Release Read/Write/Execute memory.
|
||||||
static bool ReleaseRWX(MemoryBlock &block, std::string *ErrMsg = 0);
|
static bool ReleaseRWX(MemoryBlock &block, std::string *ErrMsg = 0);
|
||||||
|
|
||||||
|
|
||||||
/// InvalidateInstructionCache - Before the JIT can run a block of code
|
/// InvalidateInstructionCache - Before the JIT can run a block of code
|
||||||
/// that has been emitted it must invalidate the instruction cache on some
|
/// that has been emitted it must invalidate the instruction cache on some
|
||||||
/// platforms.
|
/// platforms.
|
||||||
@ -82,11 +82,11 @@ namespace sys {
|
|||||||
/// boundaries, and the JIT internal allocations are not page aligned.
|
/// boundaries, and the JIT internal allocations are not page aligned.
|
||||||
static bool setWritable (MemoryBlock &M, std::string *ErrMsg = 0);
|
static bool setWritable (MemoryBlock &M, std::string *ErrMsg = 0);
|
||||||
|
|
||||||
/// setRangeExecutable - Mark the page containing a range of addresses
|
/// setRangeExecutable - Mark the page containing a range of addresses
|
||||||
/// as executable.
|
/// as executable.
|
||||||
static bool setRangeExecutable(const void *Addr, size_t Size);
|
static bool setRangeExecutable(const void *Addr, size_t Size);
|
||||||
|
|
||||||
/// setRangeWritable - Mark the page containing a range of addresses
|
/// setRangeWritable - Mark the page containing a range of addresses
|
||||||
/// as writable.
|
/// as writable.
|
||||||
static bool setRangeWritable(const void *Addr, size_t Size);
|
static bool setRangeWritable(const void *Addr, size_t Size);
|
||||||
};
|
};
|
@ -15,7 +15,7 @@
|
|||||||
#define LLVM_SUPPORT_MEMORYBUFFER_H
|
#define LLVM_SUPPORT_MEMORYBUFFER_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef MEMORYOBJECT_H
|
#ifndef MEMORYOBJECT_H
|
||||||
#define MEMORYOBJECT_H
|
#define MEMORYOBJECT_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_MUTEX_H
|
#ifndef LLVM_SYSTEM_MUTEX_H
|
||||||
#define LLVM_SYSTEM_MUTEX_H
|
#define LLVM_SYSTEM_MUTEX_H
|
||||||
|
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm
|
namespace llvm
|
||||||
@ -79,9 +79,9 @@ namespace llvm
|
|||||||
void operator=(const MutexImpl &);
|
void operator=(const MutexImpl &);
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// SmartMutex - A mutex with a compile time constant parameter that
|
/// SmartMutex - A mutex with a compile time constant parameter that
|
||||||
/// indicates whether this mutex should become a no-op when we're not
|
/// indicates whether this mutex should become a no-op when we're not
|
||||||
/// running in multithreaded mode.
|
/// running in multithreaded mode.
|
||||||
template<bool mt_only>
|
template<bool mt_only>
|
||||||
@ -91,7 +91,7 @@ namespace llvm
|
|||||||
public:
|
public:
|
||||||
explicit SmartMutex(bool rec = true) :
|
explicit SmartMutex(bool rec = true) :
|
||||||
MutexImpl(rec), acquired(0), recursive(rec) { }
|
MutexImpl(rec), acquired(0), recursive(rec) { }
|
||||||
|
|
||||||
bool acquire() {
|
bool acquire() {
|
||||||
if (!mt_only || llvm_is_multithreaded()) {
|
if (!mt_only || llvm_is_multithreaded()) {
|
||||||
return MutexImpl::acquire();
|
return MutexImpl::acquire();
|
||||||
@ -124,29 +124,29 @@ namespace llvm
|
|||||||
return MutexImpl::tryacquire();
|
return MutexImpl::tryacquire();
|
||||||
else return true;
|
else return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SmartMutex(const SmartMutex<mt_only> & original);
|
SmartMutex(const SmartMutex<mt_only> & original);
|
||||||
void operator=(const SmartMutex<mt_only> &);
|
void operator=(const SmartMutex<mt_only> &);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Mutex - A standard, always enforced mutex.
|
/// Mutex - A standard, always enforced mutex.
|
||||||
typedef SmartMutex<false> Mutex;
|
typedef SmartMutex<false> Mutex;
|
||||||
|
|
||||||
template<bool mt_only>
|
template<bool mt_only>
|
||||||
class SmartScopedLock {
|
class SmartScopedLock {
|
||||||
SmartMutex<mt_only>& mtx;
|
SmartMutex<mt_only>& mtx;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SmartScopedLock(SmartMutex<mt_only>& m) : mtx(m) {
|
SmartScopedLock(SmartMutex<mt_only>& m) : mtx(m) {
|
||||||
mtx.acquire();
|
mtx.acquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
~SmartScopedLock() {
|
~SmartScopedLock() {
|
||||||
mtx.release();
|
mtx.release();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SmartScopedLock<false> ScopedLock;
|
typedef SmartScopedLock<false> ScopedLock;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_MUTEXGUARD_H
|
#ifndef LLVM_SUPPORT_MUTEXGUARD_H
|
||||||
#define LLVM_SUPPORT_MUTEXGUARD_H
|
#define LLVM_SUPPORT_MUTEXGUARD_H
|
||||||
|
|
||||||
#include "llvm/System/Mutex.h"
|
#include "llvm/Support/Mutex.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
/// Instances of this class acquire a given Mutex Lock when constructed and
|
/// Instances of this class acquire a given Mutex Lock when constructed and
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define LLVM_SYSTEM_PATH_H
|
#define LLVM_SYSTEM_PATH_H
|
||||||
|
|
||||||
#include "llvm/ADT/StringRef.h"
|
#include "llvm/ADT/StringRef.h"
|
||||||
#include "llvm/System/TimeValue.h"
|
#include "llvm/Support/TimeValue.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
@ -25,8 +25,8 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/ADT/SmallString.h"
|
#include "llvm/ADT/SmallString.h"
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/System/system_error.h"
|
#include "llvm/Support/system_error.h"
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <string>
|
#include <string>
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SUPPORT_POINTERLIKETYPETRAITS_H
|
#ifndef LLVM_SUPPORT_POINTERLIKETYPETRAITS_H
|
||||||
#define LLVM_SUPPORT_POINTERLIKETYPETRAITS_H
|
#define LLVM_SUPPORT_POINTERLIKETYPETRAITS_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_PROCESS_H
|
#ifndef LLVM_SYSTEM_PROCESS_H
|
||||||
#define LLVM_SYSTEM_PROCESS_H
|
#define LLVM_SYSTEM_PROCESS_H
|
||||||
|
|
||||||
#include "llvm/System/TimeValue.h"
|
#include "llvm/Support/TimeValue.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace sys {
|
namespace sys {
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_PROGRAM_H
|
#ifndef LLVM_SYSTEM_PROGRAM_H
|
||||||
#define LLVM_SYSTEM_PROGRAM_H
|
#define LLVM_SYSTEM_PROGRAM_H
|
||||||
|
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace sys {
|
namespace sys {
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_RWMUTEX_H
|
#ifndef LLVM_SYSTEM_RWMUTEX_H
|
||||||
#define LLVM_SYSTEM_RWMUTEX_H
|
#define LLVM_SYSTEM_RWMUTEX_H
|
||||||
|
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm
|
namespace llvm
|
||||||
@ -43,7 +43,7 @@ namespace llvm
|
|||||||
|
|
||||||
/// Attempts to unconditionally acquire the lock in reader mode. If the
|
/// Attempts to unconditionally acquire the lock in reader mode. If the
|
||||||
/// lock is held by a writer, this method will wait until it can acquire
|
/// lock is held by a writer, this method will wait until it can acquire
|
||||||
/// the lock.
|
/// the lock.
|
||||||
/// @returns false if any kind of error occurs, true otherwise.
|
/// @returns false if any kind of error occurs, true otherwise.
|
||||||
/// @brief Unconditionally acquire the lock in reader mode.
|
/// @brief Unconditionally acquire the lock in reader mode.
|
||||||
bool reader_acquire();
|
bool reader_acquire();
|
||||||
@ -55,7 +55,7 @@ namespace llvm
|
|||||||
|
|
||||||
/// Attempts to unconditionally acquire the lock in reader mode. If the
|
/// Attempts to unconditionally acquire the lock in reader mode. If the
|
||||||
/// lock is held by any readers, this method will wait until it can
|
/// lock is held by any readers, this method will wait until it can
|
||||||
/// acquire the lock.
|
/// acquire the lock.
|
||||||
/// @returns false if any kind of error occurs, true otherwise.
|
/// @returns false if any kind of error occurs, true otherwise.
|
||||||
/// @brief Unconditionally acquire the lock in writer mode.
|
/// @brief Unconditionally acquire the lock in writer mode.
|
||||||
bool writer_acquire();
|
bool writer_acquire();
|
||||||
@ -79,8 +79,8 @@ namespace llvm
|
|||||||
void operator=(const RWMutexImpl &);
|
void operator=(const RWMutexImpl &);
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// SmartMutex - An R/W mutex with a compile time constant parameter that
|
/// SmartMutex - An R/W mutex with a compile time constant parameter that
|
||||||
/// indicates whether this mutex should become a no-op when we're not
|
/// indicates whether this mutex should become a no-op when we're not
|
||||||
/// running in multithreaded mode.
|
/// running in multithreaded mode.
|
||||||
template<bool mt_only>
|
template<bool mt_only>
|
||||||
@ -88,80 +88,80 @@ namespace llvm
|
|||||||
unsigned readers, writers;
|
unsigned readers, writers;
|
||||||
public:
|
public:
|
||||||
explicit SmartRWMutex() : RWMutexImpl(), readers(0), writers(0) { }
|
explicit SmartRWMutex() : RWMutexImpl(), readers(0), writers(0) { }
|
||||||
|
|
||||||
bool reader_acquire() {
|
bool reader_acquire() {
|
||||||
if (!mt_only || llvm_is_multithreaded())
|
if (!mt_only || llvm_is_multithreaded())
|
||||||
return RWMutexImpl::reader_acquire();
|
return RWMutexImpl::reader_acquire();
|
||||||
|
|
||||||
// Single-threaded debugging code. This would be racy in multithreaded
|
// Single-threaded debugging code. This would be racy in multithreaded
|
||||||
// mode, but provides not sanity checks in single threaded mode.
|
// mode, but provides not sanity checks in single threaded mode.
|
||||||
++readers;
|
++readers;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool reader_release() {
|
bool reader_release() {
|
||||||
if (!mt_only || llvm_is_multithreaded())
|
if (!mt_only || llvm_is_multithreaded())
|
||||||
return RWMutexImpl::reader_release();
|
return RWMutexImpl::reader_release();
|
||||||
|
|
||||||
// Single-threaded debugging code. This would be racy in multithreaded
|
// Single-threaded debugging code. This would be racy in multithreaded
|
||||||
// mode, but provides not sanity checks in single threaded mode.
|
// mode, but provides not sanity checks in single threaded mode.
|
||||||
assert(readers > 0 && "Reader lock not acquired before release!");
|
assert(readers > 0 && "Reader lock not acquired before release!");
|
||||||
--readers;
|
--readers;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool writer_acquire() {
|
bool writer_acquire() {
|
||||||
if (!mt_only || llvm_is_multithreaded())
|
if (!mt_only || llvm_is_multithreaded())
|
||||||
return RWMutexImpl::writer_acquire();
|
return RWMutexImpl::writer_acquire();
|
||||||
|
|
||||||
// Single-threaded debugging code. This would be racy in multithreaded
|
// Single-threaded debugging code. This would be racy in multithreaded
|
||||||
// mode, but provides not sanity checks in single threaded mode.
|
// mode, but provides not sanity checks in single threaded mode.
|
||||||
assert(writers == 0 && "Writer lock already acquired!");
|
assert(writers == 0 && "Writer lock already acquired!");
|
||||||
++writers;
|
++writers;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool writer_release() {
|
bool writer_release() {
|
||||||
if (!mt_only || llvm_is_multithreaded())
|
if (!mt_only || llvm_is_multithreaded())
|
||||||
return RWMutexImpl::writer_release();
|
return RWMutexImpl::writer_release();
|
||||||
|
|
||||||
// Single-threaded debugging code. This would be racy in multithreaded
|
// Single-threaded debugging code. This would be racy in multithreaded
|
||||||
// mode, but provides not sanity checks in single threaded mode.
|
// mode, but provides not sanity checks in single threaded mode.
|
||||||
assert(writers == 1 && "Writer lock not acquired before release!");
|
assert(writers == 1 && "Writer lock not acquired before release!");
|
||||||
--writers;
|
--writers;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SmartRWMutex(const SmartRWMutex<mt_only> & original);
|
SmartRWMutex(const SmartRWMutex<mt_only> & original);
|
||||||
void operator=(const SmartRWMutex<mt_only> &);
|
void operator=(const SmartRWMutex<mt_only> &);
|
||||||
};
|
};
|
||||||
typedef SmartRWMutex<false> RWMutex;
|
typedef SmartRWMutex<false> RWMutex;
|
||||||
|
|
||||||
/// ScopedReader - RAII acquisition of a reader lock
|
/// ScopedReader - RAII acquisition of a reader lock
|
||||||
template<bool mt_only>
|
template<bool mt_only>
|
||||||
struct SmartScopedReader {
|
struct SmartScopedReader {
|
||||||
SmartRWMutex<mt_only>& mutex;
|
SmartRWMutex<mt_only>& mutex;
|
||||||
|
|
||||||
explicit SmartScopedReader(SmartRWMutex<mt_only>& m) : mutex(m) {
|
explicit SmartScopedReader(SmartRWMutex<mt_only>& m) : mutex(m) {
|
||||||
mutex.reader_acquire();
|
mutex.reader_acquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
~SmartScopedReader() {
|
~SmartScopedReader() {
|
||||||
mutex.reader_release();
|
mutex.reader_release();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
typedef SmartScopedReader<false> ScopedReader;
|
typedef SmartScopedReader<false> ScopedReader;
|
||||||
|
|
||||||
/// ScopedWriter - RAII acquisition of a writer lock
|
/// ScopedWriter - RAII acquisition of a writer lock
|
||||||
template<bool mt_only>
|
template<bool mt_only>
|
||||||
struct SmartScopedWriter {
|
struct SmartScopedWriter {
|
||||||
SmartRWMutex<mt_only>& mutex;
|
SmartRWMutex<mt_only>& mutex;
|
||||||
|
|
||||||
explicit SmartScopedWriter(SmartRWMutex<mt_only>& m) : mutex(m) {
|
explicit SmartScopedWriter(SmartRWMutex<mt_only>& m) : mutex(m) {
|
||||||
mutex.writer_acquire();
|
mutex.writer_acquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
~SmartScopedWriter() {
|
~SmartScopedWriter() {
|
||||||
mutex.writer_release();
|
mutex.writer_release();
|
||||||
}
|
}
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_SIGNALS_H
|
#ifndef LLVM_SYSTEM_SIGNALS_H
|
||||||
#define LLVM_SYSTEM_SIGNALS_H
|
#define LLVM_SYSTEM_SIGNALS_H
|
||||||
|
|
||||||
#include "llvm/System/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace sys {
|
namespace sys {
|
@ -15,7 +15,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_SWAP_BYTE_ORDER_H
|
#ifndef LLVM_SYSTEM_SWAP_BYTE_ORDER_H
|
||||||
#define LLVM_SYSTEM_SWAP_BYTE_ORDER_H
|
#define LLVM_SYSTEM_SWAP_BYTE_ORDER_H
|
||||||
|
|
||||||
#include "llvm/System/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ inline signed long SwapByteOrder( signed long C) { return SwapByteOrder_64(
|
|||||||
#else
|
#else
|
||||||
#error "Unknown long size!"
|
#error "Unknown long size!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline unsigned long long SwapByteOrder(unsigned long long C) {
|
inline unsigned long long SwapByteOrder(unsigned long long C) {
|
||||||
return SwapByteOrder_64(C);
|
return SwapByteOrder_64(C);
|
||||||
}
|
}
|
@ -14,7 +14,7 @@
|
|||||||
#ifndef LLVM_SYSTEM_THREAD_LOCAL_H
|
#ifndef LLVM_SYSTEM_THREAD_LOCAL_H
|
||||||
#define LLVM_SYSTEM_THREAD_LOCAL_H
|
#define LLVM_SYSTEM_THREAD_LOCAL_H
|
||||||
|
|
||||||
#include "llvm/System/Threading.h"
|
#include "llvm/Support/Threading.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -30,21 +30,21 @@ namespace llvm {
|
|||||||
const void* getInstance();
|
const void* getInstance();
|
||||||
void removeInstance();
|
void removeInstance();
|
||||||
};
|
};
|
||||||
|
|
||||||
/// ThreadLocal - A class used to abstract thread-local storage. It holds,
|
/// ThreadLocal - A class used to abstract thread-local storage. It holds,
|
||||||
/// for each thread, a pointer a single object of type T.
|
/// for each thread, a pointer a single object of type T.
|
||||||
template<class T>
|
template<class T>
|
||||||
class ThreadLocal : public ThreadLocalImpl {
|
class ThreadLocal : public ThreadLocalImpl {
|
||||||
public:
|
public:
|
||||||
ThreadLocal() : ThreadLocalImpl() { }
|
ThreadLocal() : ThreadLocalImpl() { }
|
||||||
|
|
||||||
/// get - Fetches a pointer to the object associated with the current
|
/// get - Fetches a pointer to the object associated with the current
|
||||||
/// thread. If no object has yet been associated, it returns NULL;
|
/// thread. If no object has yet been associated, it returns NULL;
|
||||||
T* get() { return static_cast<T*>(getInstance()); }
|
T* get() { return static_cast<T*>(getInstance()); }
|
||||||
|
|
||||||
// set - Associates a pointer to an object with the current thread.
|
// set - Associates a pointer to an object with the current thread.
|
||||||
void set(T* d) { setInstance(d); }
|
void set(T* d) { setInstance(d); }
|
||||||
|
|
||||||
// erase - Removes the pointer associated with the current thread.
|
// erase - Removes the pointer associated with the current thread.
|
||||||
void erase() { removeInstance(); }
|
void erase() { removeInstance(); }
|
||||||
};
|
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user