aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index d560d2043f42..7c4eb71882c7 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -280,10 +280,10 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
}
LLVM_DEBUG(dbgs() << "Printf format string in source = " << Str.str()
<< '\n');
- for (size_t I = 0; I < Str.size(); ++I) {
+ for (char C : Str) {
// Rest of the C escape sequences (e.g. \') are handled correctly
// by the MDParser
- switch (Str[I]) {
+ switch (C) {
case '\a':
Sizes << "\\a";
break;
@@ -308,7 +308,7 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
Sizes << "\\72";
break;
default:
- Sizes << Str[I];
+ Sizes << C;
break;
}
}