diff options
author | Tim Northover <tnorthover@apple.com> | 2019-07-11 13:13:02 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2019-07-11 13:13:02 +0000 |
commit | 67828edbbd6f7b63149056b37d7ece10691d23ae (patch) | |
tree | 4909a8924a8709c60aa59d8095fcac4f34e6e049 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | f2d6597653e56abfa2971c389dd9f2e469767b46 (diff) | |
download | bcm5719-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.cpp | 4 |
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. |