diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCleanup.h')
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index 1b54c0018d27..76f3a48f32f3 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -242,7 +242,7 @@ class alignas(8) EHCleanupScope : public EHScope { /// An optional i1 variable indicating whether this cleanup has been /// activated yet. - llvm::AllocaInst *ActiveFlag; + Address ActiveFlag; /// Extra information required for cleanups that have resolved /// branches through them. This has to be allocated on the side @@ -290,7 +290,8 @@ public: EHScopeStack::stable_iterator enclosingEH) : EHScope(EHScope::Cleanup, enclosingEH), EnclosingNormal(enclosingNormal), NormalBlock(nullptr), - ActiveFlag(nullptr), ExtInfo(nullptr), FixupDepth(fixupDepth) { + ActiveFlag(Address::invalid()), ExtInfo(nullptr), + FixupDepth(fixupDepth) { CleanupBits.IsNormalCleanup = isNormal; CleanupBits.IsEHCleanup = isEH; CleanupBits.IsActive = true; @@ -320,13 +321,13 @@ public: bool isLifetimeMarker() const { return CleanupBits.IsLifetimeMarker; } void setLifetimeMarker() { CleanupBits.IsLifetimeMarker = true; } - bool hasActiveFlag() const { return ActiveFlag != nullptr; } + bool hasActiveFlag() const { return ActiveFlag.isValid(); } Address getActiveFlag() const { - return Address(ActiveFlag, CharUnits::One()); + return ActiveFlag; } void setActiveFlag(Address Var) { assert(Var.getAlignment().isOne()); - ActiveFlag = cast<llvm::AllocaInst>(Var.getPointer()); + ActiveFlag = Var; } void setTestFlagInNormalCleanup() { |