diff options
author | Chris B <chris.bieneman@me.com> | 2025-09-07 16:05:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-07 16:05:37 -0500 |
commit | 799d3466fa97e24082cb036e71a7a92f72597b4e (patch) | |
tree | 510834c86a7ad95ce0dffa1984531743d332a63d /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | c4d927ce09780ffed87c2f34c48d71c1abe42bac (diff) | |
download | llvm-799d3466fa97e24082cb036e71a7a92f72597b4e.zip llvm-799d3466fa97e24082cb036e71a7a92f72597b4e.tar.gz llvm-799d3466fa97e24082cb036e71a7a92f72597b4e.tar.bz2 |
[NFC] Change const char* to StringRef (#154179)
This API takes a const char* with a default nullptr value and immdiately
passes it down to an API taking a StringRef. All of the places this is
called from are either using compile time string literals, the default
argument, or string objects that have known length. Discarding the
length known from a calling API to just have to strlen it to call the
next layer down that requires a StringRef is a bit silly, so this change
updates CodeGenModule::GetAddrOfConstantCString to use StringRef instead
of const char* for the GlobalName parameter.
It might be worth also replacing the first parameter with an llvm ADT
type that avoids allocation, but that change would have wider impact so
we should consider it separately.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions