Index: clang/include/clang/Basic/CodeGenOptions.def =================================================================== --- clang/include/clang/Basic/CodeGenOptions.def +++ clang/include/clang/Basic/CodeGenOptions.def @@ -68,8 +68,7 @@ CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new ///< pass manager. CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled. -CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of - ///< '-g' + 'O>0' level. +CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info. CODEGENOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation verify ///< each (it means check ///< the original debug info Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -1645,7 +1645,7 @@ llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::mips, llvm::Triple::mipsel, llvm::Triple::mips64, llvm::Triple::mips64el}; - if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() && + if (Opts.hasReducedDebugInfo() && llvm::is_contained(DebugEntryValueArchs, T.getArch())) Opts.EmitCallSiteInfo = true; Index: llvm/include/llvm/Target/TargetOptions.h =================================================================== --- llvm/include/llvm/Target/TargetOptions.h +++ llvm/include/llvm/Target/TargetOptions.h @@ -303,8 +303,8 @@ std::shared_ptr BBSectionsFuncListBuf; /// The flag enables call site info production. It is used only for debug - /// info, and it is restricted only to optimized code. This can be used for - /// something else, so that should be controlled in the frontend. + /// info. This can be used for something else, so that should be controlled + /// in the frontend. unsigned EmitCallSiteInfo : 1; /// Set if the target supports the debug entry values by default. unsigned SupportsDebugEntryValues : 1;