Lines Matching full:builder
39 static void DefineBuiltinMacro(MacroBuilder &Builder, StringRef Macro, in DefineBuiltinMacro() argument
55 Builder.defineMacro(MacroName, Twine(MacroBody) + "\\\n"); in DefineBuiltinMacro()
57 Builder.defineMacro(MacroName, MacroBody); in DefineBuiltinMacro()
60 Builder.defineMacro(Macro); in DefineBuiltinMacro()
68 static void AddImplicitInclude(MacroBuilder &Builder, StringRef File) { in AddImplicitInclude() argument
69 Builder.append(Twine("#include \"") + File + "\""); in AddImplicitInclude()
72 static void AddImplicitIncludeMacros(MacroBuilder &Builder, StringRef File) { in AddImplicitIncludeMacros() argument
73 Builder.append(Twine("#__include_macros \"") + File + "\""); in AddImplicitIncludeMacros()
75 Builder.append("##"); // ##? in AddImplicitIncludeMacros()
80 static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP, in AddImplicitIncludePCH() argument
89 AddImplicitInclude(Builder, OriginalFile); in AddImplicitIncludePCH()
112 static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix, in DefineFloatMacros() argument
144 Builder.defineMacro(DefPrefix + "DENORM_MIN__", Twine(DenormMin)+Ext); in DefineFloatMacros()
145 Builder.defineMacro(DefPrefix + "HAS_DENORM__"); in DefineFloatMacros()
146 Builder.defineMacro(DefPrefix + "DIG__", Twine(Digits)); in DefineFloatMacros()
147 Builder.defineMacro(DefPrefix + "DECIMAL_DIG__", Twine(DecimalDigits)); in DefineFloatMacros()
148 Builder.defineMacro(DefPrefix + "EPSILON__", Twine(Epsilon)+Ext); in DefineFloatMacros()
149 Builder.defineMacro(DefPrefix + "HAS_INFINITY__"); in DefineFloatMacros()
150 Builder.defineMacro(DefPrefix + "HAS_QUIET_NAN__"); in DefineFloatMacros()
151 Builder.defineMacro(DefPrefix + "MANT_DIG__", Twine(MantissaDigits)); in DefineFloatMacros()
153 Builder.defineMacro(DefPrefix + "MAX_10_EXP__", Twine(Max10Exp)); in DefineFloatMacros()
154 Builder.defineMacro(DefPrefix + "MAX_EXP__", Twine(MaxExp)); in DefineFloatMacros()
155 Builder.defineMacro(DefPrefix + "MAX__", Twine(Max)+Ext); in DefineFloatMacros()
157 Builder.defineMacro(DefPrefix + "MIN_10_EXP__","("+Twine(Min10Exp)+")"); in DefineFloatMacros()
158 Builder.defineMacro(DefPrefix + "MIN_EXP__", "("+Twine(MinExp)+")"); in DefineFloatMacros()
159 Builder.defineMacro(DefPrefix + "MIN__", Twine(Min)+Ext); in DefineFloatMacros()
168 MacroBuilder &Builder) { in DefineTypeSize() argument
171 Builder.defineMacro(MacroName, MaxVal.toString(10, isSigned) + ValSuffix); in DefineTypeSize()
177 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeSize() argument
179 TI.isTypeSigned(Ty), Builder); in DefineTypeSize()
183 const TargetInfo &TI, MacroBuilder &Builder) { in DefineFmt() argument
187 Builder.defineMacro(Prefix + "_FMT" + Twine(*Fmt) + "__", in DefineFmt()
193 MacroBuilder &Builder) { in DefineType() argument
194 Builder.defineMacro(MacroName, TargetInfo::getTypeName(Ty)); in DefineType()
198 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeWidth() argument
199 Builder.defineMacro(MacroName, Twine(TI.getTypeWidth(Ty))); in DefineTypeWidth()
203 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeSizeof() argument
204 Builder.defineMacro(MacroName, in DefineTypeSizeof()
210 MacroBuilder &Builder) { in DefineExactWidthIntType() argument
221 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineExactWidthIntType()
222 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineExactWidthIntType()
225 Builder.defineMacro(Prefix + Twine(TypeWidth) + "_C_SUFFIX__", ConstSuffix); in DefineExactWidthIntType()
230 MacroBuilder &Builder) { in DefineExactWidthIntTypeSize() argument
240 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineExactWidthIntTypeSize()
245 MacroBuilder &Builder) { in DefineLeastWidthIntType() argument
251 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineLeastWidthIntType()
252 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineLeastWidthIntType()
253 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineLeastWidthIntType()
257 const TargetInfo &TI, MacroBuilder &Builder) { in DefineFastIntType() argument
265 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineFastIntType()
266 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineFastIntType()
268 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineFastIntType()
289 MacroBuilder &Builder) { in AddObjCXXARCLibstdcxxDefines() argument
290 Builder.defineMacro("_GLIBCXX_PREDEFINED_OBJC_ARC_IS_SCALAR"); in AddObjCXXARCLibstdcxxDefines()
340 Builder.append(Result); in AddObjCXXARCLibstdcxxDefines()
346 MacroBuilder &Builder) { in InitializeStandardPredefinedMacros() argument
355 Builder.defineMacro("__STDC__"); in InitializeStandardPredefinedMacros()
360 Builder.defineMacro("__STDC_HOSTED__", "0"); in InitializeStandardPredefinedMacros()
362 Builder.defineMacro("__STDC_HOSTED__"); in InitializeStandardPredefinedMacros()
370 Builder.defineMacro("__STDC_VERSION__", "201710L"); in InitializeStandardPredefinedMacros()
372 Builder.defineMacro("__STDC_VERSION__", "201112L"); in InitializeStandardPredefinedMacros()
374 Builder.defineMacro("__STDC_VERSION__", "199901L"); in InitializeStandardPredefinedMacros()
376 Builder.defineMacro("__STDC_VERSION__", "199409L"); in InitializeStandardPredefinedMacros()
381 Builder.defineMacro("__cplusplus", "202101L"); in InitializeStandardPredefinedMacros()
384 Builder.defineMacro("__cplusplus", "202002L"); in InitializeStandardPredefinedMacros()
387 Builder.defineMacro("__cplusplus", "201703L"); in InitializeStandardPredefinedMacros()
391 Builder.defineMacro("__cplusplus", "201402L"); in InitializeStandardPredefinedMacros()
395 Builder.defineMacro("__cplusplus", "201103L"); in InitializeStandardPredefinedMacros()
399 Builder.defineMacro("__cplusplus", "199711L"); in InitializeStandardPredefinedMacros()
406 Builder.defineMacro("__STDCPP_DEFAULT_NEW_ALIGNMENT__", in InitializeStandardPredefinedMacros()
414 Builder.defineMacro("__STDCPP_THREADS__", "1"); in InitializeStandardPredefinedMacros()
422 Builder.defineMacro("__STDC_UTF_16__", "1"); in InitializeStandardPredefinedMacros()
423 Builder.defineMacro("__STDC_UTF_32__", "1"); in InitializeStandardPredefinedMacros()
426 Builder.defineMacro("__OBJC__"); in InitializeStandardPredefinedMacros()
432 Builder.defineMacro("__OPENCL_CPP_VERSION__", "100"); in InitializeStandardPredefinedMacros()
435 Builder.defineMacro("__CL_CPP_VERSION_1_0__", "100"); in InitializeStandardPredefinedMacros()
446 Builder.defineMacro("__OPENCL_C_VERSION__", "100"); in InitializeStandardPredefinedMacros()
449 Builder.defineMacro("__OPENCL_C_VERSION__", "110"); in InitializeStandardPredefinedMacros()
452 Builder.defineMacro("__OPENCL_C_VERSION__", "120"); in InitializeStandardPredefinedMacros()
455 Builder.defineMacro("__OPENCL_C_VERSION__", "200"); in InitializeStandardPredefinedMacros()
458 Builder.defineMacro("__OPENCL_C_VERSION__", "300"); in InitializeStandardPredefinedMacros()
464 Builder.defineMacro("CL_VERSION_1_0", "100"); in InitializeStandardPredefinedMacros()
465 Builder.defineMacro("CL_VERSION_1_1", "110"); in InitializeStandardPredefinedMacros()
466 Builder.defineMacro("CL_VERSION_1_2", "120"); in InitializeStandardPredefinedMacros()
467 Builder.defineMacro("CL_VERSION_2_0", "200"); in InitializeStandardPredefinedMacros()
468 Builder.defineMacro("CL_VERSION_3_0", "300"); in InitializeStandardPredefinedMacros()
471 Builder.defineMacro("__ENDIAN_LITTLE__"); in InitializeStandardPredefinedMacros()
474 Builder.defineMacro("__FAST_RELAXED_MATH__"); in InitializeStandardPredefinedMacros()
480 Builder.defineMacro("CL_SYCL_LANGUAGE_VERSION", "121"); in InitializeStandardPredefinedMacros()
485 Builder.defineMacro("__ASSEMBLER__"); in InitializeStandardPredefinedMacros()
487 Builder.defineMacro("__CUDA__"); in InitializeStandardPredefinedMacros()
489 Builder.defineMacro("__HIP__"); in InitializeStandardPredefinedMacros()
490 Builder.defineMacro("__HIPCC__"); in InitializeStandardPredefinedMacros()
492 Builder.defineMacro("__HIP_DEVICE_COMPILE__"); in InitializeStandardPredefinedMacros()
499 MacroBuilder &Builder) { in InitializeCPlusPlusFeatureTestMacros() argument
502 Builder.defineMacro("__cpp_rtti", "199711L"); in InitializeCPlusPlusFeatureTestMacros()
504 Builder.defineMacro("__cpp_exceptions", "199711L"); in InitializeCPlusPlusFeatureTestMacros()
508 Builder.defineMacro("__cpp_unicode_characters", "200704L"); in InitializeCPlusPlusFeatureTestMacros()
509 Builder.defineMacro("__cpp_raw_strings", "200710L"); in InitializeCPlusPlusFeatureTestMacros()
510 Builder.defineMacro("__cpp_unicode_literals", "200710L"); in InitializeCPlusPlusFeatureTestMacros()
511 Builder.defineMacro("__cpp_user_defined_literals", "200809L"); in InitializeCPlusPlusFeatureTestMacros()
512 Builder.defineMacro("__cpp_lambdas", "200907L"); in InitializeCPlusPlusFeatureTestMacros()
513 Builder.defineMacro("__cpp_constexpr", in InitializeCPlusPlusFeatureTestMacros()
517 Builder.defineMacro("__cpp_constexpr_in_decltype", "201711L"); in InitializeCPlusPlusFeatureTestMacros()
518 Builder.defineMacro("__cpp_range_based_for", in InitializeCPlusPlusFeatureTestMacros()
520 Builder.defineMacro("__cpp_static_assert", in InitializeCPlusPlusFeatureTestMacros()
522 Builder.defineMacro("__cpp_decltype", "200707L"); in InitializeCPlusPlusFeatureTestMacros()
523 Builder.defineMacro("__cpp_attributes", "200809L"); in InitializeCPlusPlusFeatureTestMacros()
524 Builder.defineMacro("__cpp_rvalue_references", "200610L"); in InitializeCPlusPlusFeatureTestMacros()
525 Builder.defineMacro("__cpp_variadic_templates", "200704L"); in InitializeCPlusPlusFeatureTestMacros()
526 Builder.defineMacro("__cpp_initializer_lists", "200806L"); in InitializeCPlusPlusFeatureTestMacros()
527 Builder.defineMacro("__cpp_delegating_constructors", "200604L"); in InitializeCPlusPlusFeatureTestMacros()
528 Builder.defineMacro("__cpp_nsdmi", "200809L"); in InitializeCPlusPlusFeatureTestMacros()
529 Builder.defineMacro("__cpp_inheriting_constructors", "201511L"); in InitializeCPlusPlusFeatureTestMacros()
530 Builder.defineMacro("__cpp_ref_qualifiers", "200710L"); in InitializeCPlusPlusFeatureTestMacros()
531 Builder.defineMacro("__cpp_alias_templates", "200704L"); in InitializeCPlusPlusFeatureTestMacros()
534 Builder.defineMacro("__cpp_threadsafe_static_init", "200806L"); in InitializeCPlusPlusFeatureTestMacros()
538 Builder.defineMacro("__cpp_binary_literals", "201304L"); in InitializeCPlusPlusFeatureTestMacros()
539 Builder.defineMacro("__cpp_digit_separators", "201309L"); in InitializeCPlusPlusFeatureTestMacros()
540 Builder.defineMacro("__cpp_init_captures", in InitializeCPlusPlusFeatureTestMacros()
542 Builder.defineMacro("__cpp_generic_lambdas", in InitializeCPlusPlusFeatureTestMacros()
544 Builder.defineMacro("__cpp_decltype_auto", "201304L"); in InitializeCPlusPlusFeatureTestMacros()
545 Builder.defineMacro("__cpp_return_type_deduction", "201304L"); in InitializeCPlusPlusFeatureTestMacros()
546 Builder.defineMacro("__cpp_aggregate_nsdmi", "201304L"); in InitializeCPlusPlusFeatureTestMacros()
547 Builder.defineMacro("__cpp_variable_templates", "201304L"); in InitializeCPlusPlusFeatureTestMacros()
550 Builder.defineMacro("__cpp_sized_deallocation", "201309L"); in InitializeCPlusPlusFeatureTestMacros()
554 Builder.defineMacro("__cpp_hex_float", "201603L"); in InitializeCPlusPlusFeatureTestMacros()
555 Builder.defineMacro("__cpp_inline_variables", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
556 Builder.defineMacro("__cpp_noexcept_function_type", "201510L"); in InitializeCPlusPlusFeatureTestMacros()
557 Builder.defineMacro("__cpp_capture_star_this", "201603L"); in InitializeCPlusPlusFeatureTestMacros()
558 Builder.defineMacro("__cpp_if_constexpr", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
559 Builder.defineMacro("__cpp_deduction_guides", "201703L"); // (not latest) in InitializeCPlusPlusFeatureTestMacros()
560 Builder.defineMacro("__cpp_template_auto", "201606L"); // (old name) in InitializeCPlusPlusFeatureTestMacros()
561 Builder.defineMacro("__cpp_namespace_attributes", "201411L"); in InitializeCPlusPlusFeatureTestMacros()
562 Builder.defineMacro("__cpp_enumerator_attributes", "201411L"); in InitializeCPlusPlusFeatureTestMacros()
563 Builder.defineMacro("__cpp_nested_namespace_definitions", "201411L"); in InitializeCPlusPlusFeatureTestMacros()
564 Builder.defineMacro("__cpp_variadic_using", "201611L"); in InitializeCPlusPlusFeatureTestMacros()
565 Builder.defineMacro("__cpp_aggregate_bases", "201603L"); in InitializeCPlusPlusFeatureTestMacros()
566 Builder.defineMacro("__cpp_structured_bindings", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
567 Builder.defineMacro("__cpp_nontype_template_args", in InitializeCPlusPlusFeatureTestMacros()
569 Builder.defineMacro("__cpp_fold_expressions", "201603L"); in InitializeCPlusPlusFeatureTestMacros()
570 Builder.defineMacro("__cpp_guaranteed_copy_elision", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
571 Builder.defineMacro("__cpp_nontype_template_parameter_auto", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
574 Builder.defineMacro("__cpp_aligned_new", "201606L"); in InitializeCPlusPlusFeatureTestMacros()
576 Builder.defineMacro("__cpp_template_template_args", "201611L"); in InitializeCPlusPlusFeatureTestMacros()
580 //Builder.defineMacro("__cpp_aggregate_paren_init", "201902L"); in InitializeCPlusPlusFeatureTestMacros()
581 Builder.defineMacro("__cpp_concepts", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
582 Builder.defineMacro("__cpp_conditional_explicit", "201806L"); in InitializeCPlusPlusFeatureTestMacros()
583 //Builder.defineMacro("__cpp_consteval", "201811L"); in InitializeCPlusPlusFeatureTestMacros()
584 Builder.defineMacro("__cpp_constexpr_dynamic_alloc", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
585 Builder.defineMacro("__cpp_constinit", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
586 //Builder.defineMacro("__cpp_coroutines", "201902L"); in InitializeCPlusPlusFeatureTestMacros()
587 Builder.defineMacro("__cpp_designated_initializers", "201707L"); in InitializeCPlusPlusFeatureTestMacros()
588 Builder.defineMacro("__cpp_impl_three_way_comparison", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
589 //Builder.defineMacro("__cpp_modules", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
590 //Builder.defineMacro("__cpp_using_enum", "201907L"); in InitializeCPlusPlusFeatureTestMacros()
593 Builder.defineMacro("__cpp_char8_t", "201811L"); in InitializeCPlusPlusFeatureTestMacros()
594 Builder.defineMacro("__cpp_impl_destroying_delete", "201806L"); in InitializeCPlusPlusFeatureTestMacros()
598 Builder.defineMacro("__cpp_coroutines", "201703L"); in InitializeCPlusPlusFeatureTestMacros()
605 MacroBuilder &Builder) { in InitializePredefinedMacros() argument
607 Builder.defineMacro("__llvm__"); // LLVM Backend in InitializePredefinedMacros()
608 Builder.defineMacro("__clang__"); // Clang Frontend in InitializePredefinedMacros()
611 Builder.defineMacro("__clang_major__", TOSTR(CLANG_VERSION_MAJOR)); in InitializePredefinedMacros()
612 Builder.defineMacro("__clang_minor__", TOSTR(CLANG_VERSION_MINOR)); in InitializePredefinedMacros()
613 Builder.defineMacro("__clang_patchlevel__", TOSTR(CLANG_VERSION_PATCHLEVEL)); in InitializePredefinedMacros()
616 Builder.defineMacro("__clang_version__", in InitializePredefinedMacros()
626 Builder.defineMacro("__GNUC__", Twine(GNUCMajor)); in InitializePredefinedMacros()
627 Builder.defineMacro("__GNUC_MINOR__", Twine(GNUCMinor)); in InitializePredefinedMacros()
628 Builder.defineMacro("__GNUC_PATCHLEVEL__", Twine(GNUCPatch)); in InitializePredefinedMacros()
629 Builder.defineMacro("__GXX_ABI_VERSION", "1002"); in InitializePredefinedMacros()
632 Builder.defineMacro("__GNUG__", Twine(GNUCMajor)); in InitializePredefinedMacros()
633 Builder.defineMacro("__GXX_WEAK__"); in InitializePredefinedMacros()
638 Builder.defineMacro("__ATOMIC_RELAXED", "0"); in InitializePredefinedMacros()
639 Builder.defineMacro("__ATOMIC_CONSUME", "1"); in InitializePredefinedMacros()
640 Builder.defineMacro("__ATOMIC_ACQUIRE", "2"); in InitializePredefinedMacros()
641 Builder.defineMacro("__ATOMIC_RELEASE", "3"); in InitializePredefinedMacros()
642 Builder.defineMacro("__ATOMIC_ACQ_REL", "4"); in InitializePredefinedMacros()
643 Builder.defineMacro("__ATOMIC_SEQ_CST", "5"); in InitializePredefinedMacros()
653 Builder.defineMacro("__OPENCL_MEMORY_SCOPE_WORK_ITEM", "0"); in InitializePredefinedMacros()
654 Builder.defineMacro("__OPENCL_MEMORY_SCOPE_WORK_GROUP", "1"); in InitializePredefinedMacros()
655 Builder.defineMacro("__OPENCL_MEMORY_SCOPE_DEVICE", "2"); in InitializePredefinedMacros()
656 Builder.defineMacro("__OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES", "3"); in InitializePredefinedMacros()
657 Builder.defineMacro("__OPENCL_MEMORY_SCOPE_SUB_GROUP", "4"); in InitializePredefinedMacros()
660 Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1"); in InitializePredefinedMacros()
664 Builder.defineMacro("__VERSION__", "\"" + in InitializePredefinedMacros()
671 Builder.defineMacro("__STRICT_ANSI__"); in InitializePredefinedMacros()
674 Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__"); in InitializePredefinedMacros()
678 Builder.defineMacro("__OBJC2__"); in InitializePredefinedMacros()
681 Builder.defineMacro("OBJC_ZEROCOST_EXCEPTIONS"); in InitializePredefinedMacros()
685 Builder.defineMacro("__OBJC_GC__"); in InitializePredefinedMacros()
688 Builder.defineMacro("__NEXT_RUNTIME__"); in InitializePredefinedMacros()
697 Builder.defineMacro("__OBJC_GNUSTEP_RUNTIME_ABI__", "20"); in InitializePredefinedMacros()
699 Builder.defineMacro("__OBJC_GNUSTEP_RUNTIME_ABI__", in InitializePredefinedMacros()
714 Builder.defineMacro("__OBJFW_RUNTIME_ABI__", in InitializePredefinedMacros()
719 Builder.defineMacro("IBOutlet", "__attribute__((iboutlet))"); in InitializePredefinedMacros()
720 Builder.defineMacro("IBOutletCollection(ClassName)", in InitializePredefinedMacros()
722 Builder.defineMacro("IBAction", "void)__attribute__((ibaction)"); in InitializePredefinedMacros()
723 Builder.defineMacro("IBInspectable", ""); in InitializePredefinedMacros()
724 Builder.defineMacro("IB_DESIGNABLE", ""); in InitializePredefinedMacros()
729 Builder.defineMacro("__OBJC_BOOL_IS_BOOL", in InitializePredefinedMacros()
733 InitializeCPlusPlusFeatureTestMacros(LangOpts, Builder); in InitializePredefinedMacros()
738 Builder.defineMacro("__CONSTANT_CFSTRINGS__"); in InitializePredefinedMacros()
741 Builder.defineMacro("OBJC_NEW_PROPERTIES"); in InitializePredefinedMacros()
744 Builder.defineMacro("__PASCAL_STRINGS__"); in InitializePredefinedMacros()
747 Builder.defineMacro("__block", "__attribute__((__blocks__(byref)))"); in InitializePredefinedMacros()
748 Builder.defineMacro("__BLOCKS__"); in InitializePredefinedMacros()
752 Builder.defineMacro("__EXCEPTIONS"); in InitializePredefinedMacros()
754 Builder.defineMacro("__GXX_RTTI"); in InitializePredefinedMacros()
757 Builder.defineMacro("__USING_SJLJ_EXCEPTIONS__"); in InitializePredefinedMacros()
759 Builder.defineMacro("__SEH__"); in InitializePredefinedMacros()
762 Builder.defineMacro("__ARM_DWARF_EH__"); in InitializePredefinedMacros()
765 Builder.defineMacro("__DEPRECATED"); in InitializePredefinedMacros()
768 Builder.defineMacro("__private_extern__", "extern"); in InitializePredefinedMacros()
773 Builder.defineMacro("_WCHAR_T_DEFINED"); in InitializePredefinedMacros()
774 Builder.defineMacro("_NATIVE_WCHAR_T_DEFINED"); in InitializePredefinedMacros()
779 Builder.defineMacro("__OPTIMIZE__"); in InitializePredefinedMacros()
781 Builder.defineMacro("__OPTIMIZE_SIZE__"); in InitializePredefinedMacros()
784 Builder.defineMacro("__FAST_MATH__"); in InitializePredefinedMacros()
793 Builder.defineMacro("__ORDER_LITTLE_ENDIAN__", "1234"); in InitializePredefinedMacros()
794 Builder.defineMacro("__ORDER_BIG_ENDIAN__", "4321"); in InitializePredefinedMacros()
795 Builder.defineMacro("__ORDER_PDP_ENDIAN__", "3412"); in InitializePredefinedMacros()
797 Builder.defineMacro("__BYTE_ORDER__", "__ORDER_BIG_ENDIAN__"); in InitializePredefinedMacros()
798 Builder.defineMacro("__BIG_ENDIAN__"); in InitializePredefinedMacros()
800 Builder.defineMacro("__BYTE_ORDER__", "__ORDER_LITTLE_ENDIAN__"); in InitializePredefinedMacros()
801 Builder.defineMacro("__LITTLE_ENDIAN__"); in InitializePredefinedMacros()
806 Builder.defineMacro("_LP64"); in InitializePredefinedMacros()
807 Builder.defineMacro("__LP64__"); in InitializePredefinedMacros()
812 Builder.defineMacro("_ILP32"); in InitializePredefinedMacros()
813 Builder.defineMacro("__ILP32__"); in InitializePredefinedMacros()
818 Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth())); in InitializePredefinedMacros()
820 DefineTypeSize("__SCHAR_MAX__", TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
821 DefineTypeSize("__SHRT_MAX__", TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
822 DefineTypeSize("__INT_MAX__", TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
823 DefineTypeSize("__LONG_MAX__", TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
824 DefineTypeSize("__LONG_LONG_MAX__", TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
825 DefineTypeSize("__WCHAR_MAX__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
826 DefineTypeSize("__WINT_MAX__", TI.getWIntType(), TI, Builder); in InitializePredefinedMacros()
827 DefineTypeSize("__INTMAX_MAX__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
828 DefineTypeSize("__SIZE_MAX__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
830 DefineTypeSize("__UINTMAX_MAX__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
831 DefineTypeSize("__PTRDIFF_MAX__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
832 DefineTypeSize("__INTPTR_MAX__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
833 DefineTypeSize("__UINTPTR_MAX__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
835 DefineTypeSizeof("__SIZEOF_DOUBLE__", TI.getDoubleWidth(), TI, Builder); in InitializePredefinedMacros()
836 DefineTypeSizeof("__SIZEOF_FLOAT__", TI.getFloatWidth(), TI, Builder); in InitializePredefinedMacros()
837 DefineTypeSizeof("__SIZEOF_INT__", TI.getIntWidth(), TI, Builder); in InitializePredefinedMacros()
838 DefineTypeSizeof("__SIZEOF_LONG__", TI.getLongWidth(), TI, Builder); in InitializePredefinedMacros()
839 DefineTypeSizeof("__SIZEOF_LONG_DOUBLE__",TI.getLongDoubleWidth(),TI,Builder); in InitializePredefinedMacros()
840 DefineTypeSizeof("__SIZEOF_LONG_LONG__", TI.getLongLongWidth(), TI, Builder); in InitializePredefinedMacros()
841 DefineTypeSizeof("__SIZEOF_POINTER__", TI.getPointerWidth(0), TI, Builder); in InitializePredefinedMacros()
842 DefineTypeSizeof("__SIZEOF_SHORT__", TI.getShortWidth(), TI, Builder); in InitializePredefinedMacros()
844 TI.getTypeWidth(TI.getPtrDiffType(0)), TI, Builder); in InitializePredefinedMacros()
846 TI.getTypeWidth(TI.getSizeType()), TI, Builder); in InitializePredefinedMacros()
848 TI.getTypeWidth(TI.getWCharType()), TI, Builder); in InitializePredefinedMacros()
850 TI.getTypeWidth(TI.getWIntType()), TI, Builder); in InitializePredefinedMacros()
852 DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder); in InitializePredefinedMacros()
854 DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder); in InitializePredefinedMacros()
855 DefineFmt("__INTMAX", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
856 Builder.defineMacro("__INTMAX_C_SUFFIX__", in InitializePredefinedMacros()
858 DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Builder); in InitializePredefinedMacros()
859 DefineFmt("__UINTMAX", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
860 Builder.defineMacro("__UINTMAX_C_SUFFIX__", in InitializePredefinedMacros()
862 DefineTypeWidth("__INTMAX_WIDTH__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
863 DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Builder); in InitializePredefinedMacros()
864 DefineFmt("__PTRDIFF", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
865 DefineTypeWidth("__PTRDIFF_WIDTH__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
866 DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Builder); in InitializePredefinedMacros()
867 DefineFmt("__INTPTR", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
868 DefineTypeWidth("__INTPTR_WIDTH__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
869 DefineType("__SIZE_TYPE__", TI.getSizeType(), Builder); in InitializePredefinedMacros()
870 DefineFmt("__SIZE", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
871 DefineTypeWidth("__SIZE_WIDTH__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
872 DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder); in InitializePredefinedMacros()
873 DefineTypeWidth("__WCHAR_WIDTH__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
874 DefineType("__WINT_TYPE__", TI.getWIntType(), Builder); in InitializePredefinedMacros()
875 DefineTypeWidth("__WINT_WIDTH__", TI.getWIntType(), TI, Builder); in InitializePredefinedMacros()
876 DefineTypeWidth("__SIG_ATOMIC_WIDTH__", TI.getSigAtomicType(), TI, Builder); in InitializePredefinedMacros()
877 DefineTypeSize("__SIG_ATOMIC_MAX__", TI.getSigAtomicType(), TI, Builder); in InitializePredefinedMacros()
878 DefineType("__CHAR16_TYPE__", TI.getChar16Type(), Builder); in InitializePredefinedMacros()
879 DefineType("__CHAR32_TYPE__", TI.getChar32Type(), Builder); in InitializePredefinedMacros()
881 DefineTypeWidth("__UINTMAX_WIDTH__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
882 DefineType("__UINTPTR_TYPE__", TI.getUIntPtrType(), Builder); in InitializePredefinedMacros()
883 DefineFmt("__UINTPTR", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
884 DefineTypeWidth("__UINTPTR_WIDTH__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
887 DefineFloatMacros(Builder, "FLT16", &TI.getHalfFormat(), "F16"); in InitializePredefinedMacros()
888 DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F"); in InitializePredefinedMacros()
889 DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), ""); in InitializePredefinedMacros()
890 DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L"); in InitializePredefinedMacros()
893 Builder.defineMacro("__POINTER_WIDTH__", in InitializePredefinedMacros()
897 Builder.defineMacro("__BIGGEST_ALIGNMENT__", in InitializePredefinedMacros()
901 Builder.defineMacro("__CHAR_UNSIGNED__"); in InitializePredefinedMacros()
904 Builder.defineMacro("__WCHAR_UNSIGNED__"); in InitializePredefinedMacros()
907 Builder.defineMacro("__WINT_UNSIGNED__"); in InitializePredefinedMacros()
910 DefineExactWidthIntType(TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
913 DefineExactWidthIntType(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
916 DefineExactWidthIntType(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
919 DefineExactWidthIntType(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
922 DefineExactWidthIntType(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
924 DefineExactWidthIntType(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
925 DefineExactWidthIntTypeSize(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
926 DefineExactWidthIntTypeSize(TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
929 DefineExactWidthIntType(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
930 DefineExactWidthIntTypeSize(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
931 DefineExactWidthIntTypeSize(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
935 DefineExactWidthIntType(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
936 DefineExactWidthIntTypeSize(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
937 DefineExactWidthIntTypeSize(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
941 DefineExactWidthIntType(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
942 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
943 DefineExactWidthIntTypeSize(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
947 DefineExactWidthIntType(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
948 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
949 DefineExactWidthIntTypeSize(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
952 DefineLeastWidthIntType(8, true, TI, Builder); in InitializePredefinedMacros()
953 DefineLeastWidthIntType(8, false, TI, Builder); in InitializePredefinedMacros()
954 DefineLeastWidthIntType(16, true, TI, Builder); in InitializePredefinedMacros()
955 DefineLeastWidthIntType(16, false, TI, Builder); in InitializePredefinedMacros()
956 DefineLeastWidthIntType(32, true, TI, Builder); in InitializePredefinedMacros()
957 DefineLeastWidthIntType(32, false, TI, Builder); in InitializePredefinedMacros()
958 DefineLeastWidthIntType(64, true, TI, Builder); in InitializePredefinedMacros()
959 DefineLeastWidthIntType(64, false, TI, Builder); in InitializePredefinedMacros()
961 DefineFastIntType(8, true, TI, Builder); in InitializePredefinedMacros()
962 DefineFastIntType(8, false, TI, Builder); in InitializePredefinedMacros()
963 DefineFastIntType(16, true, TI, Builder); in InitializePredefinedMacros()
964 DefineFastIntType(16, false, TI, Builder); in InitializePredefinedMacros()
965 DefineFastIntType(32, true, TI, Builder); in InitializePredefinedMacros()
966 DefineFastIntType(32, false, TI, Builder); in InitializePredefinedMacros()
967 DefineFastIntType(64, true, TI, Builder); in InitializePredefinedMacros()
968 DefineFastIntType(64, false, TI, Builder); in InitializePredefinedMacros()
971 Builder.defineMacro("__USER_LABEL_PREFIX__", UserLabelPrefix); in InitializePredefinedMacros()
974 Builder.defineMacro("__FINITE_MATH_ONLY__", "1"); in InitializePredefinedMacros()
976 Builder.defineMacro("__FINITE_MATH_ONLY__", "0"); in InitializePredefinedMacros()
980 Builder.defineMacro("__GNUC_GNU_INLINE__"); in InitializePredefinedMacros()
982 Builder.defineMacro("__GNUC_STDC_INLINE__"); in InitializePredefinedMacros()
986 Builder.defineMacro("__GCC_ATOMIC_TEST_AND_SET_TRUEVAL", "1"); in InitializePredefinedMacros()
993 Builder.defineMacro(Prefix + #TYPE "_LOCK_FREE", \ in InitializePredefinedMacros()
1008 Builder.defineMacro(Prefix + "POINTER_LOCK_FREE", in InitializePredefinedMacros()
1019 Builder.defineMacro("__NO_INLINE__"); in InitializePredefinedMacros()
1022 Builder.defineMacro("__PIC__", Twine(PICLevel)); in InitializePredefinedMacros()
1023 Builder.defineMacro("__pic__", Twine(PICLevel)); in InitializePredefinedMacros()
1025 Builder.defineMacro("__PIE__", Twine(PICLevel)); in InitializePredefinedMacros()
1026 Builder.defineMacro("__pie__", Twine(PICLevel)); in InitializePredefinedMacros()
1031 Builder.defineMacro("__FLT_EVAL_METHOD__", Twine(TI.getFloatEvalMethod())); in InitializePredefinedMacros()
1032 Builder.defineMacro("__FLT_RADIX__", "2"); in InitializePredefinedMacros()
1033 Builder.defineMacro("__DECIMAL_DIG__", "__LDBL_DECIMAL_DIG__"); in InitializePredefinedMacros()
1036 Builder.defineMacro("__SSP__"); in InitializePredefinedMacros()
1038 Builder.defineMacro("__SSP_STRONG__", "2"); in InitializePredefinedMacros()
1040 Builder.defineMacro("__SSP_ALL__", "3"); in InitializePredefinedMacros()
1043 Builder.defineMacro("__clang_analyzer__"); in InitializePredefinedMacros()
1046 Builder.defineMacro("__FAST_RELAXED_MATH__"); in InitializePredefinedMacros()
1050 Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))"); in InitializePredefinedMacros()
1051 Builder.defineMacro("__strong", "__attribute__((objc_gc(strong)))"); in InitializePredefinedMacros()
1052 Builder.defineMacro("__autoreleasing", ""); in InitializePredefinedMacros()
1053 Builder.defineMacro("__unsafe_unretained", ""); in InitializePredefinedMacros()
1055 Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))"); in InitializePredefinedMacros()
1056 Builder.defineMacro("__strong", "__attribute__((objc_ownership(strong)))"); in InitializePredefinedMacros()
1057 Builder.defineMacro("__autoreleasing", in InitializePredefinedMacros()
1059 Builder.defineMacro("__unsafe_unretained", in InitializePredefinedMacros()
1066 Builder.defineMacro("__nonnull", "_Nonnull"); in InitializePredefinedMacros()
1067 Builder.defineMacro("__null_unspecified", "_Null_unspecified"); in InitializePredefinedMacros()
1068 Builder.defineMacro("__nullable", "_Nullable"); in InitializePredefinedMacros()
1074 Builder.defineMacro("__APPLE_EMBEDDED_SIMULATOR__", "1"); in InitializePredefinedMacros()
1087 Builder.defineMacro("_OPENMP", "201107"); in InitializePredefinedMacros()
1090 Builder.defineMacro("_OPENMP", "201307"); in InitializePredefinedMacros()
1093 Builder.defineMacro("_OPENMP", "201511"); in InitializePredefinedMacros()
1097 Builder.defineMacro("_OPENMP", "201811"); in InitializePredefinedMacros()
1106 Builder.defineMacro("__CUDA_ARCH__"); in InitializePredefinedMacros()
1112 Builder.defineMacro("__CLANG_CUDA_APPROX_TRANSCENDENTALS__"); in InitializePredefinedMacros()
1118 Builder.defineMacro("__SYCL_DEVICE_ONLY__", "1"); in InitializePredefinedMacros()
1125 Builder.defineMacro(#Ext); in InitializePredefinedMacros()
1129 Builder.defineMacro("__IMAGE_SUPPORT__"); in InitializePredefinedMacros()
1136 Builder.defineMacro("__GLIBCXX_TYPE_INT_N_0", "__int128"); in InitializePredefinedMacros()
1137 Builder.defineMacro("__GLIBCXX_BITSIZE_INT_N_0", "128"); in InitializePredefinedMacros()
1141 TI.getTargetDefines(LangOpts, Builder); in InitializePredefinedMacros()
1155 MacroBuilder Builder(Predefines); in InitializePreprocessor() local
1161 Builder.append("# 1 \"<built-in>\" 3"); in InitializePreprocessor()
1170 PP.getPreprocessorOpts(), Builder); in InitializePreprocessor()
1173 PP.getPreprocessorOpts(), Builder); in InitializePreprocessor()
1185 AddObjCXXARCLibstdcxxDefines(LangOpts, Builder); in InitializePreprocessor()
1195 FEOpts, Builder); in InitializePreprocessor()
1200 Builder.append("# 1 \"<command line>\" 1"); in InitializePreprocessor()
1205 Builder.undefineMacro(InitOpts.Macros[i].first); in InitializePreprocessor()
1207 DefineBuiltinMacro(Builder, InitOpts.Macros[i].first, in InitializePreprocessor()
1213 Builder.append("# 1 \"<built-in>\" 2"); in InitializePreprocessor()
1218 AddImplicitIncludeMacros(Builder, InitOpts.MacroIncludes[i]); in InitializePreprocessor()
1222 AddImplicitIncludePCH(Builder, PP, PCHContainerRdr, in InitializePreprocessor()
1228 AddImplicitInclude(Builder, Path); in InitializePreprocessor()