diff options
author | Lukas Zaoral <lzaoral@redhat.com> | 2020-09-10 17:59:33 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-12-04 20:35:47 +0000 |
commit | 8b4060b226ace6dcdd01f481911977d28f6d32c0 (patch) | |
tree | 8e815988a31b435f93454cd8478d6b53b76bc8aa | |
parent | ebcadf8c7a25c4580166175550bdc21c495682fe (diff) | |
download | klee-8b4060b226ace6dcdd01f481911977d28f6d32c0.tar.gz |
llvm11: GlobalValue::getAlignment has been removed
See: https://reviews.llvm.org/D80368
-rw-r--r-- | lib/Core/Executor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<GlobalValue>(allocSite)) { - alignment = GV->getAlignment(); - if (const GlobalVariable *globalVar = dyn_cast<GlobalVariable>(GV)) { + if (const GlobalObject *GO = dyn_cast<GlobalObject>(allocSite)) { + alignment = GO->getAlignment(); + if (const GlobalVariable *globalVar = dyn_cast<GlobalVariable>(GO)) { // All GlobalVariables's have pointer type llvm::PointerType *ptrType = dyn_cast<llvm::PointerType>(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<AllocaInst>(allocSite)) { alignment = AI->getAlignment(); |