diff options
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
| -rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 8602be1..b88d9f8 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -1516,6 +1516,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI,    if (LangOpts.PointerAuthIntrinsics)      Builder.defineMacro("__PTRAUTH__"); +  if (CGOpts.Dwarf2CFIAsm) +    Builder.defineMacro("__GCC_HAVE_DWARF2_CFI_ASM"); +    // Get other target #defines.    TI.getTargetDefines(LangOpts, Builder);  } @@ -1542,6 +1545,9 @@ void clang::InitializePreprocessor(Preprocessor &PP,    llvm::raw_string_ostream Predefines(PredefineBuffer);    MacroBuilder Builder(Predefines); +  // Ensure that the initial value of __COUNTER__ is hooked up. +  PP.setCounterValue(InitOpts.InitialCounterValue); +    // Emit line markers for various builtin sections of the file. The 3 here    // marks <built-in> as being a system header, which suppresses warnings when    // the same macro is defined multiple times.  | 
