Merge branch 'master' into nvptx
This commit is contained in:
20
builtins.cpp
20
builtins.cpp
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user