diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-11-11 01:24:59 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-11-11 01:24:59 +0000 |
| commit | 676f44062e26e700a47995c290f28285913e461c (patch) | |
| tree | 805b0d6531f7d41e22571f89b8dfc7a0ea8156d8 /llvm/lib/CodeGen | |
| parent | e6c81125728a2899494f1dfa34650cdcb0461b6f (diff) | |
| download | bcm5719-llvm-676f44062e26e700a47995c290f28285913e461c.tar.gz bcm5719-llvm-676f44062e26e700a47995c290f28285913e461c.zip | |
Make sure that the exception handling data has the same visibility as the
function it's generated for.
llvm-svn: 86779
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index 8c1c0c98ec4..b07c95bb599 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -232,11 +232,16 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // corresponding function is static, this should not be externally visible. if (!TheFunc->hasLocalLinkage()) if (const char *GlobalEHDirective = MAI->getGlobalEHDirective()) - O << GlobalEHDirective << EHFrameInfo.FnName << "\n"; + O << GlobalEHDirective << EHFrameInfo.FnName << '\n'; // If corresponding function is weak definition, this should be too. if (TheFunc->isWeakForLinker() && MAI->getWeakDefDirective()) - O << MAI->getWeakDefDirective() << EHFrameInfo.FnName << "\n"; + O << MAI->getWeakDefDirective() << EHFrameInfo.FnName << '\n'; + + // If corresponding function is hidden, this should be too. + if (TheFunc->hasHiddenVisibility()) + if (const char *HiddenDirective = MAI->getHiddenDirective()) + O << HiddenDirective << EHFrameInfo.FnName << '\n' ; // If there are no calls then you can't unwind. This may mean we can omit the // EH Frame, but some environments do not handle weak absolute symbols. If |

