Skip to content

Commit ba39596

Browse files
committed
Rename tryEmitConstantHeapMetadataRef for consistency. NFC.
1 parent 9ecf7ee commit ba39596

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

lib/IRGen/GenCast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ FailableCastResult irgen::emitClassIdenticalCast(IRGenFunction &IGF,
103103
// TODO: use ObjC class references
104104
llvm::Value *targetMetadata;
105105
if (allowConservative &&
106-
(targetMetadata = tryEmitConstantHeapMetadataRef(IGF.IGM,
106+
(targetMetadata = tryEmitConstantTypeMetadataRef(IGF.IGM,
107107
toType.getSwiftRValueType()))) {
108108
// ok
109109
} else {

lib/IRGen/GenClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ namespace {
986986
fields.push_back(IGM.getAddrOfObjCClass(getClass(), NotForDefinition));
987987
else {
988988
auto type = getSelfType(getClass()).getSwiftRValueType();
989-
llvm::Constant *metadata = tryEmitConstantHeapMetadataRef(IGM, type);
989+
llvm::Constant *metadata = tryEmitConstantTypeMetadataRef(IGM, type);
990990
assert(metadata &&
991991
"extended objc class doesn't have constant metadata?");
992992
fields.push_back(metadata);

lib/IRGen/GenDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class CategoryInitializerVisitor
106106
class_addProtocol = IGM.getClassAddProtocolFn();
107107

108108
CanType origTy = ext->getDeclaredTypeOfContext()->getCanonicalType();
109-
classMetadata = tryEmitConstantHeapMetadataRef(IGM, origTy);
109+
classMetadata = tryEmitConstantTypeMetadataRef(IGM, origTy);
110110
assert(classMetadata &&
111111
"extended objc class doesn't have constant metadata?!");
112112
classMetadata = llvm::ConstantExpr::getBitCast(classMetadata,

lib/IRGen/GenMeta.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static bool hasMetadataPattern(IRGenModule &IGM, NominalTypeDecl *theDecl) {
206206

207207
/// Attempts to return a constant heap metadata reference for a
208208
/// nominal type.
209-
llvm::Constant *irgen::tryEmitConstantHeapMetadataRef(IRGenModule &IGM,
209+
llvm::Constant *irgen::tryEmitConstantTypeMetadataRef(IRGenModule &IGM,
210210
CanType type) {
211211
auto theDecl = type->getAnyNominal();
212212
assert(theDecl && "emitting constant metadata ref for non-nominal type?");
@@ -3029,7 +3029,7 @@ namespace {
30293029

30303030
bool addReferenceToType(CanType type) {
30313031
if (llvm::Constant *metadata
3032-
= tryEmitConstantHeapMetadataRef(IGM, type)) {
3032+
= tryEmitConstantTypeMetadataRef(IGM, type)) {
30333033
addWord(metadata);
30343034
return true;
30353035
} else {

lib/IRGen/GenMeta.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace irgen {
7676
/// Emit a reference to a compile-time constant piece of type metadata, or
7777
/// return a null pointer if the type's metadata cannot be represented by a
7878
/// constant.
79-
llvm::Constant *tryEmitConstantHeapMetadataRef(IRGenModule &IGM,
79+
llvm::Constant *tryEmitConstantTypeMetadataRef(IRGenModule &IGM,
8080
CanType type);
8181

8282
enum class MetadataValueType { ObjCClass, TypeMetadata };

0 commit comments

Comments
 (0)