forked from qt-creator/qt-creator
Abi: Fix switch statment when guessing ABI based on target triple
Some entries were duplicated. Fix fallout in gcc toolchain test caused by this change. Change-Id: I63c7a5fdba93e903888b2daa99a87e0a07c28acd Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -527,7 +527,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
if (p == "unknown" || p == "pc" || p == "none"
|
if (p == "unknown" || p == "pc" || p == "none"
|
||||||
|| p == "gnu" || p == "uclibc"
|
|| p == "gnu" || p == "uclibc"
|
||||||
|| p == "86_64" || p == "redhat"
|
|| p == "86_64" || p == "redhat"
|
||||||
|| p == "gnueabi" || p == "w64") {
|
|| p == "w64") {
|
||||||
continue;
|
continue;
|
||||||
} else if (p == "i386" || p == "i486" || p == "i586"
|
} else if (p == "i386" || p == "i486" || p == "i586"
|
||||||
|| p == "i686" || p == "x86") {
|
|| p == "i686" || p == "x86") {
|
||||||
@@ -591,7 +591,7 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
width = 64;
|
width = 64;
|
||||||
} else if (p == "darwin9") {
|
} else if (p == "darwin9") {
|
||||||
width = 32;
|
width = 32;
|
||||||
} else if (p == "gnueabi") {
|
} else if (p == "gnueabi" || p == "elf") {
|
||||||
format = ElfFormat;
|
format = ElfFormat;
|
||||||
} else if (p == "wrs") {
|
} else if (p == "wrs") {
|
||||||
continue;
|
continue;
|
||||||
|
@@ -1625,11 +1625,11 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data()
|
|||||||
QTest::newRow("broken input -- 64bit")
|
QTest::newRow("broken input -- 64bit")
|
||||||
<< QString::fromLatin1("arm-none-foo-gnueabi")
|
<< QString::fromLatin1("arm-none-foo-gnueabi")
|
||||||
<< QByteArray("#define __SIZEOF_SIZE_T__ 8\n#define __Something\n")
|
<< QByteArray("#define __SIZEOF_SIZE_T__ 8\n#define __Something\n")
|
||||||
<< QStringList({"arm-unknown-unknown-unknown-64bit"});
|
<< QStringList({"arm-unknown-unknown-elf-64bit"});
|
||||||
QTest::newRow("broken input -- 32bit")
|
QTest::newRow("broken input -- 32bit")
|
||||||
<< QString::fromLatin1("arm-none-foo-gnueabi")
|
<< QString::fromLatin1("arm-none-foo-gnueabi")
|
||||||
<< QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n")
|
<< QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n")
|
||||||
<< QStringList({"arm-unknown-unknown-unknown-32bit"});
|
<< QStringList({"arm-unknown-unknown-elf-32bit"});
|
||||||
QTest::newRow("totally broken input -- 32bit")
|
QTest::newRow("totally broken input -- 32bit")
|
||||||
<< QString::fromLatin1("foo-bar-foo")
|
<< QString::fromLatin1("foo-bar-foo")
|
||||||
<< QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n")
|
<< QByteArray("#define __SIZEOF_SIZE_T__ 4\n#define __Something\n")
|
||||||
|
Reference in New Issue
Block a user