Skip to content

Commit d7664ac

Browse files
[clang][driver] remove uefi from unsupported test
1 parent b601bb7 commit d7664ac

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

clang/test/Driver/unsupported-target-arch.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,21 +63,3 @@
6363
// RUN: not %clang --target=powerpc-apple-darwin -o /dev/null %s 2> %t.err
6464
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-PPCMAC %s
6565
// CHECK-PPCMAC: error: unknown target triple 'unknown-apple-macosx{{.*}}'
66-
67-
// RUN: not %clang --target=aarch64-unknown-uefi -o %t.o %s 2> %t.err
68-
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64 %s
69-
// RUN: not %clang_cl --target=aarch64-unknown-uefi -o %t.o %s 2> %t.err
70-
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64 %s
71-
// CHECK-AARCH64: error: unknown target triple 'aarch64-unknown-uefi'{{$}}
72-
73-
// RUN: not %clang --target=arm-unknown-uefi -o %t.o %s 2> %t.err
74-
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-ARM %s
75-
// RUN: not %clang_cl --target=arm-unknown-uefi -o %t.o %s 2> %t.err
76-
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-ARM %s
77-
// CHECK-ARM: error: unknown target triple 'arm-unknown-uefi'{{$}}
78-
79-
// RUN: not %clang --target=x86-unknown-uefi -o %t.o %s 2> %t.err
80-
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-x86 %s
81-
// RUN: not %clang_cl --target=x86-unknown-uefi -o %t.o %s 2> %t.err
82-
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-x86 %s
83-
// CHECK-x86: error: unknown target triple 'x86-unknown-uefi'{{$}}

llvm/lib/Target/AArch64/AArch64MCInstLower.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ MCSymbol *AArch64MCInstLower::GetGlobalValueSymbol(const GlobalValue *GV,
4949
if (!TheTriple.isOSBinFormatCOFF())
5050
return Printer.getSymbolPreferLocal(*GV);
5151

52-
assert(TheTriple.isOSWindows() &&
53-
"Windows is the only supported COFF target");
52+
assert((TheTriple.isOSWindows() || TheTriple.isUEFI()) &&
53+
"Windows and UEFI are the only supported COFF target");
5454

5555
bool IsIndirect =
5656
(TargetFlags & (AArch64II::MO_DLLIMPORT | AArch64II::MO_COFFSTUB));

0 commit comments

Comments
 (0)