Port Monicelli to LLVM 6.0
This commit is contained in:
parent
7f2a9a34a8
commit
ab596da379
|
@ -49,7 +49,7 @@ you will need to have installed. If this is not the case, the configuration
|
|||
script will warn you. Monicelli is developed with version 6.8, but any
|
||||
sufficiently recent release should do just fine.
|
||||
|
||||
You will also need to have LLVM development libraries installed, version 3.8.
|
||||
You will also need to have LLVM development libraries installed, version 6.0.
|
||||
Other versions might or might not work.
|
||||
|
||||
Finally, you will need CMake, version 3.0 or higher.
|
||||
|
|
|
@ -15,7 +15,7 @@ execute_process(
|
|||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
set(TARGET_LLVM_VERSION "3.8.0")
|
||||
set(TARGET_LLVM_VERSION "6.0.0")
|
||||
|
||||
if (NOT LLVM_VERSION STREQUAL ${TARGET_LLVM_VERSION})
|
||||
message(WARNING "Expected LLVM ${TARGET_LLVM_VERSION}, found ${LLVM_VERSION}, build may fail.")
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "llvm/IR/Verifier.h"
|
||||
#include "llvm/Support/raw_os_ostream.h"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Transforms/Scalar/GVN.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -165,7 +166,7 @@ llvm::Value* NestedScopes::lookup(const std::string& name) {
|
|||
|
||||
void IRGenerator::declareBuiltins() {
|
||||
llvm::FunctionType* printf_type = llvm::TypeBuilder<int(char*, ...), false>::get(context_);
|
||||
auto no_alias = llvm::AttributeSet().addAttribute(context_, 1, llvm::Attribute::NoAlias);
|
||||
auto no_alias = llvm::AttributeList().addAttribute(context_, 1, llvm::Attribute::NoAlias);
|
||||
|
||||
module_->getOrInsertFunction("printf", printf_type, no_alias);
|
||||
module_->getOrInsertFunction("scanf", printf_type, no_alias);
|
||||
|
|
Reference in New Issue
Block a user