Lines Matching refs:Builder
41 static void DefineBuiltinMacro(MacroBuilder &Builder, StringRef Macro, in DefineBuiltinMacro() argument
57 Builder.defineMacro(MacroName, Twine(MacroBody) + "\\\n"); in DefineBuiltinMacro()
59 Builder.defineMacro(MacroName, MacroBody); in DefineBuiltinMacro()
62 Builder.defineMacro(Macro); in DefineBuiltinMacro()
70 static void AddImplicitInclude(MacroBuilder &Builder, StringRef File) { in AddImplicitInclude() argument
71 Builder.append(Twine("#include \"") + File + "\""); in AddImplicitInclude()
74 static void AddImplicitIncludeMacros(MacroBuilder &Builder, StringRef File) { in AddImplicitIncludeMacros() argument
75 Builder.append(Twine("#__include_macros \"") + File + "\""); in AddImplicitIncludeMacros()
77 Builder.append("##"); // ##? in AddImplicitIncludeMacros()
82 static void AddImplicitIncludePTH(MacroBuilder &Builder, Preprocessor &PP, in AddImplicitIncludePTH() argument
94 AddImplicitInclude(Builder, OriginalFile); in AddImplicitIncludePTH()
99 static void AddImplicitIncludePCH(MacroBuilder &Builder, Preprocessor &PP, in AddImplicitIncludePCH() argument
107 AddImplicitInclude(Builder, OriginalFile); in AddImplicitIncludePCH()
128 static void DefineFloatMacros(MacroBuilder &Builder, StringRef Prefix, in DefineFloatMacros() argument
160 Builder.defineMacro(DefPrefix + "DENORM_MIN__", Twine(DenormMin)+Ext); in DefineFloatMacros()
161 Builder.defineMacro(DefPrefix + "HAS_DENORM__"); in DefineFloatMacros()
162 Builder.defineMacro(DefPrefix + "DIG__", Twine(Digits)); in DefineFloatMacros()
163 Builder.defineMacro(DefPrefix + "DECIMAL_DIG__", Twine(DecimalDigits)); in DefineFloatMacros()
164 Builder.defineMacro(DefPrefix + "EPSILON__", Twine(Epsilon)+Ext); in DefineFloatMacros()
165 Builder.defineMacro(DefPrefix + "HAS_INFINITY__"); in DefineFloatMacros()
166 Builder.defineMacro(DefPrefix + "HAS_QUIET_NAN__"); in DefineFloatMacros()
167 Builder.defineMacro(DefPrefix + "MANT_DIG__", Twine(MantissaDigits)); in DefineFloatMacros()
169 Builder.defineMacro(DefPrefix + "MAX_10_EXP__", Twine(Max10Exp)); in DefineFloatMacros()
170 Builder.defineMacro(DefPrefix + "MAX_EXP__", Twine(MaxExp)); in DefineFloatMacros()
171 Builder.defineMacro(DefPrefix + "MAX__", Twine(Max)+Ext); in DefineFloatMacros()
173 Builder.defineMacro(DefPrefix + "MIN_10_EXP__","("+Twine(Min10Exp)+")"); in DefineFloatMacros()
174 Builder.defineMacro(DefPrefix + "MIN_EXP__", "("+Twine(MinExp)+")"); in DefineFloatMacros()
175 Builder.defineMacro(DefPrefix + "MIN__", Twine(Min)+Ext); in DefineFloatMacros()
184 MacroBuilder &Builder) { in DefineTypeSize() argument
187 Builder.defineMacro(MacroName, MaxVal.toString(10, isSigned) + ValSuffix); in DefineTypeSize()
193 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeSize() argument
195 TI.isTypeSigned(Ty), Builder); in DefineTypeSize()
199 const TargetInfo &TI, MacroBuilder &Builder) { in DefineFmt() argument
203 Builder.defineMacro(Prefix + "_FMT" + Twine(*Fmt) + "__", in DefineFmt()
209 MacroBuilder &Builder) { in DefineType() argument
210 Builder.defineMacro(MacroName, TargetInfo::getTypeName(Ty)); in DefineType()
214 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeWidth() argument
215 Builder.defineMacro(MacroName, Twine(TI.getTypeWidth(Ty))); in DefineTypeWidth()
219 const TargetInfo &TI, MacroBuilder &Builder) { in DefineTypeSizeof() argument
220 Builder.defineMacro(MacroName, in DefineTypeSizeof()
226 MacroBuilder &Builder) { in DefineExactWidthIntType() argument
237 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineExactWidthIntType()
238 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineExactWidthIntType()
241 Builder.defineMacro(Prefix + Twine(TypeWidth) + "_C_SUFFIX__", ConstSuffix); in DefineExactWidthIntType()
246 MacroBuilder &Builder) { in DefineExactWidthIntTypeSize() argument
256 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineExactWidthIntTypeSize()
261 MacroBuilder &Builder) { in DefineLeastWidthIntType() argument
267 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineLeastWidthIntType()
268 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineLeastWidthIntType()
269 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineLeastWidthIntType()
273 const TargetInfo &TI, MacroBuilder &Builder) { in DefineFastIntType() argument
281 DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); in DefineFastIntType()
282 DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); in DefineFastIntType()
284 DefineFmt(Prefix + Twine(TypeWidth), Ty, TI, Builder); in DefineFastIntType()
305 MacroBuilder &Builder) { in AddObjCXXARCLibstdcxxDefines() argument
306 Builder.defineMacro("_GLIBCXX_PREDEFINED_OBJC_ARC_IS_SCALAR"); in AddObjCXXARCLibstdcxxDefines()
352 Builder.append(Result); in AddObjCXXARCLibstdcxxDefines()
358 MacroBuilder &Builder) { in InitializeStandardPredefinedMacros() argument
360 Builder.defineMacro("__STDC__"); in InitializeStandardPredefinedMacros()
362 Builder.defineMacro("__STDC_HOSTED__", "0"); in InitializeStandardPredefinedMacros()
364 Builder.defineMacro("__STDC_HOSTED__"); in InitializeStandardPredefinedMacros()
368 Builder.defineMacro("__STDC_VERSION__", "201112L"); in InitializeStandardPredefinedMacros()
370 Builder.defineMacro("__STDC_VERSION__", "199901L"); in InitializeStandardPredefinedMacros()
372 Builder.defineMacro("__STDC_VERSION__", "199409L"); in InitializeStandardPredefinedMacros()
376 Builder.defineMacro("__cplusplus", "201406L"); in InitializeStandardPredefinedMacros()
381 Builder.defineMacro("__cplusplus", "201402L"); in InitializeStandardPredefinedMacros()
386 Builder.defineMacro("__cplusplus", "201103L"); in InitializeStandardPredefinedMacros()
391 Builder.defineMacro("__cplusplus", "199711L"); in InitializeStandardPredefinedMacros()
399 Builder.defineMacro("__STDC_UTF_16__", "1"); in InitializeStandardPredefinedMacros()
400 Builder.defineMacro("__STDC_UTF_32__", "1"); in InitializeStandardPredefinedMacros()
403 Builder.defineMacro("__OBJC__"); in InitializeStandardPredefinedMacros()
407 Builder.defineMacro("__ASSEMBLER__"); in InitializeStandardPredefinedMacros()
413 MacroBuilder &Builder) { in InitializeCPlusPlusFeatureTestMacros() argument
416 Builder.defineMacro("__cpp_rtti", "199711"); in InitializeCPlusPlusFeatureTestMacros()
418 Builder.defineMacro("__cpp_exceptions", "199711"); in InitializeCPlusPlusFeatureTestMacros()
422 Builder.defineMacro("__cpp_unicode_characters", "200704"); in InitializeCPlusPlusFeatureTestMacros()
423 Builder.defineMacro("__cpp_raw_strings", "200710"); in InitializeCPlusPlusFeatureTestMacros()
424 Builder.defineMacro("__cpp_unicode_literals", "200710"); in InitializeCPlusPlusFeatureTestMacros()
425 Builder.defineMacro("__cpp_user_defined_literals", "200809"); in InitializeCPlusPlusFeatureTestMacros()
426 Builder.defineMacro("__cpp_lambdas", "200907"); in InitializeCPlusPlusFeatureTestMacros()
427 Builder.defineMacro("__cpp_constexpr", in InitializeCPlusPlusFeatureTestMacros()
429 Builder.defineMacro("__cpp_range_based_for", "200907"); in InitializeCPlusPlusFeatureTestMacros()
430 Builder.defineMacro("__cpp_static_assert", "200410"); in InitializeCPlusPlusFeatureTestMacros()
431 Builder.defineMacro("__cpp_decltype", "200707"); in InitializeCPlusPlusFeatureTestMacros()
432 Builder.defineMacro("__cpp_attributes", "200809"); in InitializeCPlusPlusFeatureTestMacros()
433 Builder.defineMacro("__cpp_rvalue_references", "200610"); in InitializeCPlusPlusFeatureTestMacros()
434 Builder.defineMacro("__cpp_variadic_templates", "200704"); in InitializeCPlusPlusFeatureTestMacros()
435 Builder.defineMacro("__cpp_initializer_lists", "200806"); in InitializeCPlusPlusFeatureTestMacros()
436 Builder.defineMacro("__cpp_delegating_constructors", "200604"); in InitializeCPlusPlusFeatureTestMacros()
437 Builder.defineMacro("__cpp_nsdmi", "200809"); in InitializeCPlusPlusFeatureTestMacros()
438 Builder.defineMacro("__cpp_inheriting_constructors", "200802"); in InitializeCPlusPlusFeatureTestMacros()
439 Builder.defineMacro("__cpp_ref_qualifiers", "200710"); in InitializeCPlusPlusFeatureTestMacros()
440 Builder.defineMacro("__cpp_alias_templates", "200704"); in InitializeCPlusPlusFeatureTestMacros()
445 Builder.defineMacro("__cpp_binary_literals", "201304"); in InitializeCPlusPlusFeatureTestMacros()
446 Builder.defineMacro("__cpp_digit_separators", "201309"); in InitializeCPlusPlusFeatureTestMacros()
447 Builder.defineMacro("__cpp_init_captures", "201304"); in InitializeCPlusPlusFeatureTestMacros()
448 Builder.defineMacro("__cpp_generic_lambdas", "201304"); in InitializeCPlusPlusFeatureTestMacros()
449 Builder.defineMacro("__cpp_decltype_auto", "201304"); in InitializeCPlusPlusFeatureTestMacros()
450 Builder.defineMacro("__cpp_return_type_deduction", "201304"); in InitializeCPlusPlusFeatureTestMacros()
451 Builder.defineMacro("__cpp_aggregate_nsdmi", "201304"); in InitializeCPlusPlusFeatureTestMacros()
452 Builder.defineMacro("__cpp_variable_templates", "201304"); in InitializeCPlusPlusFeatureTestMacros()
455 Builder.defineMacro("__cpp_sized_deallocation", "201309"); in InitializeCPlusPlusFeatureTestMacros()
461 MacroBuilder &Builder) { in InitializePredefinedMacros() argument
463 Builder.defineMacro("__llvm__"); // LLVM Backend in InitializePredefinedMacros()
464 Builder.defineMacro("__clang__"); // Clang Frontend in InitializePredefinedMacros()
467 Builder.defineMacro("__clang_major__", TOSTR(CLANG_VERSION_MAJOR)); in InitializePredefinedMacros()
468 Builder.defineMacro("__clang_minor__", TOSTR(CLANG_VERSION_MINOR)); in InitializePredefinedMacros()
470 Builder.defineMacro("__clang_patchlevel__", TOSTR(CLANG_VERSION_PATCHLEVEL)); in InitializePredefinedMacros()
472 Builder.defineMacro("__clang_patchlevel__", "0"); in InitializePredefinedMacros()
474 Builder.defineMacro("__clang_version__", in InitializePredefinedMacros()
482 Builder.defineMacro("__GNUC_MINOR__", "2"); in InitializePredefinedMacros()
483 Builder.defineMacro("__GNUC_PATCHLEVEL__", "1"); in InitializePredefinedMacros()
484 Builder.defineMacro("__GNUC__", "4"); in InitializePredefinedMacros()
485 Builder.defineMacro("__GXX_ABI_VERSION", "1002"); in InitializePredefinedMacros()
489 Builder.defineMacro("__ATOMIC_RELAXED", "0"); in InitializePredefinedMacros()
490 Builder.defineMacro("__ATOMIC_CONSUME", "1"); in InitializePredefinedMacros()
491 Builder.defineMacro("__ATOMIC_ACQUIRE", "2"); in InitializePredefinedMacros()
492 Builder.defineMacro("__ATOMIC_RELEASE", "3"); in InitializePredefinedMacros()
493 Builder.defineMacro("__ATOMIC_ACQ_REL", "4"); in InitializePredefinedMacros()
494 Builder.defineMacro("__ATOMIC_SEQ_CST", "5"); in InitializePredefinedMacros()
497 Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1"); in InitializePredefinedMacros()
502 Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " + in InitializePredefinedMacros()
509 Builder.defineMacro("__STRICT_ANSI__"); in InitializePredefinedMacros()
512 Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__"); in InitializePredefinedMacros()
516 Builder.defineMacro("__OBJC2__"); in InitializePredefinedMacros()
519 Builder.defineMacro("OBJC_ZEROCOST_EXCEPTIONS"); in InitializePredefinedMacros()
523 Builder.defineMacro("__OBJC_GC__"); in InitializePredefinedMacros()
526 Builder.defineMacro("__NEXT_RUNTIME__"); in InitializePredefinedMacros()
539 Builder.defineMacro("__OBJFW_RUNTIME_ABI__", in InitializePredefinedMacros()
544 Builder.defineMacro("IBOutlet", "__attribute__((iboutlet))"); in InitializePredefinedMacros()
545 Builder.defineMacro("IBOutletCollection(ClassName)", in InitializePredefinedMacros()
547 Builder.defineMacro("IBAction", "void)__attribute__((ibaction)"); in InitializePredefinedMacros()
548 Builder.defineMacro("IBInspectable", ""); in InitializePredefinedMacros()
549 Builder.defineMacro("IB_DESIGNABLE", ""); in InitializePredefinedMacros()
553 InitializeCPlusPlusFeatureTestMacros(LangOpts, Builder); in InitializePredefinedMacros()
558 Builder.defineMacro("__CONSTANT_CFSTRINGS__"); in InitializePredefinedMacros()
561 Builder.defineMacro("OBJC_NEW_PROPERTIES"); in InitializePredefinedMacros()
564 Builder.defineMacro("__PASCAL_STRINGS__"); in InitializePredefinedMacros()
567 Builder.defineMacro("__block", "__attribute__((__blocks__(byref)))"); in InitializePredefinedMacros()
568 Builder.defineMacro("__BLOCKS__"); in InitializePredefinedMacros()
572 Builder.defineMacro("__EXCEPTIONS"); in InitializePredefinedMacros()
574 Builder.defineMacro("__GXX_RTTI"); in InitializePredefinedMacros()
576 Builder.defineMacro("__USING_SJLJ_EXCEPTIONS__"); in InitializePredefinedMacros()
579 Builder.defineMacro("__DEPRECATED"); in InitializePredefinedMacros()
582 Builder.defineMacro("__GNUG__", "4"); in InitializePredefinedMacros()
583 Builder.defineMacro("__GXX_WEAK__"); in InitializePredefinedMacros()
584 Builder.defineMacro("__private_extern__", "extern"); in InitializePredefinedMacros()
590 Builder.defineMacro("_WCHAR_T_DEFINED"); in InitializePredefinedMacros()
591 Builder.defineMacro("_NATIVE_WCHAR_T_DEFINED"); in InitializePredefinedMacros()
596 Builder.defineMacro("__OPTIMIZE__"); in InitializePredefinedMacros()
598 Builder.defineMacro("__OPTIMIZE_SIZE__"); in InitializePredefinedMacros()
601 Builder.defineMacro("__FAST_MATH__"); in InitializePredefinedMacros()
610 Builder.defineMacro("__ORDER_LITTLE_ENDIAN__", "1234"); in InitializePredefinedMacros()
611 Builder.defineMacro("__ORDER_BIG_ENDIAN__", "4321"); in InitializePredefinedMacros()
612 Builder.defineMacro("__ORDER_PDP_ENDIAN__", "3412"); in InitializePredefinedMacros()
614 Builder.defineMacro("__BYTE_ORDER__", "__ORDER_BIG_ENDIAN__"); in InitializePredefinedMacros()
615 Builder.defineMacro("__BIG_ENDIAN__"); in InitializePredefinedMacros()
617 Builder.defineMacro("__BYTE_ORDER__", "__ORDER_LITTLE_ENDIAN__"); in InitializePredefinedMacros()
618 Builder.defineMacro("__LITTLE_ENDIAN__"); in InitializePredefinedMacros()
623 Builder.defineMacro("_LP64"); in InitializePredefinedMacros()
624 Builder.defineMacro("__LP64__"); in InitializePredefinedMacros()
629 Builder.defineMacro("_ILP32"); in InitializePredefinedMacros()
630 Builder.defineMacro("__ILP32__"); in InitializePredefinedMacros()
635 Builder.defineMacro("__CHAR_BIT__", "8"); in InitializePredefinedMacros()
637 DefineTypeSize("__SCHAR_MAX__", TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
638 DefineTypeSize("__SHRT_MAX__", TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
639 DefineTypeSize("__INT_MAX__", TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
640 DefineTypeSize("__LONG_MAX__", TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
641 DefineTypeSize("__LONG_LONG_MAX__", TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
642 DefineTypeSize("__WCHAR_MAX__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
643 DefineTypeSize("__INTMAX_MAX__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
644 DefineTypeSize("__SIZE_MAX__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
646 DefineTypeSize("__UINTMAX_MAX__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
647 DefineTypeSize("__PTRDIFF_MAX__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
648 DefineTypeSize("__INTPTR_MAX__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
649 DefineTypeSize("__UINTPTR_MAX__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
651 DefineTypeSizeof("__SIZEOF_DOUBLE__", TI.getDoubleWidth(), TI, Builder); in InitializePredefinedMacros()
652 DefineTypeSizeof("__SIZEOF_FLOAT__", TI.getFloatWidth(), TI, Builder); in InitializePredefinedMacros()
653 DefineTypeSizeof("__SIZEOF_INT__", TI.getIntWidth(), TI, Builder); in InitializePredefinedMacros()
654 DefineTypeSizeof("__SIZEOF_LONG__", TI.getLongWidth(), TI, Builder); in InitializePredefinedMacros()
655 DefineTypeSizeof("__SIZEOF_LONG_DOUBLE__",TI.getLongDoubleWidth(),TI,Builder); in InitializePredefinedMacros()
656 DefineTypeSizeof("__SIZEOF_LONG_LONG__", TI.getLongLongWidth(), TI, Builder); in InitializePredefinedMacros()
657 DefineTypeSizeof("__SIZEOF_POINTER__", TI.getPointerWidth(0), TI, Builder); in InitializePredefinedMacros()
658 DefineTypeSizeof("__SIZEOF_SHORT__", TI.getShortWidth(), TI, Builder); in InitializePredefinedMacros()
660 TI.getTypeWidth(TI.getPtrDiffType(0)), TI, Builder); in InitializePredefinedMacros()
662 TI.getTypeWidth(TI.getSizeType()), TI, Builder); in InitializePredefinedMacros()
664 TI.getTypeWidth(TI.getWCharType()), TI, Builder); in InitializePredefinedMacros()
666 TI.getTypeWidth(TI.getWIntType()), TI, Builder); in InitializePredefinedMacros()
668 DefineTypeSizeof("__SIZEOF_INT128__", 128, TI, Builder); in InitializePredefinedMacros()
670 DefineType("__INTMAX_TYPE__", TI.getIntMaxType(), Builder); in InitializePredefinedMacros()
671 DefineFmt("__INTMAX", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
672 Builder.defineMacro("__INTMAX_C_SUFFIX__", in InitializePredefinedMacros()
674 DefineType("__UINTMAX_TYPE__", TI.getUIntMaxType(), Builder); in InitializePredefinedMacros()
675 DefineFmt("__UINTMAX", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
676 Builder.defineMacro("__UINTMAX_C_SUFFIX__", in InitializePredefinedMacros()
678 DefineTypeWidth("__INTMAX_WIDTH__", TI.getIntMaxType(), TI, Builder); in InitializePredefinedMacros()
679 DefineType("__PTRDIFF_TYPE__", TI.getPtrDiffType(0), Builder); in InitializePredefinedMacros()
680 DefineFmt("__PTRDIFF", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
681 DefineTypeWidth("__PTRDIFF_WIDTH__", TI.getPtrDiffType(0), TI, Builder); in InitializePredefinedMacros()
682 DefineType("__INTPTR_TYPE__", TI.getIntPtrType(), Builder); in InitializePredefinedMacros()
683 DefineFmt("__INTPTR", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
684 DefineTypeWidth("__INTPTR_WIDTH__", TI.getIntPtrType(), TI, Builder); in InitializePredefinedMacros()
685 DefineType("__SIZE_TYPE__", TI.getSizeType(), Builder); in InitializePredefinedMacros()
686 DefineFmt("__SIZE", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
687 DefineTypeWidth("__SIZE_WIDTH__", TI.getSizeType(), TI, Builder); in InitializePredefinedMacros()
688 DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder); in InitializePredefinedMacros()
689 DefineTypeWidth("__WCHAR_WIDTH__", TI.getWCharType(), TI, Builder); in InitializePredefinedMacros()
690 DefineType("__WINT_TYPE__", TI.getWIntType(), Builder); in InitializePredefinedMacros()
691 DefineTypeWidth("__WINT_WIDTH__", TI.getWIntType(), TI, Builder); in InitializePredefinedMacros()
692 DefineTypeWidth("__SIG_ATOMIC_WIDTH__", TI.getSigAtomicType(), TI, Builder); in InitializePredefinedMacros()
693 DefineTypeSize("__SIG_ATOMIC_MAX__", TI.getSigAtomicType(), TI, Builder); in InitializePredefinedMacros()
694 DefineType("__CHAR16_TYPE__", TI.getChar16Type(), Builder); in InitializePredefinedMacros()
695 DefineType("__CHAR32_TYPE__", TI.getChar32Type(), Builder); in InitializePredefinedMacros()
697 DefineTypeWidth("__UINTMAX_WIDTH__", TI.getUIntMaxType(), TI, Builder); in InitializePredefinedMacros()
698 DefineType("__UINTPTR_TYPE__", TI.getUIntPtrType(), Builder); in InitializePredefinedMacros()
699 DefineFmt("__UINTPTR", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
700 DefineTypeWidth("__UINTPTR_WIDTH__", TI.getUIntPtrType(), TI, Builder); in InitializePredefinedMacros()
702 DefineFloatMacros(Builder, "FLT", &TI.getFloatFormat(), "F"); in InitializePredefinedMacros()
703 DefineFloatMacros(Builder, "DBL", &TI.getDoubleFormat(), ""); in InitializePredefinedMacros()
704 DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L"); in InitializePredefinedMacros()
707 Builder.defineMacro("__POINTER_WIDTH__", in InitializePredefinedMacros()
711 Builder.defineMacro("__BIGGEST_ALIGNMENT__", in InitializePredefinedMacros()
715 Builder.defineMacro("__CHAR_UNSIGNED__"); in InitializePredefinedMacros()
718 Builder.defineMacro("__WCHAR_UNSIGNED__"); in InitializePredefinedMacros()
721 Builder.defineMacro("__WINT_UNSIGNED__"); in InitializePredefinedMacros()
724 DefineExactWidthIntType(TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
727 DefineExactWidthIntType(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
730 DefineExactWidthIntType(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
733 DefineExactWidthIntType(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
736 DefineExactWidthIntType(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
738 DefineExactWidthIntType(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
739 DefineExactWidthIntTypeSize(TargetInfo::UnsignedChar, TI, Builder); in InitializePredefinedMacros()
740 DefineExactWidthIntTypeSize(TargetInfo::SignedChar, TI, Builder); in InitializePredefinedMacros()
743 DefineExactWidthIntType(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
744 DefineExactWidthIntTypeSize(TargetInfo::UnsignedShort, TI, Builder); in InitializePredefinedMacros()
745 DefineExactWidthIntTypeSize(TargetInfo::SignedShort, TI, Builder); in InitializePredefinedMacros()
749 DefineExactWidthIntType(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
750 DefineExactWidthIntTypeSize(TargetInfo::UnsignedInt, TI, Builder); in InitializePredefinedMacros()
751 DefineExactWidthIntTypeSize(TargetInfo::SignedInt, TI, Builder); in InitializePredefinedMacros()
755 DefineExactWidthIntType(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
756 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLong, TI, Builder); in InitializePredefinedMacros()
757 DefineExactWidthIntTypeSize(TargetInfo::SignedLong, TI, Builder); in InitializePredefinedMacros()
761 DefineExactWidthIntType(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
762 DefineExactWidthIntTypeSize(TargetInfo::UnsignedLongLong, TI, Builder); in InitializePredefinedMacros()
763 DefineExactWidthIntTypeSize(TargetInfo::SignedLongLong, TI, Builder); in InitializePredefinedMacros()
766 DefineLeastWidthIntType(8, true, TI, Builder); in InitializePredefinedMacros()
767 DefineLeastWidthIntType(8, false, TI, Builder); in InitializePredefinedMacros()
768 DefineLeastWidthIntType(16, true, TI, Builder); in InitializePredefinedMacros()
769 DefineLeastWidthIntType(16, false, TI, Builder); in InitializePredefinedMacros()
770 DefineLeastWidthIntType(32, true, TI, Builder); in InitializePredefinedMacros()
771 DefineLeastWidthIntType(32, false, TI, Builder); in InitializePredefinedMacros()
772 DefineLeastWidthIntType(64, true, TI, Builder); in InitializePredefinedMacros()
773 DefineLeastWidthIntType(64, false, TI, Builder); in InitializePredefinedMacros()
775 DefineFastIntType(8, true, TI, Builder); in InitializePredefinedMacros()
776 DefineFastIntType(8, false, TI, Builder); in InitializePredefinedMacros()
777 DefineFastIntType(16, true, TI, Builder); in InitializePredefinedMacros()
778 DefineFastIntType(16, false, TI, Builder); in InitializePredefinedMacros()
779 DefineFastIntType(32, true, TI, Builder); in InitializePredefinedMacros()
780 DefineFastIntType(32, false, TI, Builder); in InitializePredefinedMacros()
781 DefineFastIntType(64, true, TI, Builder); in InitializePredefinedMacros()
782 DefineFastIntType(64, false, TI, Builder); in InitializePredefinedMacros()
785 Builder.defineMacro("__USER_LABEL_PREFIX__", Prefix); in InitializePredefinedMacros()
788 Builder.defineMacro("__FINITE_MATH_ONLY__", "1"); in InitializePredefinedMacros()
790 Builder.defineMacro("__FINITE_MATH_ONLY__", "0"); in InitializePredefinedMacros()
794 Builder.defineMacro("__GNUC_GNU_INLINE__"); in InitializePredefinedMacros()
796 Builder.defineMacro("__GNUC_STDC_INLINE__"); in InitializePredefinedMacros()
800 Builder.defineMacro("__GCC_ATOMIC_TEST_AND_SET_TRUEVAL", "1"); in InitializePredefinedMacros()
805 Builder.defineMacro("__GCC_ATOMIC_" #TYPE "_LOCK_FREE", \ in InitializePredefinedMacros()
818 Builder.defineMacro("__GCC_ATOMIC_POINTER_LOCK_FREE", in InitializePredefinedMacros()
826 Builder.defineMacro("__NO_INLINE__"); in InitializePredefinedMacros()
829 Builder.defineMacro("__PIC__", Twine(PICLevel)); in InitializePredefinedMacros()
830 Builder.defineMacro("__pic__", Twine(PICLevel)); in InitializePredefinedMacros()
833 Builder.defineMacro("__PIE__", Twine(PIELevel)); in InitializePredefinedMacros()
834 Builder.defineMacro("__pie__", Twine(PIELevel)); in InitializePredefinedMacros()
838 Builder.defineMacro("__FLT_EVAL_METHOD__", Twine(TI.getFloatEvalMethod())); in InitializePredefinedMacros()
839 Builder.defineMacro("__FLT_RADIX__", "2"); in InitializePredefinedMacros()
840 Builder.defineMacro("__DECIMAL_DIG__", "__LDBL_DECIMAL_DIG__"); in InitializePredefinedMacros()
843 Builder.defineMacro("__SSP__"); in InitializePredefinedMacros()
845 Builder.defineMacro("__SSP_STRONG__", "2"); in InitializePredefinedMacros()
847 Builder.defineMacro("__SSP_ALL__", "3"); in InitializePredefinedMacros()
850 Builder.defineMacro("__weak", "__attribute__((objc_gc(weak)))"); in InitializePredefinedMacros()
854 Builder.defineMacro("__clang_analyzer__"); in InitializePredefinedMacros()
857 Builder.defineMacro("__FAST_RELAXED_MATH__"); in InitializePredefinedMacros()
860 Builder.defineMacro("__weak", "__attribute__((objc_ownership(weak)))"); in InitializePredefinedMacros()
861 Builder.defineMacro("__strong", "__attribute__((objc_ownership(strong)))"); in InitializePredefinedMacros()
862 Builder.defineMacro("__autoreleasing", in InitializePredefinedMacros()
864 Builder.defineMacro("__unsafe_unretained", in InitializePredefinedMacros()
875 Builder.defineMacro("_OPENMP", "201307"); in InitializePredefinedMacros()
882 Builder.defineMacro("__CUDA_ARCH__"); in InitializePredefinedMacros()
886 TI.getTargetDefines(LangOpts, Builder); in InitializePredefinedMacros()
899 MacroBuilder Builder(Predefines); in InitializePreprocessor() local
905 Builder.append("# 1 \"<built-in>\" 3"); in InitializePreprocessor()
909 InitializePredefinedMacros(PP.getTargetInfo(), LangOpts, FEOpts, Builder); in InitializePreprocessor()
920 AddObjCXXARCLibstdcxxDefines(LangOpts, Builder); in InitializePreprocessor()
930 FEOpts, Builder); in InitializePreprocessor()
935 Builder.append("# 1 \"<command line>\" 1"); in InitializePreprocessor()
940 Builder.undefineMacro(InitOpts.Macros[i].first); in InitializePreprocessor()
942 DefineBuiltinMacro(Builder, InitOpts.Macros[i].first, in InitializePreprocessor()
949 AddImplicitIncludeMacros(Builder, InitOpts.MacroIncludes[i]); in InitializePreprocessor()
953 AddImplicitIncludePCH(Builder, PP, InitOpts.ImplicitPCHInclude); in InitializePreprocessor()
955 AddImplicitIncludePTH(Builder, PP, InitOpts.ImplicitPTHInclude); in InitializePreprocessor()
960 AddImplicitInclude(Builder, Path); in InitializePreprocessor()
965 Builder.append("# 1 \"<built-in>\" 2"); in InitializePreprocessor()