1
Fork 0

Clean up LLVM module naming (just use CodegenUnit names).

This commit is contained in:
Michael Woerister 2018-07-10 19:43:58 +02:00
parent 2c5cd9ce53
commit f6894ebe66
6 changed files with 39 additions and 69 deletions

View file

@ -214,8 +214,7 @@ pub unsafe fn create_context_and_module(sess: &Session, mod_name: &str) -> (Cont
impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
pub fn new(tcx: TyCtxt<'a, 'tcx, 'tcx>,
codegen_unit: Arc<CodegenUnit<'tcx>>,
llmod_id: &str)
codegen_unit: Arc<CodegenUnit<'tcx>>)
-> CodegenCx<'a, 'tcx> {
// An interesting part of Windows which MSVC forces our hand on (and
// apparently MinGW didn't) is the usage of `dllimport` and `dllexport`
@ -268,7 +267,7 @@ impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
unsafe {
let (llcx, llmod) = create_context_and_module(&tcx.sess,
&llmod_id[..]);
&codegen_unit.name().as_str());
let dbg_cx = if tcx.sess.opts.debuginfo != NoDebugInfo {
let dctx = debuginfo::CrateDebugContext::new(llmod);