aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-04-07 23:00:38 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2017-04-07 23:00:38 +0000
commit1a8030e73798920aee4868a1137a300b8bfd3ab3 (patch)
treef0fae22bb49bfe87c28c78391009a16eed9b5d7b /clang/lib/CodeGen/CodeGenModule.cpp
parent349adbaccace178575426e1e54ccc6c090a9951e (diff)
downloadllvm-1a8030e73798920aee4868a1137a300b8bfd3ab3.zip
llvm-1a8030e73798920aee4868a1137a300b8bfd3ab3.tar.gz
llvm-1a8030e73798920aee4868a1137a300b8bfd3ab3.tar.bz2
[cfi] Emit __cfi_check stub in the frontend.
Previously __cfi_check was created in LTO optimization pipeline, which means LLD has no way of knowing about the existence of this symbol without rescanning the LTO output object. As a result, LLD fails to export __cfi_check, even when given --export-dynamic-symbol flag. llvm-svn: 299806
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 479a390..6bc7d4f1 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -406,8 +406,10 @@ void CodeGenModule::Release() {
EmitDeferredUnusedCoverageMappings();
if (CoverageMapping)
CoverageMapping->emit();
- if (CodeGenOpts.SanitizeCfiCrossDso)
+ if (CodeGenOpts.SanitizeCfiCrossDso) {
CodeGenFunction(*this).EmitCfiCheckFail();
+ CodeGenFunction(*this).EmitCfiCheckStub();
+ }
emitAtAvailableLinkGuard();
emitLLVMUsed();
if (SanStats)