aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBill Wendling <5993918+bwendling@users.noreply.github.com>2024-04-11 00:33:40 +0000
committerGitHub <noreply@github.com>2024-04-11 00:33:40 +0000
commitfca51911d4668b3a6b79eb956327eb81fad3f40c (patch)
tree5ecae090dfb59b591c3bdf3eaec984a8093805ca /clang/lib/CodeGen/CodeGenModule.cpp
parentbe10070f91b86a6f126d2451852242bfcb2cd366 (diff)
downloadllvm-fca51911d4668b3a6b79eb956327eb81fad3f40c.zip
llvm-fca51911d4668b3a6b79eb956327eb81fad3f40c.tar.gz
llvm-fca51911d4668b3a6b79eb956327eb81fad3f40c.tar.bz2
[NFC][Clang] Improve const correctness for IdentifierInfo (#79365)
The IdentifierInfo isn't typically modified. Use 'const' wherever possible.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 75519be..b15031d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -6626,7 +6626,7 @@ static bool AllTrivialInitializers(CodeGenModule &CGM,
void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
// We might need a .cxx_destruct even if we don't have any ivar initializers.
if (needsDestructMethod(D)) {
- IdentifierInfo *II = &getContext().Idents.get(".cxx_destruct");
+ const IdentifierInfo *II = &getContext().Idents.get(".cxx_destruct");
Selector cxxSelector = getContext().Selectors.getSelector(0, &II);
ObjCMethodDecl *DTORMethod = ObjCMethodDecl::Create(
getContext(), D->getLocation(), D->getLocation(), cxxSelector,
@@ -6646,7 +6646,7 @@ void CodeGenModule::EmitObjCIvarInitializations(ObjCImplementationDecl *D) {
AllTrivialInitializers(*this, D))
return;
- IdentifierInfo *II = &getContext().Idents.get(".cxx_construct");
+ const IdentifierInfo *II = &getContext().Idents.get(".cxx_construct");
Selector cxxSelector = getContext().Selectors.getSelector(0, &II);
// The constructor returns 'self'.
ObjCMethodDecl *CTORMethod = ObjCMethodDecl::Create(
@@ -7214,7 +7214,7 @@ void CodeGenModule::EmitStaticExternCAliases() {
if (!getTargetCodeGenInfo().shouldEmitStaticExternCAliases())
return;
for (auto &I : StaticExternCValues) {
- IdentifierInfo *Name = I.first;
+ const IdentifierInfo *Name = I.first;
llvm::GlobalValue *Val = I.second;
// If Val is null, that implies there were multiple declarations that each