summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp15
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp2
3 files changed, 7 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index ff12d5d3247..2b03877faec 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -106,7 +106,7 @@ void Win64Exception::endFunction(const MachineFunction *) {
// Emit the tables appropriate to the personality function in use. If we
// don't recognize the personality, assume it uses an Itanium-style LSDA.
EHPersonality Per = MMI->getPersonalityType();
- if (Per == EHPersonality::Win64SEH)
+ if (Per == EHPersonality::MSVC_Win64SEH)
emitCSpecificHandlerTable();
else
emitExceptionTable();
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index b4ce673659f..fca7df097b6 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -9,6 +9,7 @@
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/ADT/PointerUnion.h"
+#include "llvm/Analysis/LibCallSemantics.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
@@ -276,7 +277,7 @@ bool MachineModuleInfo::doInitialization(Module &M) {
DbgInfoAvailable = UsesVAFloatArgument = UsesMorestackAddr = false;
// Always emit some info, by default "no personality" info.
Personalities.push_back(nullptr);
- PersonalityTypeCache = EHPersonality::None;
+ PersonalityTypeCache = EHPersonality::Unknown;
AddrLabelSymbols = nullptr;
TheModule = nullptr;
@@ -561,17 +562,11 @@ const Function *MachineModuleInfo::getPersonality() const {
return nullptr;
}
-EHPersonality MachineModuleInfo::getPersonalityTypeSlow() {
- const Function *Per = getPersonality();
- if (!Per)
- PersonalityTypeCache = EHPersonality::None;
- else if (Per->getName() == "__C_specific_handler")
- PersonalityTypeCache = EHPersonality::Win64SEH;
- else // Assume everything else is Itanium.
- PersonalityTypeCache = EHPersonality::Itanium;
+EHPersonality MachineModuleInfo::getPersonalityType() {
+ if (PersonalityTypeCache == EHPersonality::Unknown)
+ PersonalityTypeCache = classifyEHPersonality(getPersonality());
return PersonalityTypeCache;
}
-
/// getPersonalityIndex - Return unique index for current personality
/// function. NULL/first personality function should always get zero index.
unsigned MachineModuleInfo::getPersonalityIndex() const {
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 1855ab340be..5e867cf6aec 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -930,7 +930,7 @@ void SelectionDAGISel::PrepareEHLandingPad() {
const LandingPadInst *LPadInst = LLVMBB->getLandingPadInst();
MF->getMMI().addPersonality(
MBB, cast<Function>(LPadInst->getPersonalityFn()->stripPointerCasts()));
- if (MF->getMMI().getPersonalityType() == EHPersonality::Win64SEH) {
+ if (MF->getMMI().getPersonalityType() == EHPersonality::MSVC_Win64SEH) {
// Make virtual registers and a series of labels that fill in values for the
// clauses.
auto &RI = MF->getRegInfo();
OpenPOWER on IntegriCloud