[clang] 592b899 - Hook up OpenBSD 64-bit RISC-V support
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 16:01:34 PDT 2020
Author: Brad Smith
Date: 2020-08-18T18:59:55-04:00
New Revision: 592b8996bf9b55eec21e1c9e563f51b6108ec2d2
URL: https://github.com/llvm/llvm-project/commit/592b8996bf9b55eec21e1c9e563f51b6108ec2d2
DIFF: https://github.com/llvm/llvm-project/commit/592b8996bf9b55eec21e1c9e563f51b6108ec2d2.diff
LOG: Hook up OpenBSD 64-bit RISC-V support
Added:
Modified:
clang/lib/Basic/Targets.cpp
clang/test/Preprocessor/init.c
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index c90becd9f012..50a3b0e83a56 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -391,6 +391,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
switch (os) {
case llvm::Triple::FreeBSD:
return new FreeBSDTargetInfo<RISCV64TargetInfo>(Triple, Opts);
+ case llvm::Triple::OpenBSD:
+ return new OpenBSDTargetInfo<RISCV64TargetInfo>(Triple, Opts);
case llvm::Triple::Fuchsia:
return new FuchsiaTargetInfo<RISCV64TargetInfo>(Triple, Opts);
case llvm::Triple::Linux:
diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c
index 65928b08be8e..63a96f20de88 100644
--- a/clang/test/Preprocessor/init.c
+++ b/clang/test/Preprocessor/init.c
@@ -1607,6 +1607,7 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64el-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=riscv64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
// OPENBSD:#define __ELF__ 1
// OPENBSD:#define __INT16_TYPE__ short
// OPENBSD:#define __INT32_TYPE__ int
More information about the cfe-commits
mailing list