rust/src/rustllvm
Corey Farwell d9426210b1 Register LLVM passes with the correct LLVM pass manager.
LLVM was upgraded to a new version in this commit:

f9d4149c29

which was part of this pull request:

https://github.com/rust-lang/rust/issues/26025

Consider the following two lines from that commit:

f9d4149c29 (diff-a3b24dbe2ea7c1981f9ac79f9745f40aL462)

f9d4149c29 (diff-a3b24dbe2ea7c1981f9ac79f9745f40aL469)

The purpose of these lines is to register LLVM passes. Prior to the that
commit, the passes being handled were assumed to be ModulePasses (a
specific type of LLVM pass) since they were being added to a ModulePass
manager. After that commit, both lines were refactored (presumably in an
attempt to DRY out the code), but the ModulePasses were changed to be
registered to a FunctionPass manager. This change resulted in
ModulePasses being run, but a Function object was being passed as a
parameter to the pass instead of a Module, which resulted in
segmentation faults.

In this commit, I changed relevant sections of the code to check the
type of the passes being added and register them to the appropriate pass
manager.

Closes https://github.com/rust-lang/rust/issues/31067
2016-01-25 00:15:39 -05:00
..
ArchiveWrapper.cpp rustllvm: Update to LLVM trunk 2015-10-24 18:42:23 +09:00
ExecutionEngineWrapper.cpp Remove morestack support 2015-08-10 16:35:44 -07:00
llvm-auto-clean-trigger Disable the null check elimination pass 2015-12-02 18:19:10 +01:00
PassWrapper.cpp Register LLVM passes with the correct LLVM pass manager. 2016-01-25 00:15:39 -05:00
README add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
rustllvm.h rustc: Update LLVM 2015-06-16 22:56:42 -07:00
RustWrapper.cpp rustllvm: Update to LLVM trunk 2015-10-24 18:42:23 +09:00

This directory currently contains some LLVM support code. This will generally
be sent upstream to LLVM in time; for now it lives here.