Skip to content

Commit 51cd5f1

Browse files
tempdragonantoyo
andauthored
fix(code fmt): Apply style suggestions from code review
Co-authored-by: antoyo <[email protected]>
1 parent 09fd908 commit 51cd5f1

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ impl<'gcc, 'tcx> BackendTypes for CodegenCx<'gcc, 'tcx> {
345345
type Funclet = (); // TODO(antoyo)
346346

347347
type DIScope = (); // TODO(antoyo)
348-
type DILocation = Location<'gcc>; // TODO(antoyo)
348+
type DILocation = Location<'gcc>;
349349
type DIVariable = (); // TODO(antoyo)
350350
}
351351

src/debuginfo.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'a, 'gcc, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'gcc, 'tcx> {
3131
_indirect_offsets: &[Size],
3232
_fragment: Option<Range<Size>>,
3333
) {
34-
// Not sure if this is correct, probably wrong but still keep it here.
34+
// FIXME(tempdragon): Not sure if this is correct, probably wrong but still keep it here.
3535
#[cfg(feature = "master")]
3636
variable_alloca.set_location(dbg_loc);
3737
}
@@ -40,11 +40,10 @@ impl<'a, 'gcc, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'gcc, 'tcx> {
4040
// TODO(antoyo): insert reference to gdb debug scripts section global.
4141
}
4242

43-
/// Currently, this function is not yet implemented. It seems that the
43+
/// FIXME(tempdragon): Currently, this function is not yet implemented. It seems that the
4444
/// debug name and the mangled name should both be included in the LValues.
4545
/// Besides, a function to get the rvalue type(m_is_lvalue) should also be included.
4646
fn set_var_name(&mut self, _value: RValue<'gcc>, _name: &str) {
47-
//unimplemented!();
4847
}
4948

5049
fn set_dbg_loc(&mut self, dbg_loc: Self::DILocation) {
@@ -213,7 +212,7 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
213212
_scope_metadata: Self::DIScope,
214213
_file: &SourceFile,
215214
) -> Self::DIScope {
216-
//unimplemented!();
215+
// TODO(antoyo): implement.
217216
}
218217

219218
fn debuginfo_finalize(&self) {
@@ -238,7 +237,7 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
238237
_fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
239238
_maybe_definition_llfn: Option<RValue<'gcc>>,
240239
) -> Self::DIScope {
241-
//unimplemented!();
240+
// TODO(antoyo): implement.
242241
}
243242

244243
fn dbg_loc(
@@ -247,7 +246,6 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
247246
_inlined_at: Option<Self::DILocation>,
248247
span: Span,
249248
) -> Self::DILocation {
250-
//unimplemented!();
251249
let pos = span.lo();
252250
let (file, line, col) = self.lookup_debug_loc(pos);
253251
let loc = match &file.name {
@@ -256,7 +254,7 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
256254
if let Some(name) = name.to_str() {
257255
self.context
258256
.new_location(name, line as i32, col as i32)
259-
}else{
257+
} else{
260258
Location::null()
261259
}
262260
}
@@ -273,7 +271,7 @@ impl<'gcc, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
273271
} else {
274272
Location::null()
275273
}
276-
}else{
274+
} else{
277275
Location::null()
278276
},
279277
},

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl CodegenBackend for GccCodegenBackend {
175175
crate::DEFAULT_LOCALE_RESOURCE
176176
}
177177

178-
fn init(&self, sess: &Session) {
178+
fn init(&self, sess: &Session) {
179179
#[cfg(feature="master")]
180180
{
181181
let target_cpu = target_cpu(sess);

0 commit comments

Comments
 (0)