summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2019-07-11 13:13:02 +0000
committerTim Northover <tnorthover@apple.com>2019-07-11 13:13:02 +0000
commit67828edbbd6f7b63149056b37d7ece10691d23ae (patch)
tree4909a8924a8709c60aa59d8095fcac4f34e6e049 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parentf2d6597653e56abfa2971c389dd9f2e469767b46 (diff)
downloadbcm5719-llvm-67828edbbd6f7b63149056b37d7ece10691d23ae.tar.gz
bcm5719-llvm-67828edbbd6f7b63149056b37d7ece10691d23ae.zip
OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC.
llvm-svn: 365770
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 9a2e0f58dad..174a9bcfd9b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -495,7 +495,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GV, TM);
const DataLayout &DL = GV->getParent()->getDataLayout();
- uint64_t Size = DL.getTypeAllocSize(GV->getType()->getElementType());
+ uint64_t Size = DL.getTypeAllocSize(GV->getValueType());
// If the alignment is specified, we *must* obey it. Overaligning a global
// with a specified alignment is a prompt way to break globals emitted to
@@ -1300,7 +1300,7 @@ void AsmPrinter::emitGlobalIndirectSymbol(Module &M,
else
assert(GIS.hasLocalLinkage() && "Invalid alias or ifunc linkage");
- bool IsFunction = GIS.getType()->getPointerElementType()->isFunctionTy();
+ bool IsFunction = GIS.getValueType()->isFunctionTy();
// Treat bitcasts of functions as functions also. This is important at least
// on WebAssembly where object and function addresses can't alias each other.
OpenPOWER on IntegriCloud