Skip to content

Commit f000aeb

Browse files
committed
insert check for GEPOperator, as in the header
1 parent 214ef54 commit f000aeb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/PhasarLLVM/Utils/Annotation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ llvm::StringRef GlobalAnnotation::retrieveString(unsigned Idx) const {
110110
const auto *AnnotationGepOp = AnnotationStruct->getOperand(Idx);
111111
if (const auto *ConstExpr =
112112
llvm::dyn_cast<llvm::ConstantExpr>(AnnotationGepOp)) {
113-
if (true // ConstExpr->isGEPWithNoNotionalOverIndexing()
114-
) {
113+
if (llvm::isa<llvm::GEPOperator>(ConstExpr)) {
115114
if (const auto *GlobalVar =
116115
llvm::dyn_cast<llvm::GlobalVariable>(ConstExpr->getOperand(0))) {
117116
if (GlobalVar->hasInitializer()) {

0 commit comments

Comments
 (0)