File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -328,9 +328,21 @@ class LLVM_LIBRARY_VISIBILITY HurdTargetInfo : public OSTargetInfo<Target> {
328328 Builder.defineMacro (" _REENTRANT" );
329329 if (Opts.CPlusPlus )
330330 Builder.defineMacro (" _GNU_SOURCE" );
331+ if (this ->HasFloat128 )
332+ Builder.defineMacro (" __FLOAT128__" );
331333 }
332334public:
333- using OSTargetInfo<Target>::OSTargetInfo;
335+ HurdTargetInfo (const llvm::Triple &Triple, const TargetOptions &Opts)
336+ : OSTargetInfo<Target>(Triple, Opts) {
337+ switch (Triple.getArch ()) {
338+ default :
339+ break ;
340+ case llvm::Triple::x86:
341+ case llvm::Triple::x86_64:
342+ this ->HasFloat128 = true ;
343+ break ;
344+ }
345+ }
334346};
335347
336348// Linux target
Original file line number Diff line number Diff line change 66// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
77// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-linux-gnu -std=c++11 \
88// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
9+ // RUN: %clang_cc1 -emit-llvm -triple i386-unknown-hurd-gnu -std=c++11 \
10+ // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
11+ // RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-hurd-gnu -std=c++11 \
12+ // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
913// RUN: %clang_cc1 -emit-llvm -triple i386-unknown-freebsd -std=c++11 \
1014// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
1115// RUN: %clang_cc1 -emit-llvm -triple amd64-unknown-freebsd -std=c++11 \
You can’t perform that action at this time.
0 commit comments