Repository navigation
Expand file tree
/
Copy pathhost_envir.h
More file actions
4386 lines (3892 loc) · 170 KB
/
Copy pathhost_envir.h
File metadata and controls
4386 lines (3892 loc) · 170 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Part of the EDG Compiler Project, under the Apache License v2.0 with LLVM
Exceptions.
See https://edgcpp.org/LICENSE.txt for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
/*
host_envir.h -- Declarations relating to host_envir.c (having to do with
the host environment, operating system, and file names).
*/
/* Avoid including these declarations more than once: */
#ifndef HOST_ENVIR_H
#define HOST_ENVIR_H 1
/* Include lang_feat.h to get the definition of
MICROSOFT_EXTENSIONS_ALLOWED. */
#ifndef LANG_FEAT_H
#include "lang_feat.h"
#endif /* ifndef lang_feat.h */
#include <locale.h>
/* Conditionally open the "edg" namespace. */
BEGIN_EDG_NAMESPACE
#if defined(EDG_REDEFINE_NULL)
/*
GCC #defines NULL as __null, which allows it to distinguish the null pointer
constant "intention" even in modes that don't support nullptr. Unfortunately,
gdb appears not to know about __null (or nullptr), which makes macros that
use NULL unusable from within gdb. If EDG_REDEFINE_NULL is defined, we
redefine NULL to simply be 0, which improves the experience in gdb.
*/
#undef NULL
typedef decltype(nullptr) nullptr_type;
#define NULL 0
#endif /* defined(EDG_REDEFINE_NULL) */
/*
The front end provides two mutually-exclusive macros that provide strong hints
to the host compiler to inline the given function.
The first macro is EXPAND. This macro is intended to be applied to functions
that are force-inlined primarily for improving debugging. This macro is
enabled if USE_INLINE_EXPANSION is TRUE (defaults to TRUE only in non-DEBUG
builds).
The second macro is INLINE. This macro is intended to be applied to functions
that are force-inlined primarily for improved performance. This macro is
enabled if USE_INLINING_HINTS is TRUE (defaults to TRUE only in non-DEBUG
builds).
Both macros when not enabled only expand to an inline specifier.
Consider the following use cases when employing these macros:
- A developer that wishes for maximum source fidelity in their debugger may set
USE_INLINE_EXPANSION to FALSE and USE_INLINING_HINTS to FALSE. This
preserves all functions and function calls. This is the default when DEBUG
is TRUE.
- A developer that wishes to step into fewer small functions during debugging
may set USE_INLINE_EXPANSION to TRUE and USE_INLINING_HINTS to FALSE. This
allows them to step into fewer function calls but does not result in call
stack bloat (from inlined variables in callees that are not being optimized
away).
- An organization that wishes to produce a simple optimized build may add -O3
to their GCC build and set USE_INLINE_EXPANSION and USE_INLINING_HINTS to
TRUE for a reasonably-good optimization. This is the default when DEBUG
is FALSE.
- An organization that wishes to produce an advanced optimized build may add
-O3 and -fprofile-generate to their GCC build. They then run a number of use
cases that represent their common workload to generate profile information.
Finally they use the profile information in a final build with -O3
-fprofile-use. This organization should set USE_INLINE_EXPANSION and
USE_INLINING_HINTS to FALSE as profile guided optimization can make better
decisions than manual annotation.
*/
#ifndef USE_INLINE_EXPANSION
#if DEBUG
#define USE_INLINE_EXPANSION FALSE
#else /* !DEBUG */
#define USE_INLINE_EXPANSION TRUE
#endif /* DEBUG */
#endif /* ifndef USE_INLINE_EXPANSION */
#ifndef USE_INLINING_HINTS
#if DEBUG
#define USE_INLINING_HINTS FALSE
#else /* !DEBUG */
#define USE_INLINING_HINTS TRUE
#endif /* DEBUG */
#endif /* ifndef USE_INLINING_HINTS */
#ifndef EXPAND
#if USE_INLINE_EXPANSION
#if defined(__GNUC__)
#define EXPAND __attribute((always_inline)) inline
#else /* !defined(__GNUC__) */
#if defined(__MSC__)
#define EXPAND __forceinline
#else /* !defined(__MSC__) */
#define EXPAND inline
#endif /* defined(__MSC__) */
#endif /* defined(__GNUC__) */
#else /* !USE_INLINE_EXPANSION */
#define EXPAND inline
#endif /* USE_INLINE_EXPANSION */
#endif /* ifndef EXPAND */
#ifndef INLINE
#if USE_INLINING_HINTS
#if defined(__GNUC__)
#define INLINE __attribute((always_inline)) inline
#else /* !defined(__GNUC__) */
#if defined(__MSC__)
#define INLINE __forceinline
#else /* !defined(__MSC__) */
#define INLINE inline
#endif /* defined(__MSC__) */
#endif /* defined(__GNUC__) */
#else /* !USE_INLINING_HINTS */
#define INLINE inline
#endif /* USE_INLINING_HINTS */
#endif /* ifndef INLINE */
/* Forward declaration of a_text_buffer_ptr. */
typedef struct a_text_buffer *a_text_buffer_ptr;
/*
A sequence number is assigned to each token fetched from the input.
This is the type used to represent the sequence number. Consecutive
tokens do not necessarily have consecutive sequence numbers; currently,
most tokens have even sequence numbers (and in the rare case of a token
being split, the second token of the split then uses an odd number).
*/
typedef uint32_t a_token_sequence_number;
/*
Vertical tab character.
*/
#if USING_ISO_C
#define VERTICAL_TAB_CHARACTER '\v'
#else /* !USING_ISO_C */
/* K&R C doesn't recognize \v. */
#ifndef VERTICAL_TAB_CHARACTER
#define VERTICAL_TAB_CHARACTER '\013'
#endif /* ifndef VERTICAL_TAB_CHARACTER */
#endif /* USING_ISO_C */
/*
Flag used to retain compatibility with a certain driver interface.
This is primarily used to control the files that are created to pass
information between the front end, driver, and prelinker. The value is
the version number of the EDG C++ front end, e.g., 237 for version 2.37, for
which compatibility should be maintained. Driver interface changes
made after that version will be suppressed. Of course, that may suppress
certain language features that cannot be implemented without the
corresponding driver changes. For example, features that use the template
information file cannot be used with driver versions prior to 2.37.
*/
#ifndef DRIVER_COMPATIBILITY_VERSION
#define DRIVER_COMPATIBILITY_VERSION 9999
#endif /* ifndef DRIVER_COMPATIBILITY_VERSION */
/*
Return codes to be used when the highest error severity is as given:
*/
#if __VMS__
#define RC_NORMAL 0x18000001
#define RC_WARNING 0x18000000
#define RC_ERROR 0x18000002
#define RC_CATASTROPHE 0x18000004
#else /* !__VMS__ */
#define RC_NORMAL 0
#define RC_WARNING 0
#define RC_ERROR 2
#define RC_CATASTROPHE 4
#endif /* __VMS__ */
/*
If this switch is set, an internal error causes an exit instead of
an abort. When the front end is callable, this should be TRUE so that
an internal error will result in a return to the caller.
*/
#ifndef EXIT_ON_INTERNAL_ERROR
#if MAKE_FRONT_END_CALLABLE
#define EXIT_ON_INTERNAL_ERROR TRUE
#else /* !MAKE_FRONT_END_CALLABLE */
#define EXIT_ON_INTERNAL_ERROR FALSE
#endif /* MAKE_FRONT_END_CALLABLE */
#endif /* ifndef EXIT_ON_INTERNAL_ERROR */
/*
This may be set to FALSE to suppress the error context information for
catastrophic errors.
*/
#ifndef DEFAULT_DISPLAY_ERROR_CONTEXT_ON_CATASTROPHE
#define DEFAULT_DISPLAY_ERROR_CONTEXT_ON_CATASTROPHE TRUE
#endif /* DEFAULT_DISPLAY_ERROR_CONTEXT_ON_CATASTROPHE */
/*
If this flag is TRUE, the sigaction system call should be used to provide
additional information about the location at which a segmentation violation
occurred. The sigaction system call is only available on certain systems.
Furthermore, the handler invoked currently only works on 32-bit x86 Linux
system. This facility is intended to be used to provide additional
information for debugging purposes. To use this facility, this macro
should be defined in defines.h. In addition, defines.h may need to
define other macros in order for the signal.h header to provide the necessary
declarations. For example, in some modes _GNU_SOURCE and _XOPEN_SOURCE must
be defined.
*/
#ifndef USE_SIGACTION_FOR_SEGV_FAULT_INFO
#define USE_SIGACTION_FOR_SEGV_FAULT_INFO FALSE
#endif /* ifndef USE_SIGACTION_FOR_SEGV_FAULT_INFO */
/*
Size of allocation blocks (space is requested from malloc in blocks of
this size, and is then parceled out as needed). Should be fairly large
to reduce the work in remapping pointers in the non-alternate file
format. Unused pieces at the ends of regions are freed when the regions
are completed, so there's no waste. Larger blocks will be allocated if
needed (say, for incredibly large string literals formed by token
concatenation).
When USE_MMAP_FOR_MEMORY_REGIONS is TRUE, HOST_ALLOCATION_INCREMENT
must be a multiple of the host page size. On Windows NT, when
USE_MMAP_FOR_MEMORY_REGIONS is TRUE, HOST_ALLOCATION_INCREMENT must
be a multiple of 64K.
*/
#ifndef HOST_ALLOCATION_INCREMENT
#if EDG_MSDOS
#define HOST_ALLOCATION_INCREMENT 16384
#else /* !EDG_MSDOS */
#define HOST_ALLOCATION_INCREMENT 65536
#endif /* EDG_MSDOS */
#endif /* ifndef HOST_ALLOCATION_INCREMENT */
/*
Flag that is TRUE if memory regions should be freed early when they're no
longer needed (in part because the IL they contain has been written to file).
This flag is set to FALSE by default because it is expected that memory regions
will be phased out in the future: Any advantage gained by freeing them early is
therefore likely of limited scope.
*/
#ifndef FREE_MEMORY_REGIONS_EARLY
#define FREE_MEMORY_REGIONS_EARLY FALSE
#endif /* ifndef FREE_MEMORY_REGIONS_EARLY */
/*
Flag that is TRUE if zeroing the bytes of a pointer object produces a null
pointer. (This is generally true, but not guaranteed by the C or C++
standards.)
*/
#ifndef NULL_POINTER_IS_ZERO
#define NULL_POINTER_IS_ZERO TRUE
#endif /* ifdef NULL_POINTER_IS_ZERO */
/*
Flag that is TRUE to enable some manually unrolled loops in the front end.
These are loops that are important to the overall performance of the front end,
and that are not unrolled by mainstream optimizers at somewhat high
optimization settings.
*/
#ifndef EXPLICITLY_UNROLL_CRITICAL_LOOPS
#define EXPLICITLY_UNROLL_CRITICAL_LOOPS TRUE
#endif /* EXPLICITLY_UNROLL_CRITICAL_LOOPS */
/*
The number of include files that may be opened at any given time.
After include nesting gets this deep, the same file will be re-opened
for all other include files. The primary source file is not included
in this count.
*/
#ifndef MAX_INCLUDE_FILES_OPEN_AT_ONCE
#define MAX_INCLUDE_FILES_OPEN_AT_ONCE 8
#endif /* ifndef MAX_INCLUDE_FILES_OPEN_AT_ONCE */
/*
Flag that is TRUE if a stack model is used to manage the include search
list and FALSE if some other model (by default, a replace-restore model)
is to be used instead. This is the default value used to initialize
global variable stack_referenced_include_directories.
The stack model says that when an include file is opened, its directory
becomes the new primary include search directory by being added to the
front of the list of directories to search for nested include files; the
former head of the list is demoted to second place. This model is used by
Microsoft C compilers. An alternative model is that of pcc, in which the
current primary include search directory is removed from the search path
altogether and the new one takes its place at the head of the list; the
removed directory is then restored to the head of the list when the
include file is closed. This is the approach that predominates on UNIX
systems. Note that behavior in this area is left "implementation defined"
by the ANSI C standard.
*/
#ifndef STACK_REFERENCED_INCLUDE_DIRECTORIES
#if MICROSOFT_EXTENSIONS_ALLOWED
#define STACK_REFERENCED_INCLUDE_DIRECTORIES DEFAULT_MICROSOFT_MODE
#else /* !MICROSOFT_EXTENSIONS_ALLOWED */
#define STACK_REFERENCED_INCLUDE_DIRECTORIES FALSE
#endif /* MICROSOFT_EXTENSIONS_ALLOWED */
#endif /* ifndef STACK_REFERENCED_INCLUDE_DIRECTORIES */
/*
Width at which error message lines should be wrapped to another line
(typically, a "normal" terminal width).
*/
#ifndef MAX_ERROR_OUTPUT_LINE_LENGTH
#define MAX_ERROR_OUTPUT_LINE_LENGTH 79
/* 79, not 80, to avoid line wrap on some terminals. */
#endif /* ifndef MAX_ERROR_OUTPUT_LINE_LENGTH */
/*
The maximum depth of a template argument list to directly print. See
an_il_to_str_output_control_block::max_template_arg_depth for more information.
*/
#ifndef MAX_ERROR_TEMPLATE_ARG_DEPTH
#define MAX_ERROR_TEMPLATE_ARG_DEPTH 6
#endif /* ifndef MAX_ERROR_TEMPLATE_ARG_DEPTH */
/*
File "name" to be used when primary input is from stdin. This should
not be acceptable as a real file name (or at least, you should be willing to
forgo allowing an input file with this name).
*/
#define FILE_NAME_FOR_STDIN "-"
/*
Flag that is TRUE if char * pointers can be compared even if they do not
point to the same array. This is non-ANSI, but usually okay. It is not
okay on a PC, at least with some compilers, where only the offsets are
compared. The ptr_in_range macro gives a convenient way
to use this flag to test that a pointer lies in a certain range.
*/
#ifndef ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED
#if EDG_MSDOS
#define ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED FALSE
#else /* !EDG_MSDOS */
#define ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED TRUE
#endif /* EDG_MSDOS */
#endif /* ifndef ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED */
/* Check that a pointer lies within a certain address range (lower bound
included, upper bound not included, following the usual C idiom). */
#if ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED
#define ptr_in_range(ptr, start, after_end) \
((char *)(start) <= (char *)(ptr) && (char *)(ptr) < (char *)(after_end))
#else /* !ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED */
/* Use a cast to unsigned long if addresses cannot be directly compared. */
#define ptr_in_range(ptr, start, after_end) \
((unsigned long)(start) <= (unsigned long)(ptr) && \
(unsigned long)(ptr) < (unsigned long)(after_end))
#endif /* ADDRS_NOT_IN_SAME_ARRAY_CAN_BE_COMPARED */
/*
Flag that is TRUE if multiple input files can be compiled in a single
invocation of the front end. This is useful on systems where the cost
of forking a process is high (e.g., VMS). Each compilation is processed
completely separately from the others (e.g., a separate IL structure is
generated for each input file).
*/
#ifndef COMPILE_MULTIPLE_SOURCE_FILES
#define COMPILE_MULTIPLE_SOURCE_FILES FALSE
#endif /* ifndef COMPILE_MULTIPLE_SOURCE_FILES */
/*
Flag that is TRUE if multiple input files can be compiled as separate
translation units of a single compilation. This differs from
COMPILE_MULTIPLE_SOURCE_FILES in that the IL for the various translation
units is merged together to form a single IL that represents all of the
input files.
*/
#ifndef COMPILE_MULTIPLE_TRANSLATION_UNITS
#define COMPILE_MULTIPLE_TRANSLATION_UNITS FALSE
#endif /* ifndef COMPILE_MULTIPLE_TRANSLATION_UNITS */
#if COMPILE_MULTIPLE_SOURCE_FILES && COMPILE_MULTIPLE_TRANSLATION_UNITS
#error -- COMPILE_MULTIPLE_SOURCE_FILES and \
COMPILE_MULTIPLE_TRANSLATION_UNITS cannot both be TRUE.
#endif /* COMPILE_MULTIPLE_SOURCE_FILES &&
COMPILE_MULTIPLE_TRANSLATION_UNITS */
#if COMPILE_MULTIPLE_TRANSLATION_UNITS && MACRO_INVOCATION_TREE_IN_IL
#error -- COMPILE_MULTIPLE_TRANSLATION_UNITS and \
MACRO_INVOCATION_TREE_IN_IL cannot both be TRUE.
#endif /* COMPILE_MULTIPLE_TRANSLATION_UNITS && MACRO_INVOCATION_TREE_IN_IL */
/*
Flag that is TRUE if the front end is being run from a driver program.
This suppresses sign-off messages on stderr (like "Compilation terminated."),
with the expectation that the driver will produce those.
*/
#ifndef USING_DRIVER
#define USING_DRIVER FALSE /* Not using a driver. */
#endif /* ifndef USING_DRIVER */
/*
Flag that is TRUE if a signoff message should be written at the end of
the compilation, giving the count of errors; such a message is only
written if there are errors.
*/
#ifndef WRITE_SIGNOFF_MESSAGE
#define WRITE_SIGNOFF_MESSAGE (!USING_DRIVER)
#endif /* ifndef WRITE_SIGNOFF_MESSAGE */
/*
Flag that is TRUE if the string "error" should be included in error
messages. If this flag is false only warnings and remarks have their
severity explicitly included in the message.
*/
#ifndef ERROR_SEVERITY_EXPLICIT_IN_ERROR_MESSAGES
#define ERROR_SEVERITY_EXPLICIT_IN_ERROR_MESSAGES TRUE
#endif /* ifndef ERROR_SEVERITY_EXPLICIT_IN_ERROR_MESSAGES */
/*
Flag that is TRUE if "brief" diagnostics (each diagnostic is all on
one line) should be put out. This is the initial value of the variable
brief_diagnostics, which can be overridden by the --[no]brief_diagnostics
command-line option.
*/
#ifndef DEFAULT_BRIEF_DIAGNOSTICS
#define DEFAULT_BRIEF_DIAGNOSTICS FALSE
#endif /* ifndef DEFAULT_BRIEF_DIAGNOSTICS */
/*
Flag that is TRUE if notes should be added to provide details about overload
resolution failures. (This is the initial value of the variable
add_match_notes, which can be overridden by the --[no_]add_match_notes
command-line option.
*/
#ifndef DEFAULT_ADD_MATCH_NOTES
#define DEFAULT_ADD_MATCH_NOTES TRUE
#endif /* ifndef DEFAULT_ADD_MATCH_NOTES */
/*
TRUE if the column number should be included as part of the diagnostic
output in brief diagnostics mode.
*/
#ifndef COLUMN_NUMBER_IN_BRIEF_DIAGNOSTICS
#define COLUMN_NUMBER_IN_BRIEF_DIAGNOSTICS TRUE
#endif /* ifndef COLUMN_NUMBER_IN_BRIEF_DIAGNOSTICS */
/*
Flag that is TRUE to display error numbers in diagnostics. This is the
default value for the flag that can be modified by a command line option.
*/
#ifndef DEFAULT_DISPLAY_ERROR_NUMBER
#define DEFAULT_DISPLAY_ERROR_NUMBER FALSE
#endif /* ifndef DEFAULT_DISPLAY_ERROR_NUMBER */
/*
The maximum number of instantiation contexts that should be displayed as
part of a diagnostic. If this limit is exceeded, the first N and last N
contexts are displayed, where N is half of the limit value. If the limit
is specified as zero, all of the contexts are displayed. This is the
initial value of the variable context_limit, which can be overridden by the
--context_limit command-line option.
*/
#ifndef DEFAULT_CONTEXT_LIMIT
#define DEFAULT_CONTEXT_LIMIT 10
#endif /* ifndef DEFAULT_CONTEXT_LIMIT */
/*
Flag that is TRUE if typedefs declared in template classes should not be
replaced with the underlying type in diagnostic output. Removing such
typedefs generally produces better diagnostics. This macro is provided
to preserve the diagnostic behavior of earlier versions of the front end.
*/
#ifndef DEFAULT_DISPLAY_TEMPLATE_TYPEDEFS_IN_DIAGNOSTICS
#define DEFAULT_DISPLAY_TEMPLATE_TYPEDEFS_IN_DIAGNOSTICS FALSE
#endif /* ifndef DEFAULT_DISPLAY_TEMPLATE_TYPEDEFS_IN_DIAGNOSTICS */
#if FULLY_RESOLVED_MACRO_POSITIONS
/*
Flag that is TRUE if diagnostics referring to text in macro expansions should
include information about the original position from which the text was copied
and, if RECORD_MACRO_INVOCATIONS is TRUE, the macro invocation stack in
effect at that point. This is the initial value of the variable
macro_positions_in_diagnostics, which can be overridden by the
--[no_]macro_positions_in_diagnostics command-line option.
*/
#ifndef DEFAULT_MACRO_POSITIONS_IN_DIAGNOSTICS
#define DEFAULT_MACRO_POSITIONS_IN_DIAGNOSTICS FALSE
#endif /* ifndef DEFAULT_MACRO_POSITIONS_IN_DIAGNOSTICS */
#endif /* FULLY_RESOLVED_MACRO_POSITIONS */
/*
Flag that is TRUE if diagnostic output should be directed to stdout instead
of stderr, except when doing preprocessing only (i.e., the way that the
Microsoft compiler outputs diagnostics).
*/
#ifndef DIRECT_ERROR_OUTPUT_TO_STDOUT
#define DIRECT_ERROR_OUTPUT_TO_STDOUT FALSE
#endif /* ifndef DIRECT_ERROR_OUTPUT_TO_STDOUT */
/*
Enable the EDG front end daemon implementation code instead of the traditional
single process implementation. This configuration is intended primarily for
internal testing and as a demo of a possible deployment of the front end.
*/
#ifndef EDG_FRONT_END_DAEMON
#define EDG_FRONT_END_DAEMON FALSE
#endif /* ifndef EDG_FRONT_END_DAEMON */
/*
Is the C-generating back end being used as the back end?
See also C_GEN_BE_GENERATES_ANSI_C et al. in targ_def.h.
Note that this means we're using the C-generating back end,
but not necessarily in the current program -- e.g., it can
be TRUE in the standalone IL display program.
*/
#ifndef BACK_END_IS_C_GEN_BE
#define BACK_END_IS_C_GEN_BE TRUE /* You can change this. */
#endif /* ifndef BACK_END_IS_C_GEN_BE */
/*
This switch controls whether a post-pass is done after IL lowering to ensure
that the types list is in order, in the sense that the C-generating back end
can generate compilable code from it. (Other code-generating back ends may
also require such an ordering.)
*/
#ifndef ENSURE_LOWERED_TYPE_LIST_ORDERING
#define ENSURE_LOWERED_TYPE_LIST_ORDERING BACK_END_IS_C_GEN_BE
#endif /* ifndef ENSURE_LOWERED_TYPE_LIST_ORDERING */
#if BACK_END_IS_C_GEN_BE && !ENSURE_LOWERED_TYPE_LIST_ORDERING
#error BACK_END_IS_C_GEN_BE requires ENSURE_LOWERED_TYPE_LIST_ORDERING
#endif /* BACK_END_IS_C_GEN_BE && !ENSURE_LOWERED_TYPE_LIST_ORDERING */
/*
Is the C++-generating back end being used as the back end?
Note that this means we're using the C++-generating back end,
but not necessarily in the current program -- e.g., it can
be TRUE in the standalone IL display program.
*/
#ifndef BACK_END_IS_CP_GEN_BE
#define BACK_END_IS_CP_GEN_BE FALSE /* You can change this. */
#endif /* ifndef BACK_END_IS_CP_GEN_BE */
#if BACK_END_IS_C_GEN_BE && BACK_END_IS_CP_GEN_BE
#error -- BACK_END_IS_C_GEN_BE and BACK_END_IS_CP_GEN_BE cannot both be TRUE.
#endif /* BACK_END_IS_C_GEN_BE && BACK_END_IS_CP_GEN_BE */
#if BACK_END_IS_CP_GEN_BE && COMPILE_MULTIPLE_TRANSLATION_UNITS
#error -- COMPILE_MULTIPLE_TRANSLATION_UNITS cannot be used with the \
C++-generating back end.
#endif /* BACK_END_IS_CP_GEN_BE && COMPILE_MULTIPLE_TRANSLATION_UNITS */
/*
When the C-generating back end (c_gen_be) or, in C mode, the C++/C-generating
back end (cp_gen_be) is run, this is the suffix appended to the base of the
primary source file to get the name of the generated C output file.
*/
#ifndef GEN_C_FILE_SUFFIX
#if BACK_END_IS_C_GEN_BE || BACK_END_IS_CP_GEN_BE
#if EDG_MSDOS
/* File names under MSDOS cannot have multiple periods. */
#define GEN_C_FILE_SUFFIX ".ic"
#else /* !EDG_MSDOS */
#define GEN_C_FILE_SUFFIX ".int.c"
#endif /* if EDG_MSDOS */
#endif /* BACK_END_IS_C_GEN_BE || ... */
#endif /* ifndef GEN_C_FILE_SUFFIX */
/*
Flag that controls whether string literals should be lowered to non-const
types during lowering. The goal of lowering is to produce C, and in the C
language string literals are non-const. However, setting this flag to TRUE
may have other side-effects, for example, not being able to place strings into
read-only storage. This flag defaults to TRUE when the C-generating back end
is used.
*/
#ifndef LOWER_STRING_LITERALS_TO_NON_CONST
#if BACK_END_IS_C_GEN_BE
#define LOWER_STRING_LITERALS_TO_NON_CONST TRUE
#else /* !BACK_END_IS_C_GEN_BE */
#define LOWER_STRING_LITERALS_TO_NON_CONST FALSE
#endif /* BACK_END_IS_C_GEN_BE */
#endif /* ifndef LOWER_STRING_LITERALS_TO_NON_CONST */
/*
When the C++/C-generating back end (cp_gen_be) is run in C++ mode, this is the
suffix appended to the base of the primary source file to get the name of the
generated C++ output file.
*/
#ifndef GEN_CPP_FILE_SUFFIX
#if BACK_END_IS_CP_GEN_BE
#define GEN_CPP_FILE_SUFFIX GEN_C_FILE_SUFFIX
#endif /* BACK_END_IS_CP_GEN_BE */
#endif /* ifndef GEN_CPP_FILE_SUFFIX */
/*
The flag STANDALONE_IL_DISPLAY is set to TRUE when compiling the standalone
IL display utility. It should be set on the command line if needed;
the code here should not be changed.
*/
#ifndef STANDALONE_IL_DISPLAY
#define STANDALONE_IL_DISPLAY FALSE /* Do not change this. */
#endif /* ifndef STANDALONE_IL_DISPLAY */
/*
The flag STANDALONE_C_GEN_BE is set to TRUE when compiling the standalone
C-generating back end c_gen_be. It should be set on the command
line if needed; the code here should not be changed.
*/
#ifndef STANDALONE_C_GEN_BE
#define STANDALONE_C_GEN_BE FALSE /* Do not change this. */
#endif /* ifndef STANDALONE_C_GEN_BE */
/*
The flag STANDALONE_CP_GEN_BE is set to TRUE when compiling the standalone
C++/C-generating back end cp_gen_be. It should be set on the command
line if needed; the code here should not be changed.
*/
#ifndef STANDALONE_CP_GEN_BE
#define STANDALONE_CP_GEN_BE FALSE /* Do not change this. */
#endif /* ifndef STANDALONE_CP_GEN_BE */
/*
The flag STANDALONE_UTILITY_PROGRAM is set to TRUE when compiling one of
the standalone utility programs (the C-generating back end c_gen_be, the
C++/C generating back end cp_gen_be, or the IL display utility il_display).
It is forced to TRUE if STANDALONE_IL_DISPLAY, STANDALONE_C_GEN_BE,
or STANDALONE_CP_GEN_BE is TRUE.
*/
#if STANDALONE_IL_DISPLAY || STANDALONE_C_GEN_BE || STANDALONE_CP_GEN_BE
#define STANDALONE_UTILITY_PROGRAM TRUE /* Do not change this. */
#else /* !(STANDALONE_IL_DISPLAY || STANDALONE_C_GEN_BE || ...) */
#ifndef STANDALONE_UTILITY_PROGRAM
#define STANDALONE_UTILITY_PROGRAM FALSE /* Do not change this. */
#endif /* ifndef STANDALONE_UTILITY_PROGRAM */
#endif /* STANDALONE_IL_DISPLAY || STANDALONE_C_GEN_BE || ... */
/*
Flag that is TRUE if the code necessary to display the IL in a readable
form on stdout is to be compiled. This flag may be set on the command
line or will be forced to TRUE if STANDALONE_IL_DISPLAY is TRUE.
This must be TRUE for the --il_display command-line option to be enabled.
*/
#if STANDALONE_IL_DISPLAY
#define NEED_IL_DISPLAY TRUE /* Do not change this. */
#else /* !STANDALONE_IL_DISPLAY */
#ifndef NEED_IL_DISPLAY
#if DEBUG
#define NEED_IL_DISPLAY TRUE
#else /* !DEBUG */
#define NEED_IL_DISPLAY FALSE
#endif /* DEBUG */
#endif /* ifndef NEED_IL_DISPLAY */
#endif /* STANDALONE_IL_DISPLAY */
/*
Flag that is TRUE if the intermediate language should be written to a file.
FALSE means the IL is passed in memory to the back end.
*/
#if STANDALONE_UTILITY_PROGRAM
#ifndef IL_SHOULD_BE_WRITTEN_TO_FILE
#define IL_SHOULD_BE_WRITTEN_TO_FILE TRUE /* Do not change this. */
#else /* defined(IL_SHOULD_BE_WRITTEN_TO_FILE) */
#if !IL_SHOULD_BE_WRITTEN_TO_FILE
#error -- IL_SHOULD_BE_WRITTEN_TO_FILE must be TRUE when \
STANDALONE_UTILITY_PROGRAM is set.
#endif /* !IL_SHOULD_BE_WRITTEN_TO_FILE */
#endif /* !defined(IL_SHOULD_BE_WRITTEN_TO_FILE) */
#else /* !STANDALONE_UTILITY_PROGRAM */
#ifndef IL_SHOULD_BE_WRITTEN_TO_FILE
#define IL_SHOULD_BE_WRITTEN_TO_FILE FALSE
#endif /* ifndef IL_SHOULD_BE_WRITTEN_TO_FILE */
#endif /* STANDALONE_UTILITY_PROGRAM */
/*
Flag that is TRUE to cause IL lowering to be done, to lower C++ intermediate
language to C intermediate language, allowing the C++ front end to be used
with a C back end.
*/
#ifndef DO_IL_LOWERING
#if BACK_END_IS_CP_GEN_BE
#define DO_IL_LOWERING FALSE
#else /* !BACK_END_IS_CP_GEN_BE */
#if defined(DOING_SOURCE_ANALYSIS) && DOING_SOURCE_ANALYSIS
#define DO_IL_LOWERING FALSE
#else /* !(defined(DOING_SOURCE_ANALYSIS) && DOING_SOURCE_ANALYSIS) */
#define DO_IL_LOWERING TRUE
#endif /* defined(DOING_SOURCE_ANALYSIS) && DOING_SOURCE_ANALYSIS */
#endif /* BACK_END_IS_CP_GEN_BE */
#endif /* ifndef DO_IL_LOWERING */
#if BACK_END_IS_C_GEN_BE && !DO_IL_LOWERING
#error -- IL lowering must be done for the C-generating back end.
#endif /* BACK_END_IS_C_GEN_BE && !DO_IL_LOWERING */
#ifndef ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING
#define ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING FALSE
#endif /* ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING */
#if CPPCLI_ENABLING_POSSIBLE && DO_IL_LOWERING
#if ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING
/* Okay, the user has said "trust me, I know what I'm doing." IL lowering
and the back end will be suppressed whenever C++/CLI or C++/CX is enabled.
This is really intended only for testing within EDG. */
#else /* !ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING */
#error -- IL lowering cannot be done when C++/CLI enabling is allowed.
#endif /* ALLOW_CPPCLI_AND_CPPCX_WITH_LOWERING */
#endif /* CPPCLI_ENABLING_POSSIBLE && DO_IL_LOWERING */
/*
If the IL is written to a file, this flag selects the file format.
The "usual" form (flag FALSE) is written out and read back in as
large blocks of memory, and a tree walk is required on the receiving
side. The "alternate" form (flag TRUE) requires a tree walk on the
sending side, and is written and read in single-entry chunks, with
each entry preceded by the entry kind and an identifying number.
The advantage of the alternate form is that it allows alteration of
the entries on the receiving side (e.g., enlarging them to add extra
information required in the back end); the disadvantage is that it's
slower.
*/
#if IL_SHOULD_BE_WRITTEN_TO_FILE
#ifndef ALTERNATE_IL_FILE_FORMAT
#define ALTERNATE_IL_FILE_FORMAT TRUE
#endif /* ifndef ALTERNATE_IL_FILE_FORMAT */
#else /* !IL_SHOULD_BE_WRITTEN_TO_FILE */
#define ALTERNATE_IL_FILE_FORMAT FALSE /* Do not change this. */
#endif /* IL_SHOULD_BE_WRITTEN_TO_FILE */
/*
When this flag is TRUE, any prototype instantiations of function definitions
that are done are included in the IL. When the flag is FALSE, prototype
instantiations of function definitions may or may not be done, depending
on other modes, but the definition generated (if any) will not be included
in the IL. If PROTOTYPE_INSTANTIATIONS_IN_IL is already defined, use that
as the basis of the value for this flag.
*/
#ifndef ALL_TEMPLATE_INFO_IN_IL
#ifdef PROTOTYPE_INSTANTIATIONS_IN_IL
#if PROTOTYPE_INSTANTIATIONS_IN_IL
#define ALL_TEMPLATE_INFO_IN_IL TRUE
#else /* !PROTOTYPE_INSTANTIATIONS_IN_IL */
#define ALL_TEMPLATE_INFO_IN_IL FALSE
#endif /* PROTOTYPE_INSTANTIATIONS_IN_IL */
#else /* ifndef PROTOTYPE_INSTANTIATIONS_IN_IL */
#define ALL_TEMPLATE_INFO_IN_IL FALSE
#endif /* ifdef PROTOTYPE_INSTANTIATIONS_IN_IL */
#endif /* ifndef ALL_TEMPLATE_INFO_IN_IL */
/*
A prototype instantiation results from parsing and analyzing a template
without substituting actual template argument entities for the formal
parameters. This flag should be set to TRUE if such structured but abstract
representations should be recorded in the IL. (It is typically not needed
for direct code generation.) It is the default value of the variable
prototype_instantiations_in_il. Note that prototype instantiations cannot
be generated when doing IL lowering.
This flag must now be set to TRUE. The flag and the tests that use it
will be removed at some point.
*/
#ifndef PROTOTYPE_INSTANTIATIONS_IN_IL
#define PROTOTYPE_INSTANTIATIONS_IN_IL TRUE
#endif /* ifndef PROTOTYPE_INSTANTIATIONS_IN_IL */
#if !PROTOTYPE_INSTANTIATIONS_IN_IL
#error PROTOTYPE_INSTANTIATIONS_IN_IL can no longer be set to FALSE
#endif /* !PROTOTYPE_INSTANTIATIONS_IN_IL */
/*
In some modes, the prototype instantiation of functions is deferred until
the first actual instantiation of the template. In versions that do not
include prototype instantiations in the IL, the default for this macro
is based on whether or not the C++-generating back end is being used. This
is done so that (by default) all C++-generating back end versions will
have the same behavior with respect to deferral of prototype instantiations.
This is desirable because deferral of prototype instantiations changes the
set of programs that can be compiled without errors.
*/
#ifndef FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED
#if DO_IL_LOWERING
#define FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED TRUE
#else /* !DO_IL_LOWERING */
#if ALL_TEMPLATE_INFO_IN_IL
#define FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED FALSE
#else /* !ALL_TEMPLATE_INFO_IN_IL */
#if BACK_END_IS_CP_GEN_BE
#define FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED FALSE
#else /* !BACK_END_IS_CP_GEN_BE */
#define FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED TRUE
#endif /* BACK_END_IS_CP_GEN_BE */
#endif /* ALL_TEMPLATE_INFO_IN_IL */
#endif /* DO_IL_LOWERING */
#endif /* ifndef FUNCTION_PROTOTYPE_INSTANTIATION_DEFERRAL_ALLOWED */
/*
Flag that is TRUE if, when deferring function prototype instantiations,
partial specialization members should not have their prototype instantiations
deferred. This feature was added to work around the fact that parsing code
in an unused function template or member function of template class can
result in the instantiation of a class, and a different result would
be obtained if the instantiation were done later. Compilers should
complain about such position-dependencies in partial specializations, but
at this point, it appears that only the EDG front end does. This is
essentially a heuristic to allow some open source applications to build.
This feature can be enabled by default using this macro, or it can be
enabled using a --set_flag option on the command line. The value is
only used if defer_function_prototype_instantiations is TRUE.
*/
#ifndef DEFAULT_SUPPRESS_DEFERRAL_ON_PARTIAL_SPEC_MEMBERS
#define DEFAULT_SUPPRESS_DEFERRAL_ON_PARTIAL_SPEC_MEMBERS FALSE
#endif /* ifndef DEFAULT_SUPPRESS_DEFERRAL_ON_PARTIAL_SPEC_MEMBERS */
/*
Flag that is TRUE if object code compatibility with USL's cfront is
required. Some features of cfront changed from release 2.1 to release 3.0,
and there are flags for compatibility with a specific version. For
example, release 2.1 provided a special feature to ease the transition
between non-nested classes and nested classes. This feature was removed
for release 3.0. Either the 2.1 or 3.0 flag should be set to designate
the variety of cfront compatibility that is desired.
Note that there is also an IA64 ABI (see below), and a cfront-like
ABI that eliminates a few of the cfront weirdnesses (such as
wasteful allocation of virtual base classes), which is selected
by having both IA64_ABI and CFRONT_OBJECT_CODE_COMPATIBILITY FALSE.
This is really a target configuration macro, but it needs to be here
because of some ordering problems.
*/
#ifndef CFRONT_2_1_OBJECT_CODE_COMPATIBILITY
#define CFRONT_2_1_OBJECT_CODE_COMPATIBILITY FALSE
#endif /* !defined(CFRONT_2_1_OBJECT_CODE_COMPATIBILITY) */
#ifndef CFRONT_3_0_OBJECT_CODE_COMPATIBILITY
#define CFRONT_3_0_OBJECT_CODE_COMPATIBILITY FALSE
#endif /* !defined(CFRONT_3_0_OBJECT_CODE_COMPATIBILITY) */
#if CFRONT_2_1_OBJECT_CODE_COMPATIBILITY||CFRONT_3_0_OBJECT_CODE_COMPATIBILITY
#define CFRONT_OBJECT_CODE_COMPATIBILITY TRUE
#else /* !(CFRONT_2_1_...) */
#define CFRONT_OBJECT_CODE_COMPATIBILITY FALSE
#endif /* CFRONT_2_1_... */
/*
TRUE if the IA-64 ABI should be used. This is a "modern" C++ object
layout standard (unlike the cfront ABI), and is a good starting point
even on architectures other than IA-64 (it's the default for a lot
of 3.x versions of g++). See https://itanium-cxx-abi.github.io/cxx-abi/.
This is really a target configuration macro, but it needs to be here
because of some ordering problems.
*/
#ifndef IA64_ABI
#define IA64_ABI FALSE
#endif /* ifndef IA64_ABI */
#if CFRONT_OBJECT_CODE_COMPATIBILITY && IA64_ABI
#error -- Cfront and IA-64 ABIs are mutually exclusive.
#endif /* CFRONT_OBJECT_CODE_COMPATIBILITY && IA64_ABI */
/*
Flag that is TRUE if the environment (in particular, the linker) is
capable of discarding extra copies of definitions, e.g., of functions.
In such an environment, one can use an instantiation mechanism that
instantiates templates wherever they are used, and counts on the
linker to discard the extra copies. The fact that one can do so
does not mean one wants to -- see INSTANTIATE_TEMPLATES_EVERYWHERE_USED.
Note that a simplified interpretation of this flag is "Do we have
COMDAT sections?"
*/
#ifndef LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS
#if IA64_ABI
#define LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS TRUE
#else /* !IA64_ABI */
#define LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS FALSE
#endif /* IA64_ABI */
#endif /* ifndef LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS */
#if !LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS && IA64_ABI
#error -- LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS must be TRUE for IA-64 ABI
#endif /* !LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS && IA64_ABI */
/*
Flag that is TRUE if templates should be instantiated everywhere they
are used, with duplicates discarded by the linker. This approach
does not require a prelinker, and setting this mode disables the
prelinker by default. Note that without a prelinker we cannot
implement exported templates.
*/
#ifndef INSTANTIATE_TEMPLATES_EVERYWHERE_USED
#define INSTANTIATE_TEMPLATES_EVERYWHERE_USED FALSE
#endif /* ifndef INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#if INSTANTIATE_TEMPLATES_EVERYWHERE_USED && \
!LINKER_CAN_DISCARD_DUPLICATE_DEFINITIONS
#error -- Cannot instantiate templates where used without linker support
#endif /* INSTANTIATE_TEMPLATES_EVERYWHERE_USED && ... */
/*
The default template instantiation mode, which controls which templates
should be instantiated without a specific request from the prelinker
or an explicit instantiation directive (none of them, those that are used,
all of them, ...). This is the default value of the global variable
instantiation_mode, which can be changed by a command-line option.
*/
#ifndef DEFAULT_INSTANTIATION_MODE
#if INSTANTIATE_TEMPLATES_EVERYWHERE_USED
#define DEFAULT_INSTANTIATION_MODE tim_used
#else /* !INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#define DEFAULT_INSTANTIATION_MODE tim_none
#endif /* INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#endif /* ifndef DEFAULT_INSTANTIATION_MODE */
/*
The default output mode, which controls how output is reported. This is the
default value of the global variable output_mode, which can be changed by a
command-line option.
*/
#ifndef DEFAULT_OUTPUT_MODE
#define DEFAULT_OUTPUT_MODE om_text
#endif /* ifndef DEFAULT_OUTPUT_MODE */
/*
Flag that is TRUE if the front end should default to hiding EDG-specific
macros (and thus attempt to conceal that the EDG front end is being used).
This is the default value of the global variable incognito, which can be
changed by a command-line option.
*/
#ifndef DEFAULT_INCOGNITO
#define DEFAULT_INCOGNITO FALSE
#endif /* ifndef DEFAULT_INCOGNITO */
/*
Flag that is TRUE if, when a precompiled header file is generated, any
instantiations that are needed will be done before the PCH file is generated
so that they will not have to be generated for each file that uses the PCH
file.
*/
#ifndef INSTANTIATE_BEFORE_PCH_CREATION
#if INSTANTIATE_TEMPLATES_EVERYWHERE_USED
#define INSTANTIATE_BEFORE_PCH_CREATION TRUE
#else /* !INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#define INSTANTIATE_BEFORE_PCH_CREATION FALSE
#endif /* INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#endif /* ifndef INSTANTIATE_BEFORE_PCH_CREATION */
/*
Flag that is TRUE to enable automatic instantiation support for templates.
This flag determines whether the code for automatic instantiation is
to be compiled. When automatic instantiation is on, the front end
generates information for a prelinker, and the prelinker controls the
instantiation process at link time.
*/
#ifndef AUTOMATIC_TEMPLATE_INSTANTIATION
#if BACK_END_IS_CP_GEN_BE
/* Automatic template instantiation is generally not a good idea when doing
source-to-source translation. */
#define AUTOMATIC_TEMPLATE_INSTANTIATION FALSE
#else /* !BACK_END_IS_CP_GEN_BE */
#if INSTANTIATE_TEMPLATES_EVERYWHERE_USED
#define AUTOMATIC_TEMPLATE_INSTANTIATION FALSE
#else /* !INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#define AUTOMATIC_TEMPLATE_INSTANTIATION TRUE
#endif /* INSTANTIATE_TEMPLATES_EVERYWHERE_USED */
#endif /* BACK_END_IS_CP_GEN_BE */
#endif /* ifndef AUTOMATIC_TEMPLATE_INSTANTIATION */
#if AUTOMATIC_TEMPLATE_INSTANTIATION
/*
Flag that is TRUE if automatic instantiation processing is to be
performed by default. This flag does not affect whether code is
compiled but rather determines whether the automatic instantiation
processing is to be performed when the compiler is executed. This is
the default value for the global flag automatic_instantiation_mode,
the value of which may be modified using command line options.
*/
#ifndef DEFAULT_AUTOMATIC_INSTANTIATION_MODE
#define DEFAULT_AUTOMATIC_INSTANTIATION_MODE TRUE
#endif /* !defined(DEFAULT_AUTOMATIC_INSTANTIATION_MODE) */
#endif /* AUTOMATIC_TEMPLATE_INSTANTIATION */
/*
There are two conventions used for template instantiation. One mode
requires that the bodies for noninline template functions and static
data members be explicitly included by the user. The other
causes a source file (e.g., a .c file) to be implicitly included
to provide the definitions of the noninline template functions and
static data members. If INSTANTIATION_BY_IMPLICIT_INCLUSION is TRUE
the implicit inclusion is performed. If it is FALSE implicit
inclusion is not performed. This feature emulates the template
instantiation source model required by Cfront.
*/
#ifndef INSTANTIATION_BY_IMPLICIT_INCLUSION
#define INSTANTIATION_BY_IMPLICIT_INCLUSION TRUE
#endif /* ifndef INSTANTIATION_BY_IMPLICIT_INCLUSION */
#if INSTANTIATION_BY_IMPLICIT_INCLUSION
/*
Flag that is TRUE if implicit inclusion of template definition files
is to be performed by default. This flag does not affect whether code
is compiled but rather determines whether the implicit inclusion
processing is to be performed when the compiler is executed. This is
the default value for the global flag
implicit_template_inclusion_mode, the value of which may be modified