[PATCH] D94076: [VE] Change clang to support SjLj Loweirng

Kazushi Marukawa via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 03:20:14 PST 2021


kaz7 created this revision.
kaz7 added reviewers: simoll, k-ishizaka.
kaz7 added projects: LLVM, VE.
kaz7 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

We supports SjLj exception handling in the backend, so changing
clang to allow lowering using SjLj exceptions.  Update a regression
test also.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94076

Files:
  clang/lib/Basic/Targets/VE.h
  clang/test/Sema/builtin-longjmp.c


Index: clang/test/Sema/builtin-longjmp.c
===================================================================
--- clang/test/Sema/builtin-longjmp.c
+++ clang/test/Sema/builtin-longjmp.c
@@ -4,6 +4,7 @@
 // RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm < %s| FileCheck %s
 // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -emit-llvm < %s| FileCheck %s
 // RUN: %clang_cc1 -triple sparc-eabi-unknown -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -triple ve-unknown-unknown -emit-llvm < %s | FileCheck %s
 
 // RUN: %clang_cc1 -triple aarch64-unknown-unknown -emit-llvm-only -verify %s
 // RUN: %clang_cc1 -triple mips-unknown-unknown -emit-llvm-only -verify %s
Index: clang/lib/Basic/Targets/VE.h
===================================================================
--- clang/lib/Basic/Targets/VE.h
+++ clang/lib/Basic/Targets/VE.h
@@ -53,10 +53,7 @@
   void getTargetDefines(const LangOptions &Opts,
                         MacroBuilder &Builder) const override;
 
-  bool hasSjLjLowering() const override {
-    // TODO
-    return false;
-  }
+  bool hasSjLjLowering() const override { return true; }
 
   ArrayRef<Builtin::Info> getTargetBuiltins() const override;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94076.314556.patch
Type: text/x-patch
Size: 1190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210105/aeac9eea/attachment.bin>


More information about the cfe-commits mailing list