[Lldb-commits] [lldb] 9aae408 - [NFC] fix typo `funciton` -> `function`

2023-03-10 Thread Yuanfang Chen via lldb-commits

Author: Yuanfang Chen
Date: 2023-03-10T18:05:25-08:00
New Revision: 9aae408d551083bbbac96ecc512d45c30358e4b9

URL: 
https://github.com/llvm/llvm-project/commit/9aae408d551083bbbac96ecc512d45c30358e4b9
DIFF: 
https://github.com/llvm/llvm-project/commit/9aae408d551083bbbac96ecc512d45c30358e4b9.diff

LOG: [NFC] fix typo `funciton` -> `function`

credits to @jmagee

Added: 


Modified: 
clang/include/clang/Basic/DiagnosticGroups.td
clang/test/SemaCXX/coroutine-alloc-4.cpp
flang/lib/Evaluate/intrinsics-library.cpp
lldb/include/lldb/Target/TraceDumper.h
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
llvm/include/llvm/CodeGen/MIRPrinter.h
llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
llvm/include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h
llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp
llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/Transforms/SampleProfile/inline-mergeprof-dup.ll
llvm/tools/llvm-xray/xray-account.cpp
llvm/tools/llvm-xray/xray-graph.cpp

Removed: 




diff  --git a/clang/include/clang/Basic/DiagnosticGroups.td 
b/clang/include/clang/Basic/DiagnosticGroups.td
index d56aba34ac0a..866dca008381 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -65,7 +65,7 @@ def DeprecatedCoroutine :
 def AlwaysInlineCoroutine :
   DiagGroup<"always-inline-coroutine">;
 def CoroNonAlignedAllocationFunction :
-  DiagGroup<"coro-non-aligned-allocation-funciton">;
+  DiagGroup<"coro-non-aligned-allocation-function">;
 def Coroutine : DiagGroup<"coroutine", [CoroutineMissingUnhandledException, 
DeprecatedCoroutine,
 AlwaysInlineCoroutine, 
CoroNonAlignedAllocationFunction]>;
 def ObjCBoolConstantConversion : DiagGroup<"objc-bool-constant-conversion">;

diff  --git a/clang/test/SemaCXX/coroutine-alloc-4.cpp 
b/clang/test/SemaCXX/coroutine-alloc-4.cpp
index acad2779a254..262c163fb178 100644
--- a/clang/test/SemaCXX/coroutine-alloc-4.cpp
+++ b/clang/test/SemaCXX/coroutine-alloc-4.cpp
@@ -1,4 +1,4 @@
-// Tests that we'll find aligned allocation funciton properly.
+// Tests that we'll find aligned allocation function properly.
 // RUN: %clang_cc1 %s -std=c++20 %s -fsyntax-only -verify 
-fcoro-aligned-allocation
 
 #include "Inputs/std-coroutine.h"

diff  --git a/flang/lib/Evaluate/intrinsics-library.cpp 
b/flang/lib/Evaluate/intrinsics-library.cpp
index c333ffeac90c..3a6d28e4ab04 100644
--- a/flang/lib/Evaluate/intrinsics-library.cpp
+++ b/flang/lib/Evaluate/intrinsics-library.cpp
@@ -295,7 +295,7 @@ struct HostRuntimeLibrary, 
LibraryVersion::Libm> {
 /// Define libm extensions
 /// Bessel functions are defined in POSIX.1-2001.
 
-// Remove float bessel funcitons for AIX as they are not supported
+// Remove float bessel functions for AIX as they are not supported
 #ifndef _AIX
 template <> struct HostRuntimeLibrary {
   using F = FuncPointer;

diff  --git a/lldb/include/lldb/Target/TraceDumper.h 
b/lldb/include/lldb/Target/TraceDumper.h
index ca3bf2c08808..ca08dc254182 100644
--- a/lldb/include/lldb/Target/TraceDumper.h
+++ b/lldb/include/lldb/Target/TraceDumper.h
@@ -317,7 +317,7 @@ class TraceDumper {
 FunctionCall(const lldb::TraceCursorSP &cursor_sp,
  const SymbolInfo &symbol_info);
 
-/// Append a new traced segment to this funciton call.
+/// Append a new traced segment to this function call.
 ///
 /// \param[in] cursor_sp
 ///   A cursor pointing to the first instruction of the new segment.

diff  --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp 
b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
index 617181a35d1d..1f7d8a1b8598 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
@@ -172,7 +172,7 @@ CPlusPlusNameParser::ParseFuncPtr(bool expect_return_type) {
   //
   // Consume inner function name. This will fail unless
   // we stripped all the pointers on the left hand side
-  // of the funciton name.
+  // of the function name.
   {
 Bookmark before_inner_function_pos = SetBookmark();
 auto maybe_inner_function_name = ParseFunctionImpl(false);

diff  --git a/llvm/include/llvm/CodeGen/MIRPrinter.h 
b/llvm/include/llvm/CodeGen/MIRPrinter.h
index 45e30686b642..5e94418d5fe0 100644
--- a/llvm/include/llvm/CodeGen/MIRPrinter.h
+++ b/llvm/include/llvm/CodeGen/MIRPrinter.h
@@ -34,7 +34,7 @@ void printMIR(raw_ostream &OS, const MachineFunction &MF);
 /// you the correct list of successor blocks in most cases except for things
 /// like jump tables where the basic block references can't easily be found.
 /// 

[Lldb-commits] [lldb] [Clang] Fix crash when ill-formed code is treated as a deduction guide (PR #67373)

2023-09-29 Thread Yuanfang Chen via lldb-commits

https://github.com/yuanfang-chen approved this pull request.

LGTM

https://github.com/llvm/llvm-project/pull/67373
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 5de2d18 - [Diagnose] Unify MCContext and LLVMContext diagnosing

2021-03-01 Thread Yuanfang Chen via lldb-commits

Author: Yuanfang Chen
Date: 2021-03-01T15:58:37-08:00
New Revision: 5de2d189e6ad466a1f0616195e8c524a4eb3cbc0

URL: 
https://github.com/llvm/llvm-project/commit/5de2d189e6ad466a1f0616195e8c524a4eb3cbc0
DIFF: 
https://github.com/llvm/llvm-project/commit/5de2d189e6ad466a1f0616195e8c524a4eb3cbc0.diff

LOG: [Diagnose] Unify MCContext and LLVMContext diagnosing

The situation with inline asm/MC error reporting is kind of messy at the
moment. The errors from MC layout are not reliably propagated and users
have to specify an inlineasm handler separately to get inlineasm
diagnose. The latter issue is not a correctness issue but could be improved.

* Kill LLVMContext inlineasm diagnose handler and migrate it to use
  DiagnoseInfo/DiagnoseHandler.
* Introduce `DiagnoseInfoSrcMgr` to diagnose SourceMgr backed errors. This
  covers use cases like inlineasm, MC, and any clients using SourceMgr.
* Move AsmPrinter::SrcMgrDiagInfo and its instance to MCContext. The next step
  is to combine MCContext::SrcMgr and MCContext::InlineSrcMgr because in all
  use cases, only one of them is used.
* If LLVMContext is available, let MCContext uses LLVMContext's diagnose
  handler; if LLVMContext is not available, MCContext uses its own default
  diagnose handler which just prints SMDiagnostic.
* Change a few clients(Clang, llc, lldb) to use the new way of reporting.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D97449

Added: 


Modified: 
clang/include/clang/Basic/DiagnosticCategories.td
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/lib/CodeGen/CodeGenAction.cpp
lldb/source/Expression/IRExecutionUnit.cpp
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/IR/DiagnosticInfo.h
llvm/include/llvm/IR/LLVMContext.h
llvm/include/llvm/MC/MCContext.h
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/lib/CodeGen/MachineModuleInfo.cpp
llvm/lib/IR/DiagnosticInfo.cpp
llvm/lib/IR/LLVMContext.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCParser/AsmParser.cpp
llvm/test/CodeGen/AMDGPU/lds-initializer.ll
llvm/test/CodeGen/AMDGPU/lds-zero-initializer.ll
llvm/test/CodeGen/XCore/section-name.ll
llvm/tools/llc/llc.cpp

Removed: 




diff  --git a/clang/include/clang/Basic/DiagnosticCategories.td 
b/clang/include/clang/Basic/DiagnosticCategories.td
index d7203173790e..fb6bdd710741 100644
--- a/clang/include/clang/Basic/DiagnosticCategories.td
+++ b/clang/include/clang/Basic/DiagnosticCategories.td
@@ -7,4 +7,5 @@
 
//===--===//
 
 class CatInlineAsm : DiagCategory<"Inline Assembly Issue">;
+class CatSourceMgr : DiagCategory<"SourceMgr Reported Issue">;
 class CatBackend : DiagCategory<"Backend Issue">;

diff  --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td 
b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
index b9f8c78e43da..831f906ffac8 100644
--- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -19,6 +19,10 @@ def err_fe_inline_asm : Error<"%0">, CatInlineAsm;
 def warn_fe_inline_asm : Warning<"%0">, CatInlineAsm, 
InGroup;
 def note_fe_inline_asm : Note<"%0">, CatInlineAsm;
 def note_fe_inline_asm_here : Note<"instantiated into assembly here">;
+def err_fe_source_mgr : Error<"%0">, CatSourceMgr;
+def warn_fe_source_mgr : Warning<"%0">, CatSourceMgr, 
InGroup;
+def note_fe_source_mgr : Note<"%0">, CatSourceMgr;
+def remark_fe_source_mgr: Remark<"%0">, CatSourceMgr, 
InGroup;
 def err_fe_cannot_link_module : Error<"cannot link module '%0': %1">,
   DefaultFatal;
 

diff  --git a/clang/include/clang/Basic/DiagnosticGroups.td 
b/clang/include/clang/Basic/DiagnosticGroups.td
index 1a1ce66656f5..81d78c69cc44 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -1145,6 +1145,7 @@ def OpenMP : DiagGroup<"openmp", [
 
 // Backend warnings.
 def BackendInlineAsm : DiagGroup<"inline-asm">;
+def BackendSourceMgr : DiagGroup<"source-mgr">;
 def BackendFrameLargerThanEQ : DiagGroup<"frame-larger-than=">;
 def BackendPlugin : DiagGroup<"backend-plugin">;
 def RemarkBackendPlugin : DiagGroup<"remark-backend-plugin">;

diff  --git a/clang/lib/CodeGen/CodeGenAction.cpp 
b/clang/lib/CodeGen/CodeGenAction.cpp
index 6853926f4362..ff56b2902c54 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -301,14 +301,7 @@ namespace clang {
   if (!getModule())
 return;
 
-  // Install an inline asm handler so that diagnostics get printed through
-  // our diagnostics hooks.
   LLVMContext &Ctx = getModule()->getContext();
-  LLVMContext::InlineAsmDiagHandlerTy OldHandler =
-Ctx.getInlineAsmDiagnosticHandler

[Lldb-commits] [lldb] r366647 - [lldb] Fix buildbot build fail caused by r366645

2019-10-04 Thread Yuanfang Chen via lldb-commits
Author: yuanfang
Date: Sat Jul 20 17:07:39 2019
New Revision: 366647

URL: http://llvm.org/viewvc/llvm-project?rev=366647&view=rev
Log:
[lldb] Fix buildbot build fail caused by r366645

Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Modified: 
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=366647&r1=366646&r2=366647&view=diff
==
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp 
Sat Jul 20 17:07:39 2019
@@ -537,8 +537,8 @@ ClangExpressionParser::ClangExpressionPa
   // Set CodeGen options
   m_compiler->getCodeGenOpts().EmitDeclMetadata = true;
   m_compiler->getCodeGenOpts().InstrumentFunctions = false;
-  m_compiler->getCodeGenOpts().DisableFPElim = true;
-  m_compiler->getCodeGenOpts().OmitLeafFramePointer = false;
+  m_compiler->getCodeGenOpts().setFramePointer(
+CodeGenOptions::FramePointerKind::All);
   if (generate_debug_info)
 m_compiler->getCodeGenOpts().setDebugInfo(codegenoptions::FullDebugInfo);
   else


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits