Skip to content

Commit cc99bdd

Browse files
committed
AMDGPU: Avoid using hardcoded address space number
1 parent 1a1de24 commit cc99bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static void createInitOrFiniCalls(Function &F, bool IsCtor) {
8787
/*Initializer=*/nullptr,
8888
IsCtor ? "__init_array_start" : "__fini_array_start",
8989
/*InsertBefore=*/nullptr, GlobalVariable::NotThreadLocal,
90-
/*AddressSpace=*/1);
90+
/*AddressSpace=*/AMDGPUAS::GLOBAL_ADDRESS);
9191
});
9292
auto *End = M.getOrInsertGlobal(
9393
IsCtor ? "__init_array_end" : "__fini_array_end",
@@ -98,7 +98,7 @@ static void createInitOrFiniCalls(Function &F, bool IsCtor) {
9898
/*Initializer=*/nullptr,
9999
IsCtor ? "__init_array_end" : "__fini_array_end",
100100
/*InsertBefore=*/nullptr, GlobalVariable::NotThreadLocal,
101-
/*AddressSpace=*/1);
101+
/*AddressSpace=*/AMDGPUAS::GLOBAL_ADDRESS);
102102
});
103103

104104
// The constructor type is suppoed to allow using the argument vectors, but

0 commit comments

Comments
 (0)