[llvm-branch-commits] [clang] 709830a - Hook up OpenBSD 64-bit RISC-V support

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 20 04:21:34 PDT 2020


Author: Brad Smith
Date: 2020-08-20T13:19:19+02:00
New Revision: 709830a7538fb7ad339d75474dc1da500bde0d12

URL: https://github.com/llvm/llvm-project/commit/709830a7538fb7ad339d75474dc1da500bde0d12
DIFF: https://github.com/llvm/llvm-project/commit/709830a7538fb7ad339d75474dc1da500bde0d12.diff

LOG: Hook up OpenBSD 64-bit RISC-V support

(cherry picked from commit 592b8996bf9b55eec21e1c9e563f51b6108ec2d2)

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 e4456ea7fa0f..818133f66f3f 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 9e085a8f9fe8..3cc36302aa0e 100644
--- a/clang/test/Preprocessor/init.c
+++ b/clang/test/Preprocessor/init.c
@@ -7326,6 +7326,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 llvm-branch-commits mailing list