Skip to content

Commit d5ccbaf

Browse files
committed
Revert "[Basic] Support 64-bit x86 target for UEFI"
This reverts commit 315a407. The new test added fails to link the unit tests correctly and breaks certain buildbots.
1 parent 06c9cc7 commit d5ccbaf

File tree

4 files changed

+1
-12
lines changed

4 files changed

+1
-12
lines changed

llvm/lib/IR/DataLayout.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const char *DataLayout::getManglingComponent(const Triple &T) {
171171
return "-m:l";
172172
if (T.isOSBinFormatMachO())
173173
return "-m:o";
174-
if ((T.isOSWindows() || T.isUEFI()) && T.isOSBinFormatCOFF())
174+
if (T.isOSWindows() && T.isOSBinFormatCOFF())
175175
return T.getArch() == Triple::x86 ? "-m:x" : "-m:w";
176176
if (T.isOSBinFormatXCOFF())
177177
return "-m:a";

llvm/lib/TargetParser/Triple.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,6 @@ static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
799799
case Triple::x86_64:
800800
if (T.isOSWindows())
801801
return Triple::COFF;
802-
else if (T.isUEFI())
803-
return Triple::COFF;
804802
return Triple::ELF;
805803

806804
case Triple::aarch64_be:

llvm/unittests/IR/DataLayoutTest.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include "llvm/IR/LLVMContext.h"
1212
#include "llvm/IR/Module.h"
1313
#include "llvm/IR/Type.h"
14-
#include "llvm/TargetParser/Triple.h"
1514
#include "llvm/Testing/Support/Error.h"
1615
#include "gtest/gtest.h"
1716

@@ -105,11 +104,4 @@ TEST(DataLayoutTest, VectorAlign) {
105104
EXPECT_EQ(Align(4 * 8), DL->getPrefTypeAlign(V8F32Ty));
106105
}
107106

108-
TEST(DataLayoutTest, UEFI) {
109-
Triple TT = Triple("x86_64-unknown-uefi");
110-
111-
// Test UEFI X86_64 Mangling Component.
112-
EXPECT_STREQ(DataLayout::getManglingComponent(TT), "-m:w");
113-
}
114-
115107
} // anonymous namespace

llvm/unittests/TargetParser/TripleTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ TEST(TripleTest, ParsedIDs) {
462462
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
463463
EXPECT_EQ(Triple::UEFI, T.getOS());
464464
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
465-
EXPECT_EQ(Triple::COFF, T.getObjectFormat());
466465

467466
T = Triple("wasm32-unknown-unknown");
468467
EXPECT_EQ(Triple::wasm32, T.getArch());

0 commit comments

Comments
 (0)