r328825 - Mark __cfi_check as dso_local.
Rafael Espindola via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 29 13:51:30 PDT 2018
Author: rafael
Date: Thu Mar 29 13:51:30 2018
New Revision: 328825
URL: http://llvm.org/viewvc/llvm-project?rev=328825&view=rev
Log:
Mark __cfi_check as dso_local.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=328825&r1=328824&r2=328825&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Thu Mar 29 13:51:30 2018
@@ -3010,6 +3010,7 @@ void CodeGenFunction::EmitCfiCheckStub()
llvm::Function *F = llvm::Function::Create(
llvm::FunctionType::get(VoidTy, {Int64Ty, Int8PtrTy, Int8PtrTy}, false),
llvm::GlobalValue::WeakAnyLinkage, "__cfi_check", M);
+ CGM.setDSOLocal(F);
llvm::BasicBlock *BB = llvm::BasicBlock::Create(Ctx, "entry", F);
// FIXME: consider emitting an intrinsic call like
// call void @llvm.cfi_check(i64 %0, i8* %1, i8* %2)
Modified: cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c?rev=328825&r1=328824&r2=328825&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c (original)
+++ cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c Thu Mar 29 13:51:30 2018
@@ -66,6 +66,9 @@ Fn h1() {
inline void 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 that the type entries are correct.
More information about the cfe-commits
mailing list