Skip to content

Commit

Permalink
Put constructed name for gobal constant segment in its global variable.
Browse files Browse the repository at this point in the history
The global constant segment comes from the front end with no name,
in the declare_segment operator.

M3CG_LLVM was already concocting a name for it ("M_Const"), but
not storing it in the variable for the segment, leading to a NIL
segfault later, when handling the end_init operator, in DebugGlobals,
while calling M3DIB.DIBcreateGlobalVariable.
  • Loading branch information
RodneyBates committed Nov 9, 2015
1 parent 1167a8a commit 1052a2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions m3-sys/llvm3.6.1/src/M3CG_LLVM.m3
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,7 @@ PROCEDURE declare_segment (self: U; n: Name; m3t: TypeUID; is_const: BOOLEAN):
IF is_const THEN
(* the name will be nil so create a const name *)
segName := "M_Const";
v.name := M3ID.Add(segName);
(* keep the value for globals debugging *)
self.segConst := v;
ELSE
Expand Down

0 comments on commit 1052a2e

Please sign in to comment.