From 489000d8516da7eaf6aabaad11cce0ed7e67c61f Mon Sep 17 00:00:00 2001 From: "Kazushi (Jam) Marukawa" Date: Sat, 26 Dec 2020 22:52:49 +0900 Subject: [PATCH] [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 --- clang/lib/Basic/Targets/VE.h | 5 +---- clang/test/Sema/builtin-longjmp.c | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/Basic/Targets/VE.h b/clang/lib/Basic/Targets/VE.h index 2d9c74a..71d6fc0 100644 --- a/clang/lib/Basic/Targets/VE.h +++ b/clang/lib/Basic/Targets/VE.h @@ -53,10 +53,7 @@ public: void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override; - bool hasSjLjLowering() const override { - // TODO - return false; - } + bool hasSjLjLowering() const override { return true; } ArrayRef getTargetBuiltins() const override; diff --git a/clang/test/Sema/builtin-longjmp.c b/clang/test/Sema/builtin-longjmp.c index d80208f..3023098 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 -- 2.7.4