Skip to content

Commit a2d5bc6

Browse files
committed
WE BUILD!
1 parent 0eaa3e2 commit a2d5bc6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

crates/rustc_codegen_nvvm/src/back.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::llvm::{self, TargetMachine};
1+
use crate::llvm::{self, TargetMachine, MyTargetMachineError};
22
use crate::override_fns::define_or_override_fn;
33
use crate::{builder::Builder, context::CodegenCx, lto::ThinBuffer, LlvmMod, NvvmCodegenBackend};
44
use cstr::cstr;
@@ -33,7 +33,7 @@ use std::{
3333
pub fn llvm_err(handler: &Handler, msg: &str) -> FatalError {
3434
match llvm::last_error() {
3535
Some(err) => handler.fatal(format!("{}: {}", msg, err)),
36-
None => handler.fatal(msg),
36+
None => handler.fatal(msg.to_string()),
3737
}
3838
}
3939

@@ -122,8 +122,7 @@ pub fn target_machine_factory(
122122
)
123123
};
124124

125-
tm.ok_or_else(|| {
126-
format!(
125+
tm.ok_or_else(|| { format!(
127126
"Could not create LLVM TargetMachine for triple: {}",
128127
triple.to_str().unwrap()
129128
)

crates/rustc_codegen_nvvm/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
176176
}
177177

178178
pub(crate) fn fatal(&self, msg: &str) -> ! {
179-
self.tcx.sess.fatal(msg)
179+
self.tcx.sess.fatal(msg.to_string())
180180
}
181181

182182
// im lazy i know

crates/rustc_codegen_nvvm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl WriteBackendMethods for NvvmCodegenBackend {
175175
type TargetMachine = &'static mut llvm::TargetMachine;
176176
type ThinData = ();
177177
type ThinBuffer = ThinBuffer;
178-
type TargetMachineError = &'static mut llvm::MyTargetMachineError; // fix later
178+
type TargetMachineError = String; // fix later
179179

180180
fn run_link(
181181
_cgcx: &CodegenContext<Self>,

0 commit comments

Comments
 (0)