diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-12-02 21:02:54 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-12-02 21:02:54 +0000 |
| commit | f65dcba83ce5035ab88a85fe17628b447eb56e1b (patch) | |
| tree | 35f37bb72b3cfc6060193e66c76ee7c9478969b0 /llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | |
| parent | 846a2208a8ab099f595fe7e8b2e6d54a7b5e67fb (diff) | |
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp | 6 |
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; } } |
