From 8b4060b226ace6dcdd01f481911977d28f6d32c0 Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Thu, 10 Sep 2020 17:59:33 +0200 Subject: llvm11: GlobalValue::getAlignment has been removed See: https://reviews.llvm.org/D80368 --- lib/Core/Executor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Core') diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index fac36b71..0603d148 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -4525,16 +4525,16 @@ size_t Executor::getAllocationAlignment(const llvm::Value *allocSite) const { size_t alignment = 0; llvm::Type *type = NULL; std::string allocationSiteName(allocSite->getName().str()); - if (const GlobalValue *GV = dyn_cast(allocSite)) { - alignment = GV->getAlignment(); - if (const GlobalVariable *globalVar = dyn_cast(GV)) { + if (const GlobalObject *GO = dyn_cast(allocSite)) { + alignment = GO->getAlignment(); + if (const GlobalVariable *globalVar = dyn_cast(GO)) { // All GlobalVariables's have pointer type llvm::PointerType *ptrType = dyn_cast(globalVar->getType()); assert(ptrType && "globalVar's type is not a pointer"); type = ptrType->getElementType(); } else { - type = GV->getType(); + type = GO->getType(); } } else if (const AllocaInst *AI = dyn_cast(allocSite)) { alignment = AI->getAlignment(); -- cgit 1.4.1