@@ -12,17 +12,10 @@ N: Joe Abbey
E: jabbey@arxan.com
D: LLVM Bitcode (lib/Bitcode/* include/llvm/Bitcode/*)

N: Owen Anderson
E: resistor@mac.com
D: SelectionDAG (lib/CodeGen/SelectionDAG/*)

N: Rafael Avila de Espindola
E: rafael.espindola@gmail.com
D: Gold plugin (tools/gold/*)

N: Justin Bogner
E: mail@justinbogner.com
D: InstrProfiling and related parts of ProfileData
D: SelectionDAG (lib/CodeGen/SelectionDAG/*)

N: Chandler Carruth
E: chandlerc@gmail.com
@@ -35,12 +28,16 @@ D: parts of code generator not covered by someone else

N: Eric Christopher
E: echristo@gmail.com
D: Debug Information, autotools/configure/make build, inline assembly
D: Debug Information, inline assembly

N: Greg Clayton
E: gclayton@apple.com
D: LLDB

N: Sanjoy Das
E: sanjoy@playingwithpointers.com
D: IndVar Simplify, Scalar Evolution

N: Marshall Clow
E: mclow.lists@gmail.com
D: libc++
@@ -87,7 +84,11 @@ D: NVPTX Target (lib/Target/NVPTX/*)

N: Lang Hames
E: lhames@gmail.com
D: MCJIT, RuntimeDyld and JIT event listeners
D: MCJIT, RuntimeDyld and JIT event listeners, Orcish Warchief

N: Teresa Johnson
E: tejohnson@google.com
D: Gold plugin (tools/gold/*)

N: Galina Kistanova
E: gkistanova@gmail.com
@@ -138,6 +139,10 @@ N: Krzysztof Parzyszek
E: kparzysz@codeaurora.org
D: Hexagon Backend

N: Jacques Pienaar
E: jpienaar@google.com
D: Lanai Backend

N: Paul Robinson
E: paul_robinson@playstation.sony.com
D: Sony PlayStation®4 support
@@ -147,7 +152,7 @@ E: mcrosier@codeaurora.org
D: Fast-Isel

N: Nadav Rotem
E: nrotem@apple.com
E: nadav.rotem@me.com
D: X86 Backend, Loop Vectorizer

N: Daniel Sanders
@@ -181,7 +186,7 @@ D: MemorySanitizer (LLVM part)

N: Andrew Trick
E: atrick@apple.com
D: IndVar Simplify, Loop Strength Reduction, Instruction Scheduling
D: Loop Strength Reduction, Instruction Scheduling

N: Ulrich Weigand
E: uweigand@de.ibm.com
@@ -191,6 +196,10 @@ N: Bill Wendling
E: isanbard@gmail.com
D: libLTO, IR Linker

N: Hans Wennborg
E: hans@chromium.org
D: Release management (x.y.0 releases)

N: Peter Zotov
E: whitequark@whitequark.org
D: OCaml bindings
@@ -347,6 +347,10 @@ N: Richard Osborne
E: richard@xmos.com
D: XCore backend

N: Piotr Padlewski
E: piotr.padlewski@gmail.com
D: !invariant.group metadata and other intrinsics for devirtualization in clang

N: Devang Patel
E: dpatel@apple.com
D: LTO tool, PassManager rewrite, Loop Pass Manager, Loop Rotate
@@ -392,7 +396,7 @@ D: Fixes and improvements to the ARM fast-isel pass
D: Fixes and improvements to the AArch64 backend

N: Nadav Rotem
E: nrotem@apple.com
E: nadav.rotem@me.com
D: X86 code generation improvements, Loop Vectorizer.

N: Roman Samoilov
@@ -4,7 +4,7 @@ LLVM Release License
University of Illinois/NCSA
Open Source License

Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign.
Copyright (c) 2003-2016 University of Illinois at Urbana-Champaign.
All rights reserved.

Developed by:
295 Makefile

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -81,7 +81,6 @@ func TestFactorial(t *testing.T) {
pass := NewPassManager()
defer pass.Dispose()

pass.Add(engine.TargetData())
pass.AddConstantPropagationPass()
pass.AddInstructionCombiningPass()
pass.AddPromoteMemoryToRegisterPass()
@@ -121,13 +121,6 @@ func NewTargetData(rep string) (td TargetData) {
return
}

// Adds target data information to a pass manager. This does not take ownership
// of the target data.
// See the method llvm::PassManagerBase::add.
func (pm PassManager) Add(td TargetData) {
C.LLVMAddTargetData(td.C, pm.C)
}

// Converts target data to a target layout string. The string must be disposed
// with LLVMDisposeMessage.
// See the constructor llvm::TargetData::TargetData.
@@ -261,17 +254,19 @@ func (t Target) CreateTargetMachine(Triple string, CPU string, Features string,
return
}

// CreateTargetData returns a new TargetData describing the TargetMachine's
// data layout. The returned TargetData is owned by the caller, who is
// responsible for disposing of it by calling the TargetData.Dispose method.
func (tm TargetMachine) CreateTargetData() TargetData {
return TargetData{C.LLVMCreateTargetDataLayout(tm.C)}
}

// Triple returns the triple describing the machine (arch-vendor-os).
func (tm TargetMachine) Triple() string {
cstr := C.LLVMGetTargetMachineTriple(tm.C)
return C.GoString(cstr)
}

// TargetData returns the TargetData for the machine.
func (tm TargetMachine) TargetData() TargetData {
return TargetData{C.LLVMGetTargetMachineData(tm.C)}
}

func (tm TargetMachine) EmitToMemoryBuffer(m Module, ft CodeGenFileType) (MemoryBuffer, error) {
var errstr *C.char
var mb MemoryBuffer

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -16,6 +16,7 @@
\*===----------------------------------------------------------------------===*/

#include "llvm-c/Analysis.h"
#include "llvm-c/Core.h"
#include "caml/alloc.h"
#include "caml/mlvalues.h"
#include "caml/memory.h"

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -13,6 +13,7 @@
\*===----------------------------------------------------------------------===*/

#include "llvm-c/BitReader.h"
#include "llvm-c/Core.h"
#include "caml/alloc.h"
#include "caml/fail.h"
#include "caml/memory.h"
@@ -25,7 +26,7 @@ CAMLprim LLVMModuleRef llvm_get_module(LLVMContextRef C, LLVMMemoryBufferRef Mem
LLVMModuleRef M;

if (LLVMGetBitcodeModuleInContext2(C, MemBuf, &M))
llvm_raise(*caml_named_value("Llvm_bitreader.Error"), "");
llvm_raise(*caml_named_value("Llvm_bitreader.Error"), LLVMCreateMessage(""));

return M;
}
@@ -35,7 +36,7 @@ CAMLprim LLVMModuleRef llvm_parse_bitcode(LLVMContextRef C, LLVMMemoryBufferRef
LLVMModuleRef M;

if (LLVMParseBitcodeInContext2(C, MemBuf, &M))
llvm_raise(*caml_named_value("Llvm_bitreader.Error"), "");
llvm_raise(*caml_named_value("Llvm_bitreader.Error"), LLVMCreateMessage(""));

return M;
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -17,6 +17,7 @@

#include <string.h>
#include <assert.h>
#include "llvm-c/Core.h"
#include "llvm-c/ExecutionEngine.h"
#include "llvm-c/Target.h"
#include "caml/alloc.h"

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/

#include "llvm-c/Core.h"
#include "llvm-c/Linker.h"
#include "caml/alloc.h"
#include "caml/memory.h"
@@ -26,7 +27,7 @@ void llvm_raise(value Prototype, char *Message);
/* llmodule -> llmodule -> unit */
CAMLprim value llvm_link_modules(LLVMModuleRef Dst, LLVMModuleRef Src) {
if (LLVMLinkModules2(Dst, Src))
llvm_raise(*caml_named_value("Llvm_linker.Error"), "Linking failed");
llvm_raise(*caml_named_value("Llvm_linker.Error"), LLVMCreateMessage("Linking failed"));

return Val_unit;
}

This file was deleted.

Oops, something went wrong.
@@ -283,6 +283,14 @@ module ValueKind = struct
| Instruction of Opcode.t
end

module DiagnosticSeverity = struct
type t =
| Error
| Warning
| Remark
| Note
end

exception IoError of string

let () = Callback.register_exception "Llvm.IoError" (IoError "")
@@ -304,6 +312,20 @@ type ('a, 'b) llrev_pos =
| At_start of 'a
| After of 'b


(*===-- Context error handling --------------------------------------------===*)
module Diagnostic = struct
type t

external description : t -> string = "llvm_get_diagnostic_description"
external severity : t -> DiagnosticSeverity.t
= "llvm_get_diagnostic_severity"
end

external set_diagnostic_handler
: llcontext -> (Diagnostic.t -> unit) option -> unit
= "llvm_set_diagnostic_handler"

(*===-- Contexts ----------------------------------------------------------===*)
external create_context : unit -> llcontext = "llvm_create_context"
external dispose_context : llcontext -> unit = "llvm_dispose_context"
@@ -461,6 +483,8 @@ external mdstring : llcontext -> string -> llvalue = "llvm_mdstring"
external mdnode : llcontext -> llvalue array -> llvalue = "llvm_mdnode"
external mdnull : llcontext -> llvalue = "llvm_mdnull"
external get_mdstring : llvalue -> string option = "llvm_get_mdstring"
external get_mdnode_operands : llvalue -> llvalue array
= "llvm_get_mdnode_operands"
external get_named_metadata : llmodule -> string -> llvalue array
= "llvm_get_namedmd"
external add_named_metadata_operand : llmodule -> string -> llvalue -> unit
@@ -15,7 +15,7 @@

(** {6 Abstract types}
These abstract types correlate directly to the LLVM VMCore classes. *)
These abstract types correlate directly to the LLVMCore classes. *)

(** The top-level container for all LLVM global data. See the
[llvm::LLVMContext] class. *)
@@ -352,6 +352,16 @@ module ValueKind : sig
| Instruction of Opcode.t
end

(** The kind of [Diagnostic], the result of [Diagnostic.severity d].
See [llvm::DiagnosticSeverity]. *)
module DiagnosticSeverity : sig
type t =
| Error
| Warning
| Remark
| Note
end


(** {6 Iteration} *)

@@ -398,6 +408,22 @@ val reset_fatal_error_handler : unit -> unit
See the function [llvm::cl::ParseCommandLineOptions()]. *)
val parse_command_line_options : ?overview:string -> string array -> unit

(** {6 Context error handling} *)

module Diagnostic : sig
type t

(** [description d] returns a textual description of [d]. *)
val description : t -> string

(** [severity d] returns the severity of [d]. *)
val severity : t -> DiagnosticSeverity.t
end

(** [set_diagnostic_handler c h] set the diagnostic handler of [c] to [h].
See the method [llvm::LLVMContext::setDiagnosticHandler]. *)
val set_diagnostic_handler : llcontext -> (Diagnostic.t -> unit) option -> unit

(** {6 Contexts} *)

(** [create_context ()] creates a context for storing the "global" state in
@@ -408,7 +434,7 @@ val create_context : unit -> llcontext
[llvm::LLVMContext::~LLVMContext]. *)
val dispose_context : llcontext -> unit

(** See the function [llvm::getGlobalContext]. *)
(** See the function [LLVMGetGlobalContext]. *)
val global_context : unit -> llcontext

(** [mdkind_id context name] returns the MDKind ID that corresponds to the
@@ -826,6 +852,10 @@ val mdnull : llcontext -> llvalue
See the method [llvm::MDString::getString] *)
val get_mdstring : llvalue -> string option

(** [get_mdnode_operands v] returns the operands in the MDNode. *)
(* See the method [llvm::MDNode::getOperand] *)
val get_mdnode_operands : llvalue -> llvalue array

(** [get_named_metadata m name] returns all the MDNodes belonging to the named
metadata (if any).
See the method [llvm::NamedMDNode::getOperand]. *)
@@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include "llvm-c/Core.h"
#include "llvm-c/Support.h"
#include "caml/alloc.h"
#include "caml/custom.h"
#include "caml/memory.h"
@@ -114,6 +115,49 @@ static value alloc_variant(int tag, void *Value) {
return alloc_variant(0, pfun(Kid)); \
}

/*===-- Context error handling --------------------------------------------===*/

void llvm_diagnostic_handler_trampoline(LLVMDiagnosticInfoRef DI,
void *DiagnosticContext) {
caml_callback(*((value *)DiagnosticContext), (value)DI);
}

/* Diagnostic.t -> string */
CAMLprim value llvm_get_diagnostic_description(value Diagnostic) {
return llvm_string_of_message(
LLVMGetDiagInfoDescription((LLVMDiagnosticInfoRef)Diagnostic));
}

/* Diagnostic.t -> DiagnosticSeverity.t */
CAMLprim value llvm_get_diagnostic_severity(value Diagnostic) {
return Val_int(LLVMGetDiagInfoSeverity((LLVMDiagnosticInfoRef)Diagnostic));
}

static void llvm_remove_diagnostic_handler(LLVMContextRef C) {
if (LLVMContextGetDiagnosticHandler(C) ==
llvm_diagnostic_handler_trampoline) {
value *Handler = (value *)LLVMContextGetDiagnosticContext(C);
remove_global_root(Handler);
free(Handler);
}
}

/* llcontext -> (Diagnostic.t -> unit) option -> unit */
CAMLprim value llvm_set_diagnostic_handler(LLVMContextRef C, value Handler) {
llvm_remove_diagnostic_handler(C);
if (Handler == Val_int(0)) {
LLVMContextSetDiagnosticHandler(C, NULL, NULL);
} else {
value *DiagnosticContext = malloc(sizeof(value));
if (DiagnosticContext == NULL)
caml_raise_out_of_memory();
caml_register_global_root(DiagnosticContext);
*DiagnosticContext = Field(Handler, 0);
LLVMContextSetDiagnosticHandler(C, llvm_diagnostic_handler_trampoline,
DiagnosticContext);
}
return Val_unit;
}

/*===-- Contexts ----------------------------------------------------------===*/

@@ -124,6 +168,7 @@ CAMLprim LLVMContextRef llvm_create_context(value Unit) {

/* llcontext -> unit */
CAMLprim value llvm_dispose_context(LLVMContextRef C) {
llvm_remove_diagnostic_handler(C);
LLVMContextDispose(C);
return Val_unit;
}
@@ -689,6 +734,17 @@ CAMLprim value llvm_get_mdstring(LLVMValueRef V) {
CAMLreturn(Val_int(0));
}

CAMLprim value llvm_get_mdnode_operands(LLVMValueRef V) {
CAMLparam0();
CAMLlocal1(Operands);
unsigned int n;

n = LLVMGetMDNodeNumOperands(V);
Operands = alloc(n, 0);
LLVMGetMDNodeOperands(V, (LLVMValueRef *) Operands);
CAMLreturn(Operands);
}

/* llmodule -> string -> llvalue array */
CAMLprim value llvm_get_namedmd(LLVMModuleRef M, value Name)
{

This file was deleted.

Oops, something went wrong.
@@ -54,9 +54,6 @@ module DataLayout = struct

external of_string : string -> t = "llvm_datalayout_of_string"
external as_string : t -> string = "llvm_datalayout_as_string"
external add_to_pass_manager : [<Llvm.PassManager.any]
Llvm.PassManager.t -> t -> unit
= "llvm_datalayout_add_to_pass_manager"
external byte_order : t -> Endian.t = "llvm_datalayout_byte_order"
external pointer_size : t -> int = "llvm_datalayout_pointer_size"
external intptr_type : Llvm.llcontext -> t -> Llvm.lltype
@@ -67,12 +67,6 @@ module DataLayout : sig
See the method [llvm::DataLayout::getStringRepresentation]. *)
val as_string : t -> string

(** [add_to_pass_manager pm dl] adds the data layout [dl] to
the pass manager [pm].
See the method [llvm::PassManagerBase::add]. *)
val add_to_pass_manager : [<Llvm.PassManager.any] Llvm.PassManager.t ->
t -> unit

(** Returns the byte order of a target, either [Endian.Big] or
[Endian.Little].
See the method [llvm::DataLayout::isLittleEndian]. *)
@@ -200,13 +194,13 @@ module TargetMachine : sig
[llvm::TargetMachine::getCPU]. *)
val cpu : t -> string

(** Returns the data layout of this target machine. *)
val data_layout : t -> DataLayout.t

(** Returns the feature string used while creating this target machine. See
[llvm::TargetMachine::getFeatureString]. *)
val features : t -> string

(** Returns the data layout of this target machine. *)
val data_layout : t -> DataLayout.t

(** Adds the target-specific analysis passes to the pass manager.
See [llvm::TargetMachine::addAnalysisPasses]. *)
val add_analysis_passes : [< Llvm.PassManager.any ] Llvm.PassManager.t -> t -> unit
@@ -15,6 +15,7 @@
|* *|
\*===----------------------------------------------------------------------===*/

#include "llvm-c/Core.h"
#include "llvm-c/Target.h"
#include "llvm-c/TargetMachine.h"
#include "caml/alloc.h"
@@ -64,13 +65,6 @@ CAMLprim value llvm_datalayout_as_string(value TD) {
return Copy;
}

/* [<Llvm.PassManager.any] Llvm.PassManager.t -> DataLayout.t -> unit */
CAMLprim value llvm_datalayout_add_to_pass_manager(LLVMPassManagerRef PM,
value DL) {
LLVMAddTargetData(DataLayout_val(DL), PM);
return Val_unit;
}

/* DataLayout.t -> Endian.t */
CAMLprim value llvm_datalayout_byte_order(value DL) {
return Val_int(LLVMByteOrder(DataLayout_val(DL)));
@@ -304,21 +298,8 @@ CAMLprim value llvm_targetmachine_features(value Machine) {

/* TargetMachine.t -> DataLayout.t */
CAMLprim value llvm_targetmachine_data_layout(value Machine) {
CAMLparam1(Machine);
CAMLlocal1(DataLayout);
char *TargetDataCStr;

/* LLVMGetTargetMachineData returns a pointer owned by the TargetMachine,
so it is impossible to wrap it with llvm_alloc_target_data, which assumes
that OCaml owns the pointer. */
LLVMTargetDataRef OrigDataLayout;
OrigDataLayout = LLVMGetTargetMachineData(TargetMachine_val(Machine));

TargetDataCStr = LLVMCopyStringRepOfTargetData(OrigDataLayout);
DataLayout = llvm_alloc_data_layout(LLVMCreateTargetData(TargetDataCStr));
LLVMDisposeMessage(TargetDataCStr);

CAMLreturn(DataLayout);
return llvm_alloc_data_layout(LLVMCreateTargetDataLayout(
TargetMachine_val(Machine)));
}

/* bool -> TargetMachine.t -> unit */

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -127,17 +127,17 @@ external add_sccp
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_sccp"

(** See the [llvm::createScalarReplAggregatesPass] function. *)
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates"

(** See the [llvm::createScalarReplAggregatesPassSSA] function. *)
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation_ssa
: [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates_ssa"

(** See the [llvm::createScalarReplAggregatesWithThreshold] function. *)
(** See the [llvm::createSROAPass] function. *)
external add_scalar_repl_aggregation_with_threshold
: int -> [< Llvm.PassManager.any ] Llvm.PassManager.t -> unit
= "llvm_add_scalar_repl_aggregates_with_threshold"

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -11,9 +11,10 @@ include(CheckFunctionExists)
include(CheckCXXSourceCompiles)
include(TestBigEndian)

include(CheckCompilerVersion)
include(HandleLLVMStdlib)

if( UNIX AND NOT BEOS )
if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
set(CMAKE_REQUIRED_LIBRARIES m)
endif()
@@ -66,6 +67,7 @@ check_include_file(sys/param.h HAVE_SYS_PARAM_H)
check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(sys/time.h HAVE_SYS_TIME_H)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(sys/uio.h HAVE_SYS_UIO_H)
check_include_file(termios.h HAVE_TERMIOS_H)
check_include_file(unistd.h HAVE_UNISTD_H)
@@ -107,6 +109,16 @@ if( NOT PURE_WINDOWS )
check_library_exists(rt clock_gettime "" HAVE_LIBRT)
endif()

if(HAVE_LIBPTHREAD)
# We want to find pthreads library and at the moment we do want to
# have it reported as '-l<lib>' instead of '-pthread'.
# TODO: switch to -pthread once the rest of the build system can deal with it.
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_HAVE_PTHREAD_ARG Off)
find_package(Threads REQUIRED)
set(PTHREAD_LIB ${CMAKE_THREAD_LIBS_INIT})
endif()

# Don't look for these libraries on Windows. Also don't look for them if we're
# using MSan, since uninstrmented third party code may call MSan interceptors
# like strlen, leading to false positives.
@@ -135,9 +147,15 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
endif()
endif()

check_library_exists(xar xar_open "" HAVE_LIBXAR)
if(HAVE_LIBXAR)
set(XAR_LIB xar)
endif()

# function checks
check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM)
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
check_symbol_exists(_Unwind_Backtrace "unwind.h" HAVE_UNWIND_BACKTRACE)
check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
@@ -150,6 +168,9 @@ if( HAVE_SETJMP_H )
check_symbol_exists(siglongjmp setjmp.h HAVE_SIGLONGJMP)
check_symbol_exists(sigsetjmp setjmp.h HAVE_SIGSETJMP)
endif()
if( HAVE_SIGNAL_H )
check_symbol_exists(sigaltstack signal.h HAVE_SIGALTSTACK)
endif()
if( HAVE_SYS_UIO_H )
check_symbol_exists(writev sys/uio.h HAVE_WRITEV)
endif()
@@ -395,12 +416,12 @@ else ()
set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)

# We don't have an ASM parser for all architectures yet.
if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt)
set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser)
endif ()

# We don't have an disassembler for all architectures yet.
if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
if (EXISTS ${PROJECT_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/Disassembler/CMakeLists.txt)
set(LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler)
endif ()
endif ()
@@ -446,21 +467,6 @@ else()
set(HAVE_DIA_SDK 0)
endif( MSVC )

if( PURE_WINDOWS )
CHECK_CXX_SOURCE_COMPILES("
#include <windows.h>
#include <imagehlp.h>
extern \"C\" void foo(PENUMLOADED_MODULES_CALLBACK);
extern \"C\" void foo(BOOL(CALLBACK*)(PCSTR,ULONG_PTR,ULONG,PVOID));
int main(){return 0;}"
HAVE_ELMCB_PCSTR)
if( HAVE_ELMCB_PCSTR )
set(WIN32_ELMCB_PCSTR "PCSTR")
else()
set(WIN32_ELMCB_PCSTR "PSTR")
endif()
endif( PURE_WINDOWS )

# FIXME: Signal handler return type, currently hardcoded to 'void'
set(RETSIGTYPE void)

@@ -526,7 +532,7 @@ else()
if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
message(STATUS "Go bindings disabled.")
else()
execute_process(COMMAND ${GO_EXECUTABLE} run ${CMAKE_SOURCE_DIR}/bindings/go/conftest.go
execute_process(COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/bindings/go/conftest.go
RESULT_VARIABLE GO_CONFTEST)
if(GO_CONFTEST STREQUAL "0")
set(LLVM_BINDINGS "${LLVM_BINDINGS} go")
Oops, something went wrong.