Skip to content

Commit 4082272

Browse files
committed
some bugfixes
1 parent 6806927 commit 4082272

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ extern "C" void LLVMRustRemoveEnumAttributeAtIndex(LLVMValueRef F, size_t index,
379379
LLVMRemoveEnumAttributeAtIndex(F, index, fromRust(RustAttr));
380380
}
381381

382+
extern "C" LLVMAttributeRef
383+
LLVMRustCreateAttrNoValue(LLVMContextRef C, LLVMRustAttribute RustAttr) {
384+
return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr)));
385+
}
386+
382387
extern "C" void LLVMRustAddEnumAttributeAtIndex(LLVMContextRef C,
383388
LLVMValueRef F, size_t index,
384389
LLVMRustAttribute RustAttr) {
@@ -391,11 +396,6 @@ LLVMRustGetEnumAttributeAtIndex(LLVMValueRef F, size_t index,
391396
return LLVMGetEnumAttributeAtIndex(F, index, fromRust(RustAttr));
392397
}
393398

394-
extern "C" LLVMAttributeRef
395-
LLVMRustCreateAttrNoValue(LLVMContextRef C, LLVMRustAttribute RustAttr) {
396-
return wrap(Attribute::get(*unwrap(C), fromRust(RustAttr)));
397-
}
398-
399399
extern "C" LLVMAttributeRef LLVMRustCreateAlignmentAttr(LLVMContextRef C,
400400
uint64_t Bytes) {
401401
return wrap(Attribute::getWithAlignment(*unwrap(C), llvm::Align(Bytes)));

compiler/rustc_resolve/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
15081508
next_node_id: CRATE_NODE_ID,
15091509
node_id_to_def_id,
15101510
def_id_to_node_id,
1511+
autodiff_map: Default::default(),
15111512
placeholder_field_indices: Default::default(),
15121513
invocation_parents,
15131514
trait_impl_items: Default::default(),
@@ -1637,6 +1638,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
16371638
.into_items()
16381639
.map(|(k, f)| (k, f.key()))
16391640
.collect(),
1641+
autodiff_map: self.autodiff_map,
16401642
trait_map: self.trait_map,
16411643
lifetime_elision_allowed: self.lifetime_elision_allowed,
16421644
lint_buffer: Steal::new(self.lint_buffer),

0 commit comments

Comments
 (0)