[PATCH] D58933: [opt] Report if the provided architecture is invalid.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 15:09:56 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL355455: [opt] Report if the provided architecture is invalid. (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D58933?vs=189249&id=189408#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58933/new/
https://reviews.llvm.org/D58933
Files:
llvm/trunk/tools/opt/opt.cpp
Index: llvm/trunk/tools/opt/opt.cpp
===================================================================
--- llvm/trunk/tools/opt/opt.cpp
+++ llvm/trunk/tools/opt/opt.cpp
@@ -639,6 +639,11 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58933.189408.patch
Type: text/x-patch
Size: 628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190305/9a43f594/attachment.bin>
More information about the llvm-commits
mailing list