1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

X86_MC::createX86MCSubtargetInfo - X86_MC::ParseX86Triple never returns an empty string. NFCI.

PVS Studio was complaining that the expression '!ArchFS.empty()' is always true.
This commit is contained in:
Simon Pilgrim 2019-11-02 18:45:31 +00:00
parent df63153e69
commit a1ea2306ad

View File

@ -290,12 +290,9 @@ void X86_MC::initLLVMToSEHAndCVRegMapping(MCRegisterInfo *MRI) {
MCSubtargetInfo *X86_MC::createX86MCSubtargetInfo(const Triple &TT,
StringRef CPU, StringRef FS) {
std::string ArchFS = X86_MC::ParseX86Triple(TT);
if (!FS.empty()) {
if (!ArchFS.empty())
ArchFS = (Twine(ArchFS) + "," + FS).str();
else
ArchFS = FS;
}
assert(!ArchFS.empty() && "Failed to parse X86 triple");
if (!FS.empty())
ArchFS = (Twine(ArchFS) + "," + FS).str();
std::string CPUName = CPU;
if (CPUName.empty())