Use Symbol for codegen unit names.

This is a straightforward replacement except for two places where we
have to convert to `LocalInternedString` to get a stable sort.
This commit is contained in:
Nicholas Nethercote 2019-10-21 17:14:03 +11:00
parent dddacf1eb3
commit 2da7a9c0d9
11 changed files with 46 additions and 51 deletions

View file

@ -36,7 +36,7 @@ use rustc_codegen_ssa::back::write::submit_codegened_module_to_llvm;
use std::ffi::CString;
use std::time::Instant;
use syntax_pos::symbol::InternedString;
use syntax_pos::symbol::Symbol;
use rustc::hir::CodegenFnAttrs;
use crate::value::Value;
@ -105,7 +105,7 @@ pub fn iter_globals(llmod: &'ll llvm::Module) -> ValueIter<'ll> {
pub fn compile_codegen_unit(
tcx: TyCtxt<'tcx>,
cgu_name: InternedString,
cgu_name: Symbol,
tx_to_llvm_workers: &std::sync::mpsc::Sender<Box<dyn std::any::Any + Send>>,
) {
let prof_timer = tcx.prof.generic_activity("codegen_module");
@ -131,7 +131,7 @@ pub fn compile_codegen_unit(
fn module_codegen(
tcx: TyCtxt<'_>,
cgu_name: InternedString,
cgu_name: Symbol,
) -> ModuleCodegen<ModuleLlvm> {
let cgu = tcx.codegen_unit(cgu_name);
// Instantiate monomorphizations without filling out definitions yet...