aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2020-05-18 20:38:13 -0700
committerEli Friedman <efriedma@quicinc.com>2020-06-23 19:13:42 -0700
commita2caa3b61497b6be8c8b77823d0fd62b4be1f177 (patch)
tree9da9e17f80ffd8bb60a06eb2d7932c8a91611932 /llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
parentf8bd6a75edac7560deb5fdcb31041b454dd9d7e0 (diff)
downloadllvm-a2caa3b61497b6be8c8b77823d0fd62b4be1f177.zip
llvm-a2caa3b61497b6be8c8b77823d0fd62b4be1f177.tar.gz
llvm-a2caa3b61497b6be8c8b77823d0fd62b4be1f177.tar.bz2
Remove GlobalValue::getAlignment().
This function is deceptive at best: it doesn't return what you'd expect. If you have an arbitrary GlobalValue and you want to determine the alignment of that pointer, Value::getPointerAlignment() returns the correct value. If you want the actual declared alignment of a function or variable, GlobalObject::getAlignment() returns that. This patch switches all the users of GlobalValue::getAlignment to an appropriate alternative. Differential Revision: https://reviews.llvm.org/D80368
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
index 2c3619b..4c82d05 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
@@ -38,7 +38,7 @@ AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
}
unsigned AMDGPUMachineFunction::allocateLDSGlobal(const DataLayout &DL,
- const GlobalValue &GV) {
+ const GlobalVariable &GV) {
auto Entry = LocalMemoryObjects.insert(std::make_pair(&GV, 0));
if (!Entry.second)
return Entry.first->second;