Opportunistically use the C++ personality function in ObjC++
translation units that don't catch ObjC types. rdar://problem/8434851
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114070 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGException.h b/lib/CodeGen/CGException.h
index ce8bd49..9c81a4e 100644
--- a/lib/CodeGen/CGException.h
+++ b/lib/CodeGen/CGException.h
@@ -29,15 +29,15 @@
/// The exceptions personality for a function. When
class EHPersonality {
- const char *PersonalityFn;
+ llvm::StringRef PersonalityFn;
// If this is non-null, this personality requires a non-standard
// function for rethrowing an exception after a catchall cleanup.
// This function must have prototype void(void*).
- const char *CatchallRethrowFn;
+ llvm::StringRef CatchallRethrowFn;
- EHPersonality(const char *PersonalityFn,
- const char *CatchallRethrowFn = 0)
+ EHPersonality(llvm::StringRef PersonalityFn,
+ llvm::StringRef CatchallRethrowFn = llvm::StringRef())
: PersonalityFn(PersonalityFn),
CatchallRethrowFn(CatchallRethrowFn) {}
@@ -49,8 +49,8 @@
static const EHPersonality GNU_CPlusPlus;
static const EHPersonality GNU_CPlusPlus_SJLJ;
- const char *getPersonalityFnName() const { return PersonalityFn; }
- const char *getCatchallRethrowFnName() const { return CatchallRethrowFn; }
+ llvm::StringRef getPersonalityFnName() const { return PersonalityFn; }
+ llvm::StringRef getCatchallRethrowFnName() const { return CatchallRethrowFn; }
};
/// A protected scope for zero-cost EH handling.