mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Update LLVM
To fix #8106, we need an LLVM version that contains r211082 aka 0dee6756 which fixes a bug that blocks that issue. There have been some tiny API changes in LLVM, and cmpxchg changed its return type. The i1 part of the new return type is only interesting when using the new weak cmpxchg, which we don't do.
This commit is contained in:
parent
5e720aac42
commit
90a9f65b8d
@ -235,11 +235,15 @@ pub fn trans_intrinsic(ccx: &CrateContext,
|
||||
lib::llvm::SequentiallyConsistent =>
|
||||
lib::llvm::SequentiallyConsistent,
|
||||
};
|
||||
let old = AtomicCmpXchg(bcx, get_param(decl, first_real_arg),
|
||||
let res = AtomicCmpXchg(bcx, get_param(decl, first_real_arg),
|
||||
get_param(decl, first_real_arg + 1u),
|
||||
get_param(decl, first_real_arg + 2u),
|
||||
order, strongest_failure_ordering);
|
||||
Ret(bcx, old);
|
||||
if unsafe { lib::llvm::llvm::LLVMVersionMinor() >= 5 } {
|
||||
Ret(bcx, ExtractValue(bcx, res, 0));
|
||||
} else {
|
||||
Ret(bcx, res);
|
||||
}
|
||||
}
|
||||
"load" => {
|
||||
let old = AtomicLoad(bcx, get_param(decl, first_real_arg),
|
||||
|
2
src/llvm
2
src/llvm
@ -1 +1 @@
|
||||
Subproject commit 0a894645cf120539876e9eb4eb0d7b572dfa9d14
|
||||
Subproject commit 1bba09755d95892bc826c558630e93803b0a4ee6
|
@ -659,7 +659,7 @@ LLVMRustLinkInExternalBitcode(LLVMModuleRef dst, char *bc, size_t len) {
|
||||
extern "C" void*
|
||||
LLVMRustOpenArchive(char *path) {
|
||||
std::unique_ptr<MemoryBuffer> buf;
|
||||
error_code err = MemoryBuffer::getFile(path, buf);
|
||||
std::error_code err = MemoryBuffer::getFile(path, buf);
|
||||
if (err) {
|
||||
LLVMRustSetLastError(err.message().c_str());
|
||||
return NULL;
|
||||
@ -694,14 +694,18 @@ LLVMRustArchiveReadSection(Archive *ar, char *name, size_t *size) {
|
||||
#if LLVM_VERSION_MINOR >= 5
|
||||
Archive::child_iterator child = ar->child_begin(),
|
||||
end = ar->child_end();
|
||||
for (; child != end; ++child) {
|
||||
ErrorOr<StringRef> name_or_err = child->getName();
|
||||
if (name_or_err.getError()) continue;
|
||||
StringRef sect_name = name_or_err.get();
|
||||
#else
|
||||
Archive::child_iterator child = ar->begin_children(),
|
||||
end = ar->end_children();
|
||||
#endif
|
||||
for (; child != end; ++child) {
|
||||
StringRef sect_name;
|
||||
error_code err = child->getName(sect_name);
|
||||
if (err) continue;
|
||||
#endif
|
||||
if (sect_name.trim(" ") == name) {
|
||||
StringRef buf = child->getBuffer();
|
||||
*size = buf.size();
|
||||
@ -757,7 +761,11 @@ inline section_iterator *unwrap(LLVMSectionIteratorRef SI) {
|
||||
extern "C" int
|
||||
LLVMRustGetSectionName(LLVMSectionIteratorRef SI, const char **ptr) {
|
||||
StringRef ret;
|
||||
#if LLVM_VERSION_MINOR >= 5
|
||||
if (std::error_code ec = (*unwrap(SI))->getName(ret))
|
||||
#else
|
||||
if (error_code ec = (*unwrap(SI))->getName(ret))
|
||||
#endif
|
||||
report_fatal_error(ec.message());
|
||||
*ptr = ret.data();
|
||||
return ret.size();
|
||||
|
@ -1,4 +1,4 @@
|
||||
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
|
||||
# The actual contents of this file do not matter, but to trigger a change on the
|
||||
# build bots then the contents should be changed so git updates the mtime.
|
||||
2014-05-20
|
||||
2014-06-20.2
|
||||
|
Loading…
Reference in New Issue
Block a user