aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2020-11-03 03:57:46 +0000
committerJessica Clarke <jrtc27@jrtc27.com>2020-11-03 03:57:46 +0000
commitf77c8a48aea9fbce038fc38ef9849f7aa1453993 (patch)
tree4ffdea8e0f18a0565c42638948c1954e3fc151aa /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent7601a2173893dbb0fbe883e6efaa413bc986557d (diff)
downloadllvm-f77c8a48aea9fbce038fc38ef9849f7aa1453993.zip
llvm-f77c8a48aea9fbce038fc38ef9849f7aa1453993.tar.gz
llvm-f77c8a48aea9fbce038fc38ef9849f7aa1453993.tar.bz2
[CodeGen] Fix regression from D83655
Arm EHABI has a null LSDASection as it does its own thing, so we should continue to return null in that case rather than try and cast it.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 1772e7f..57af82a 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -837,7 +837,8 @@ MCSection *
TargetLoweringObjectFileELF::getSectionForLSDA(const Function &F,
const TargetMachine &TM) const {
// If neither COMDAT nor function sections, use the monolithic LSDA section.
- if (!F.hasComdat() && !TM.getFunctionSections())
+ // Re-use this path if LSDASection is null as in the Arm EHABI.
+ if (!LSDASection || (!F.hasComdat() && !TM.getFunctionSections()))
return LSDASection;
const auto *LSDA = cast<MCSectionELF>(LSDASection);