Skip to content

Commit ea7efc9

Browse files
committed
Clean up all LOGICAL, TRUE, and FALSE usage in flang2
At the same time this will turn new usage of those into syntax errors.
1 parent 510f948 commit ea7efc9

File tree

23 files changed

+948
-948
lines changed

23 files changed

+948
-948
lines changed
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,53 +18,53 @@
1818
/* flgdf.h - data definitions for FTN compiler flags */
1919

2020
FLG flg = {
21-
FALSE, /* asm = -noasm */
22-
FALSE, /* list = -nolist */
23-
TRUE, /* object = -object */
24-
FALSE, /* xref = -show noxref */
25-
FALSE, /* code = -show nocode */
26-
FALSE, /* include = -show noinclude */
21+
false, /* asm = -noasm */
22+
false, /* list = -nolist */
23+
true, /* object = -object */
24+
false, /* xref = -show noxref */
25+
false, /* code = -show nocode */
26+
false, /* include = -show noinclude */
2727
0, /* debug = -nodebug */
2828
1, /* opt = -opt 1 */
29-
TRUE, /* depchk = -depchk on */
30-
FALSE, /* depwarn = -depchk warn */
31-
FALSE, /* dclchk = -nodclchk */
32-
FALSE, /* locchk = -nolocchk */
33-
FALSE, /* onetrip = -noonetrip */
34-
FALSE, /* save = -nosave */
29+
true, /* depchk = -depchk on */
30+
false, /* depwarn = -depchk warn */
31+
false, /* dclchk = -nodclchk */
32+
false, /* locchk = -nolocchk */
33+
false, /* onetrip = -noonetrip */
34+
false, /* save = -nosave */
3535
1, /* inform = -inform informational */
3636
0xFFFFFFFF, /* xoff */
3737
0x00000000, /* xon */
38-
FALSE, /* ucase = -noucase */
38+
false, /* ucase = -noucase */
3939
NULL, /* idir == empty list */
40-
FALSE, /* dlines = -nodlines */
40+
false, /* dlines = -nodlines */
4141
72, /* extend_source = -noextend_source */
42-
TRUE, /* i4 = -i4 */
43-
FALSE, /* line = -noline */
44-
FALSE, /* symbol = -nosymbol */
42+
true, /* i4 = -i4 */
43+
false, /* line = -noline */
44+
false, /* symbol = -nosymbol */
4545
0, /* profile = no profiling */
46-
FALSE, /* standard = don't flag non-F77 uses */
46+
false, /* standard = don't flag non-F77 uses */
4747
{0}, /* dbg[] */
48-
TRUE, /* align doubles on doubleword boundary */
48+
true, /* align doubles on doubleword boundary */
4949
0, /* astype - assembler syntax - 0-elf, 1-coff */
50-
FALSE, /* recursive = -norecursive */
50+
false, /* recursive = -norecursive */
5151
0, /* ieee: 0 == none: num == bit value for
5252
item (fdiv==1,ddiv==2) */
5353
0, /* inline: 0 == none: num == max # ilms */
5454
0, /* autoinline */
5555
0, /* vect: 0 = none: num == vect item */
5656
0, /* little endian */
57-
FALSE, /* not terse for summary, etc. */
57+
false, /* not terse for summary, etc. */
5858
'_', /* default is to change '$' to '_' */
5959
{0}, /* x flags */
60-
FALSE, /* don't quad align "unconstrained objects";
60+
false, /* don't quad align "unconstrained objects";
6161
use natural alignment */
62-
FALSE, /* anno - don't annotate asm file */
63-
FALSE, /* qa = -noqa */
64-
FALSE, /* es = -noes */
65-
FALSE, /* p = preprocessor does not emit # lines in its output */
62+
false, /* anno - don't annotate asm file */
63+
false, /* qa = -noqa */
64+
false, /* es = -noes */
65+
false, /* p = preprocessor does not emit # lines in its output */
6666
0, /* def ptr */
6767
NULL, /* search the standard include */
68-
FALSE, /* don't allow smp directives */
68+
false, /* don't allow smp directives */
6969
25, /* errorlimit */
7070
};

tools/flang2/flang2exe/aarch64-Linux/ll_abi.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,19 @@ classify_int(DTYPE dtype)
150150
}
151151

152152
/* Classify common to args and return values. */
153-
static LOGICAL
153+
static bool
154154
classify_common(LL_ABI_Info *abi, LL_ABI_ArgInfo *arg, DTYPE dtype)
155155
{
156156
if (DT_ISINT(dtype)) {
157157
arg->kind = classify_int(dtype);
158-
return TRUE;
158+
return true;
159159
}
160160

161161
/* Basic types can be returned in registers directly. Complex types also
162162
* get handled correctly. */
163163
if (dtype == DT_VOIDNONE || DT_ISSCALAR(dtype)) {
164164
arg->kind = LL_ARG_DIRECT;
165-
return TRUE;
165+
return true;
166166
}
167167

168168
/* Check for VFP arguments, but not for varargs calls. */
@@ -171,11 +171,11 @@ classify_common(LL_ABI_Info *abi, LL_ABI_ArgInfo *arg, DTYPE dtype)
171171
if (haggr) {
172172
arg->kind = LL_ARG_COERCE;
173173
arg->type = haggr;
174-
return TRUE;
174+
return true;
175175
}
176176
}
177177

178-
return FALSE;
178+
return false;
179179
}
180180

181181
void

0 commit comments

Comments
 (0)