Skip to content

Commit

Permalink
[clang][CodeGenModule] remove declaration of GetAddrOfConstantString
Browse files Browse the repository at this point in the history
It looks like the definition was removed in cd21d54 but the
declaration was not.  Surprisingly (to me), that doesn't seem to produce
any kind of diagnostic.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D156182
  • Loading branch information
nickdesaulniers committed Jul 25, 2023
1 parent 15a484b commit ef103ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/CodeGen/ConstantInitBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CodeGenModule;
/// for (auto &widget : widgets) {
/// auto widgetDesc = widgetArray.beginStruct();
/// widgetDesc.addInt(CGM.SizeTy, widget.getPower());
/// widgetDesc.add(CGM.GetAddrOfConstantString(widget.getName()));
/// widgetDesc.add(CGM.GetAddrOfConstantStringFromLiteral(widget.getName()));
/// widgetDesc.add(CGM.GetAddrOfGlobal(widget.getInitializerDecl()));
/// widgetDesc.finishAndAddTo(widgetArray);
/// }
Expand Down
5 changes: 0 additions & 5 deletions clang/lib/CodeGen/CodeGenModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -1019,11 +1019,6 @@ class CodeGenModule : public CodeGenTypeCache {
/// Return a pointer to a constant CFString object for the given string.
ConstantAddress GetAddrOfConstantCFString(const StringLiteral *Literal);

/// Return a pointer to a constant NSString object for the given string. Or a
/// user defined String object as defined via
/// -fconstant-string-class=class_name option.
ConstantAddress GetAddrOfConstantString(const StringLiteral *Literal);

/// Return a constant array for the given string.
llvm::Constant *GetConstantArrayFromStringLiteral(const StringLiteral *E);

Expand Down

0 comments on commit ef103ad

Please sign in to comment.