Skip to content

Commit 752ebf9

Browse files
committed
correct the test
1 parent 9caef13 commit 752ebf9

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -973,21 +973,19 @@ extern "C" LLVMMetadataRef LLVMRustDIGetInstMetadata(LLVMValueRef x) {
973973
return nullptr;
974974
}
975975

976-
977-
extern "C" void LLVMRustRemoveEnumAttributeAtIndex(LLVMValueRef F, size_t index,
978-
LLVMRustAttributeKind RustAttr) {
976+
extern "C" void
977+
LLVMRustRemoveEnumAttributeAtIndex(LLVMValueRef F, size_t index,
978+
LLVMRustAttributeKind RustAttr) {
979979
LLVMRemoveEnumAttributeAtIndex(F, index, fromRust(RustAttr));
980980
}
981981

982-
983982
extern "C" bool LLVMRustHasFnAttribute(LLVMValueRef F, const char *Name) {
984983
if (auto *Fn = dyn_cast<Function>(unwrap<Value>(F))) {
985984
return Fn->hasFnAttribute(Name);
986985
}
987986
return false;
988987
}
989988

990-
991989
extern "C" void LLVMRustRemoveFnAttribute(LLVMValueRef Fn, const char *Name) {
992990
auto *F = dyn_cast<Function>(unwrap<Value>(Fn));
993991
assert(F);
@@ -996,7 +994,6 @@ extern "C" void LLVMRustRemoveFnAttribute(LLVMValueRef Fn, const char *Name) {
996994
F->removeFnAttr(Name);
997995
}
998996

999-
1000997
extern "C" void LLVMRustGlobalAddMetadata(LLVMValueRef Global, unsigned Kind,
1001998
LLVMMetadataRef MD) {
1002999
unwrap<GlobalObject>(Global)->addMetadata(Kind, *unwrap<MDNode>(MD));

tests/codegen/autodiff/inline.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ fn square(x: &f64) -> f64 {
1111
x * x
1212
}
1313

14-
1514
// CHECK: ; inline::d_square
1615
// CHECK-NEXT: ; Function Attrs: alwaysinline
1716
// CHECK-NOT: noinline
@@ -21,4 +20,4 @@ fn main() {
2120
let mut dx1 = std::hint::black_box(1.0);
2221
let _ = d_square(&x, &mut dx1, 1.0);
2322
assert_eq!(dx1, 6.0);
24-
}
23+
}

0 commit comments

Comments
 (0)