mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
[InferAddressSpaces] Register pass. (#65639)
InferAddressSpaces failed to call its initialization function. It was still called through initializeScalarOpts in llc and opt, but it was skipped entirely in clang. When the initialization function is not called, this results in confusing behavior where the pass appears to run, but not entirely as it should, e.g. the pass is excluded from -print-before-all and -print-after-all.
This commit is contained in:
parent
4bba12f722
commit
04224d1ae7
@ -165,8 +165,12 @@ public:
|
||||
static char ID;
|
||||
|
||||
InferAddressSpaces()
|
||||
: FunctionPass(ID), FlatAddrSpace(UninitializedAddressSpace) {}
|
||||
InferAddressSpaces(unsigned AS) : FunctionPass(ID), FlatAddrSpace(AS) {}
|
||||
: FunctionPass(ID), FlatAddrSpace(UninitializedAddressSpace) {
|
||||
initializeInferAddressSpacesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
InferAddressSpaces(unsigned AS) : FunctionPass(ID), FlatAddrSpace(AS) {
|
||||
initializeInferAddressSpacesPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
AU.setPreservesCFG();
|
||||
|
Loading…
Reference in New Issue
Block a user