diff options
author | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 17:23:21 +0100 |
---|---|---|
committer | Mark de Wever <koraq@xs4all.nl> | 2020-01-01 20:01:37 +0100 |
commit | 8dc7b982b4556c243e0502e6e230bdd53ddd65ff (patch) | |
tree | 518a39bbece25299e56350272605c7a9bd8f60c6 /llvm/lib/Support/TargetParser.cpp | |
parent | 9b24dad6c06bba771b805ffd9bd047af25317e52 (diff) | |
download | bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.tar.gz bcm5719-llvm-8dc7b982b4556c243e0502e6e230bdd53ddd65ff.zip |
[NFC] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D71857
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
-rw-r--r-- | llvm/lib/Support/TargetParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index d213b9a8c6a..84ead58b98c 100644 --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -132,7 +132,7 @@ StringRef llvm::AMDGPU::getArchNameR600(GPUKind AK) { } AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN(StringRef CPU) { - for (const auto C : AMDGCNGPUs) { + for (const auto &C : AMDGCNGPUs) { if (CPU == C.Name) return C.Kind; } @@ -141,7 +141,7 @@ AMDGPU::GPUKind llvm::AMDGPU::parseArchAMDGCN(StringRef CPU) { } AMDGPU::GPUKind llvm::AMDGPU::parseArchR600(StringRef CPU) { - for (const auto C : R600GPUs) { + for (const auto &C : R600GPUs) { if (CPU == C.Name) return C.Kind; } @@ -163,12 +163,12 @@ unsigned AMDGPU::getArchAttrR600(GPUKind AK) { void AMDGPU::fillValidArchListAMDGCN(SmallVectorImpl<StringRef> &Values) { // XXX: Should this only report unique canonical names? - for (const auto C : AMDGCNGPUs) + for (const auto &C : AMDGCNGPUs) Values.push_back(C.Name); } void AMDGPU::fillValidArchListR600(SmallVectorImpl<StringRef> &Values) { - for (const auto C : R600GPUs) + for (const auto &C : R600GPUs) Values.push_back(C.Name); } |