forked from OSchip/llvm-project
parent
4129308413
commit
54d44bf14c
|
@ -3010,6 +3010,7 @@ void CodeGenFunction::EmitCfiCheckStub() {
|
||||||
llvm::Function *F = llvm::Function::Create(
|
llvm::Function *F = llvm::Function::Create(
|
||||||
llvm::FunctionType::get(VoidTy, {Int64Ty, Int8PtrTy, Int8PtrTy}, false),
|
llvm::FunctionType::get(VoidTy, {Int64Ty, Int8PtrTy, Int8PtrTy}, false),
|
||||||
llvm::GlobalValue::WeakAnyLinkage, "__cfi_check", M);
|
llvm::GlobalValue::WeakAnyLinkage, "__cfi_check", M);
|
||||||
|
CGM.setDSOLocal(F);
|
||||||
llvm::BasicBlock *BB = llvm::BasicBlock::Create(Ctx, "entry", F);
|
llvm::BasicBlock *BB = llvm::BasicBlock::Create(Ctx, "entry", F);
|
||||||
// FIXME: consider emitting an intrinsic call like
|
// FIXME: consider emitting an intrinsic call like
|
||||||
// call void @llvm.cfi_check(i64 %0, i8* %1, i8* %2)
|
// call void @llvm.cfi_check(i64 %0, i8* %1, i8* %2)
|
||||||
|
|
|
@ -66,6 +66,9 @@ Fn h1() {
|
||||||
inline void foo() {}
|
inline void foo() {}
|
||||||
void bar() { foo(); }
|
void bar() { foo(); }
|
||||||
|
|
||||||
|
// ITANIUM: define weak void @__cfi_check
|
||||||
|
// MS: define weak dso_local void @__cfi_check
|
||||||
|
|
||||||
// CHECK: !{i32 4, !"Cross-DSO CFI", i32 1}
|
// CHECK: !{i32 4, !"Cross-DSO CFI", i32 1}
|
||||||
|
|
||||||
// Check that the type entries are correct.
|
// Check that the type entries are correct.
|
||||||
|
|
Loading…
Reference in New Issue