CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal)

Hello the list,

Is there a reason why this function exists?

CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal);

Aside from the confusing and misleading name (it emits an Objective-C string, in case you couldn't guess that from the name), it seems to be a layering violation since it's in CodeGenModule but implements behaviour specific to the Mac Objective-C runtimes (and isn't actually called anywhere outside CGObjCMac.cpp).

David

Definitely seems like something to move to CGObjCMac.cpp.

John.

Hello the list,

Is there a reason why this function exists?

CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal);

Yes, it belongs to CGObjCMac.cpp. But in practice, it calls on routines local to CodeGenModule.cpp, which makes it more than
a move across refactoring.

- Fariborz