Closed Mohannadcse closed 11 months ago
Hi @Mohannadcse,
the LLVMAliasInfoRef
is a type-erased type that can be constructed from a pointer to any object that provides the required interface. LLVMAliasSet
is the most commonly used type that implements the AliasInfo
interface, so you can view an LLVMAliasInfoRef
as sth similar to a pointer-to-base for LLVMAliasSet
. The type-erased type is defined here.
Does this answer your question?
@fabianbs96 thanks for the clarification.
Bug description
Seems there is inconsistency in how to define the constructor
LLVMBasedICFG
. How implementation indicates 3 versions of the constructor. The most widely used one is the followingHowever, this constructor is defined differently in various locations. For example:
LLVMBasedICFGGlobCtorDtorTest.cpp
: it's defined as follows. The 5th argument isn't of the typeLLVMAliasInfoRef
, it's actually of the typeLLVMAliasSet
.LLVMBasedICFG ICFG(&IRDB, CallGraphAnalysisType::OTF, {"main"}, &TH, &PT, Soundness::Soundy, /IncludeGlobals/ true);
LLVMAliasSet PTS(&IRDB, false); LLVMTypeHierarchy TH(IRDB); LLVMBasedICFG ICF(&IRDB, CallGraphAnalysisType::OTF, {"main"}, &TH, &PTS);