{"push_id":948237613,"size":1,"distinct_size":1,"ref":"refs/heads/incorrect-pass-kind","head":"d9426210b197cb0be1db9838342349f38db135e3","before":"b0fb17a924575fa249e37645994922aac970ced0","commits":[{"sha":"d9426210b197cb0be1db9838342349f38db135e3","author":{"email":"16aea3ed30350b1f4b4dfc1111a05a38e3d681b3@rwell.org","name":"Corey Farwell"},"message":"Register LLVM passes with the correct LLVM pass manager.\n\nLLVM was upgraded to a new version in this commit:\n\nhttps://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf\n\nwhich was part of this pull request:\n\nhttps://github.com/rust-lang/rust/issues/26025\n\nConsider the following two lines from that commit:\n\nhttps://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL462\n\nhttps://github.com/rust-lang/rust/commit/f9d4149c29e8b989fa3624993be379f380e48dcf#diff-a3b24dbe2ea7c1981f9ac79f9745f40aL469\n\nThe purpose of these lines is to register LLVM passes. Prior to the that\ncommit, the passes being handled were assumed to be ModulePasses (a\nspecific type of LLVM pass) since they were being added to a ModulePass\nmanager. After that commit, both lines were refactored (presumably in an\nattempt to DRY out the code), but the ModulePasses were changed to be\nregistered to a FunctionPass manager. This change resulted in\nModulePasses being run, but a Function object was being passed as a\nparameter to the pass instead of a Module, which resulted in\nsegmentation faults.\n\nIn this commit, I changed relevant sections of the code to check the\ntype of the passes being added and register them to the appropriate pass\nmanager.\n\nCloses https://github.com/rust-lang/rust/issues/31067","distinct":true,"url":"https://api.github.com/repos/frewsxcv/rust/commits/d9426210b197cb0be1db9838342349f38db135e3"}]}