Skip to content

Commit 493ed9c

Browse files
author
Martin Mory
committed
optimize LLVMZeroValue::isLLVMZeroValue() according to Fabian's suggestion in GitHub
1 parent d1ef223 commit 493ed9c

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/LLVMZeroValue.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ class LLVMZeroValue : public llvm::GlobalVariable {
6969
}
7070

7171
static bool isLLVMZeroValue(const llvm::Value *V) {
72-
if (V && V->hasName()) {
73-
// checks if V's name start with "zero_value"
74-
return V->getName().find(LLVMZeroValueInternalName) !=
75-
llvm::StringRef::npos;
76-
}
77-
return false;
72+
return V == getInstance();
7873
}
7974

8075
// Do not specify a destructor (at all)!

0 commit comments

Comments
 (0)