[llvm-branch-commits] [clang] 489000d - [VE] Change clang to support SjLj Lowering

Kazushi Marukawa via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 5 05:23:53 PST 2021


Author: Kazushi (Jam) Marukawa
Date: 2021-01-05T22:19:02+09:00
New Revision: 489000d8516da7eaf6aabaad11cce0ed7e67c61f

URL: https://github.com/llvm/llvm-project/commit/489000d8516da7eaf6aabaad11cce0ed7e67c61f
DIFF: https://github.com/llvm/llvm-project/commit/489000d8516da7eaf6aabaad11cce0ed7e67c61f.diff

LOG: [VE] Change clang to support SjLj Lowering

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

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D94076

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/Targets/VE.h b/clang/lib/Basic/Targets/VE.h
index 2d9c74ac5247..71d6fc08d859 100644
--- a/clang/lib/Basic/Targets/VE.h
+++ b/clang/lib/Basic/Targets/VE.h
@@ -53,10 +53,7 @@ class LLVM_LIBRARY_VISIBILITY VETargetInfo : public TargetInfo {
   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;
 

diff  --git a/clang/test/Sema/builtin-longjmp.c b/clang/test/Sema/builtin-longjmp.c
index d80208f82c67..3023098a7631 100644
--- a/clang/test/Sema/builtin-longjmp.c
+++ b/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


        


More information about the llvm-branch-commits mailing list