Skip to content

Commit ef103ad

Browse files
[clang][CodeGenModule] remove declaration of GetAddrOfConstantString
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
1 parent 15a484b commit ef103ad

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

clang/include/clang/CodeGen/ConstantInitBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class CodeGenModule;
4141
/// for (auto &widget : widgets) {
4242
/// auto widgetDesc = widgetArray.beginStruct();
4343
/// widgetDesc.addInt(CGM.SizeTy, widget.getPower());
44-
/// widgetDesc.add(CGM.GetAddrOfConstantString(widget.getName()));
44+
/// widgetDesc.add(CGM.GetAddrOfConstantStringFromLiteral(widget.getName()));
4545
/// widgetDesc.add(CGM.GetAddrOfGlobal(widget.getInitializerDecl()));
4646
/// widgetDesc.finishAndAddTo(widgetArray);
4747
/// }

clang/lib/CodeGen/CodeGenModule.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,11 +1019,6 @@ class CodeGenModule : public CodeGenTypeCache {
10191019
/// Return a pointer to a constant CFString object for the given string.
10201020
ConstantAddress GetAddrOfConstantCFString(const StringLiteral *Literal);
10211021

1022-
/// Return a pointer to a constant NSString object for the given string. Or a
1023-
/// user defined String object as defined via
1024-
/// -fconstant-string-class=class_name option.
1025-
ConstantAddress GetAddrOfConstantString(const StringLiteral *Literal);
1026-
10271022
/// Return a constant array for the given string.
10281023
llvm::Constant *GetConstantArrayFromStringLiteral(const StringLiteral *E);
10291024

0 commit comments

Comments
 (0)