Merge branch 'master' into nvptx

This commit is contained in:
Evghenii
2014-03-19 10:53:07 +01:00
93 changed files with 1182 additions and 1536 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2010-2013, Intel Corporation
Copyright (c) 2010-2014, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,11 @@
#include <llvm/IR/Intrinsics.h>
#include <llvm/IR/DerivedTypes.h>
#endif
#include <llvm/Linker.h>
#if defined(LLVM_3_5)
#include <llvm/Linker/Linker.h>
#else
#include <llvm/Linker.h>
#endif
#include <llvm/Target/TargetMachine.h>
#include <llvm/ADT/Triple.h>
#include <llvm/Support/MemoryBuffer.h>
@@ -817,6 +821,17 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
// architecture and investigate what happened.
// Generally we allow library DataLayout to be subset of module
// DataLayout or library DataLayout to be empty.
#if defined(LLVM_3_5)
if (!VerifyDataLayoutCompatibility(module->getDataLayoutStr(),
bcModule->getDataLayoutStr())) {
Warning(SourcePos(), "Module DataLayout is incompatible with "
"library DataLayout:\n"
"Module DL: %s\n"
"Library DL: %s\n",
module->getDataLayoutStr().c_str(),
bcModule->getDataLayoutStr().c_str());
}
#else
if (!VerifyDataLayoutCompatibility(module->getDataLayout(),
bcModule->getDataLayout())) {
Warning(SourcePos(), "Module DataLayout is incompatible with "
@@ -826,6 +841,7 @@ AddBitcodeToModule(const unsigned char *bitcode, int length,
module->getDataLayout().c_str(),
bcModule->getDataLayout().c_str());
}
#endif
}
bcModule->setTargetTriple(mTriple.str());