Skip to content

Commit 8628ff3

Browse files
[ObjectYAML] Remove extraneous .c_str() (NFC) (#167189)
maskedBitSetCase takes StringRef, so we can "implicitly cast" std::string to StringRef. Identified with readability-redundant-string-cstr.
1 parent 188f109 commit 8628ff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ObjectYAML/ELFYAML.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ void ScalarBitSetTraits<ELFYAML::ELF_EF>::bitset(IO &IO,
670670
for (unsigned K = ELF::EF_AMDGPU_GENERIC_VERSION_MIN;
671671
K <= ELF::EF_AMDGPU_GENERIC_VERSION_MAX; ++K) {
672672
std::string Key = "EF_AMDGPU_GENERIC_VERSION_V" + std::to_string(K);
673-
IO.maskedBitSetCase(Value, Key.c_str(),
673+
IO.maskedBitSetCase(Value, Key,
674674
K << ELF::EF_AMDGPU_GENERIC_VERSION_OFFSET,
675675
ELF::EF_AMDGPU_GENERIC_VERSION);
676676
}

0 commit comments

Comments
 (0)