================
@@ -68,20 +80,18 @@ int main(int argc, char *argv[]) {
return 0;
}
- // If this was invoked from the legacy symlinks provide the same behavior.
- bool AMDGPUOnly = Only == VendorName::amdgpu ||
- sys::path::stem(argv[0]).starts_with("amdgpu-arch");
- bool NVIDIAOnly = Only == VendorName::nvptx ||
- sys::path::stem(argv[0]).starts_with("nvptx-arch");
+ // Support legacy binaries
+ if (sys::path::stem(argv[0]).starts_with("amdgpu-arch"))
+ Only = VendorName::amdgpu;
+ if (sys::path::stem(argv[0]).starts_with("nvptx-arch"))
+ Only = VendorName::nvptx;
- int NVIDIAResult = 0;
- if (!AMDGPUOnly)
- NVIDIAResult = printNVIDIA();
-
- int AMDResult = 0;
- if (!NVIDIAOnly)
- AMDResult = printAMD();
+ llvm::SmallVector<int> results(VendorTable.size());
+ llvm::transform(VendorTable, results.begin(), [&](const auto &entry) {
----------------
jhuber6 wrote:
Also if you do a look remember you can do `for (auto [Name, Func] : Table`.
Also I forgot to nag you about the LLVM naming convention, remember it's
`CamelCase`.
https://github.com/llvm/llvm-project/pull/160570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits