mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 04:45:00 +00:00
[opt] Report if the provided architecture is invalid.
Partly addresses PR15026. There are a few tests that passed in invalid architectures, which are fixed in: rL355349 and D58931 Reviewers: echristo, efriedma, rengolin, atrick Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D58933 llvm-svn: 355455
This commit is contained in:
parent
6b439704dd
commit
eafd27fedf
@ -639,6 +639,11 @@ int main(int argc, char **argv) {
|
||||
CPUStr = getCPUStr();
|
||||
FeaturesStr = getFeaturesStr();
|
||||
Machine = GetTargetMachine(ModuleTriple, CPUStr, FeaturesStr, Options);
|
||||
} else if (ModuleTriple.getArchName() != "unknown" &&
|
||||
ModuleTriple.getArchName() != "") {
|
||||
errs() << argv[0] << ": unrecognized architecture '"
|
||||
<< ModuleTriple.getArchName() << "' provided.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::unique_ptr<TargetMachine> TM(Machine);
|
||||
|
Loading…
x
Reference in New Issue
Block a user