[Lldb-commits] [lldb] r333999 - Silence unhandled enums warning in ClangASTContext::GetEncoding

2018-07-06 Thread Ilya Biryukov via lldb-commits
Author: ibiryukov
Date: Tue Jun  5 03:07:07 2018
New Revision: 333999

URL: http://llvm.org/viewvc/llvm-project?rev=333999&view=rev
Log:
Silence unhandled enums warning in ClangASTContext::GetEncoding

The warning started firing after r333923, which added new builtin
types (fixed point types) into clang.
This patch merely silences the warning to unblock our integrate, does
not aim to support the new types in lldb.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=333999&r1=333998&r2=333999&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Jun  5 03:07:07 2018
@@ -4934,6 +4934,15 @@ lldb::Encoding ClangASTContext::GetEncod
 case clang::BuiltinType::UInt128:
   return lldb::eEncodingUint;
 
+// Fixed point types. Note that they are currently ignored.
+case clang::BuiltinType::ShortAccum:
+case clang::BuiltinType::Accum:
+case clang::BuiltinType::LongAccum:
+case clang::BuiltinType::UShortAccum:
+case clang::BuiltinType::UAccum:
+case clang::BuiltinType::ULongAccum:
+  break;
+
 case clang::BuiltinType::Half:
 case clang::BuiltinType::Float:
 case clang::BuiltinType::Float16:


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


[Lldb-commits] [clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via lldb-commits

ilya-biryukov wrote:

@ChuanqiXu9 the added test fails under ASAN that reports memory leaks:

```
$ cmake -G Ninja -DLLVM_USE_SANITIZER=Address -DCMAKE_CXX_COMPILER=clang 
-DCMAKE_C_COMPILER=clang ../
$ ninja SerializationTests
$ ./tools/clang/unittests/Serialization/SerializationTests
```

produces
```
==4100640==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 32776 byte(s) in 1 object(s) allocated from:
#0 0x559f90ba330c in calloc 
(/usr/local/google/home/ibiryukov/code/llvm-project/build-asan/tools/clang/unittests/Serialization/SerializationTests+0x174d30c)
 (BuildId: 4baf7bfc387b0be3)
#1 0x559f910585eb in safe_calloc 
/usr/local/google/home/ibiryukov/code/llvm-project/llvm/include/llvm/Support/MemAlloc.h:40:18
#2 0x559f910585eb in AllocateBuckets 
/usr/local/google/home/ibiryukov/code/llvm-project/llvm/lib/Support/FoldingSet.cpp:173:40
#3 0x559f910585eb in llvm::FoldingSetBase::FoldingSetBase(unsigned int) 
/usr/local/google/home/ibiryukov/code/llvm-project/llvm/lib/Support/FoldingSet.cpp:187:13
#4 0x559f90f34503 in FoldingSetImpl 
/usr/local/google/home/ibiryukov/code/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:454:9
#5 0x559f90f34503 in ContextualFoldingSet 
/usr/local/google/home/ibiryukov/code/llvm-project/llvm/include/llvm/ADT/FoldingSet.h:636:9
#6 0x559f90f34503 in clang::ASTContext::ASTContext(clang::LangOptions&, 
clang::SourceManager&, clang::IdentifierTable&, clang::SelectorTable&, 
clang::Builtin::Context&, clang::TranslationUnitKind) 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/lib/AST/ASTContext.cpp:920:7
#7 0x559f92667204 in clang::CompilerInstance::createASTContext() 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:553:23
#8 0x559f928ad79a in 
clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, 
clang::FrontendInputFile const&) 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/lib/Frontend/FrontendAction.cpp:948:10
#9 0x559f9266fb7d in 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1061:13
#10 0x559f90c13901 in (anonymous 
namespace)::LoadSpecLazilyTest::GenerateModuleInterface[abi:cxx11](llvm::StringRef,
 llvm::StringRef) 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/unittests/Serialization/LoadSpecLazilyTest.cpp:86:5
#11 0x559f90c18b8b in (anonymous 
namespace)::LoadSpecLazilyTest_ChainedTest2_Test::TestBody() 
/usr/local/google/home/ibiryukov/code/llvm-project/clang/unittests/Serialization/LoadSpecLazilyTest.cpp:227:3
#12 0x559f90e46395 in HandleExceptionsInMethodIfSupported 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc
#13 0x559f90e46395 in testing::Test::Run() 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc:2687:5
#14 0x559f90e48ae2 in testing::TestInfo::Run() 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc:2836:11
#15 0x559f90e4ad74 in testing::TestSuite::Run() 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc:3015:30
#16 0x559f90e82ee8 in testing::internal::UnitTestImpl::RunAllTests() 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc:5920:44
#17 0x559f90e811c7 in 
HandleExceptionsInMethodIfSupported 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc
#18 0x559f90e811c7 in testing::UnitTest::Run() 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/src/gtest.cc:5484:10
#19 0x559f90e08bfa in RUN_ALL_TESTS 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2317:73
#20 0x559f90e08bfa in main 
/usr/local/google/home/ibiryukov/code/llvm-project/third-party/unittest/UnitTestMain/TestMain.cpp:55:10
#21 0x7f0546213c89 in __libc_start_call_main 
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
...
SUMMARY: AddressSanitizer: 488922 byte(s) leaked in 529 allocation(s).
```

Maybe revert the change or is there a simple fix forward?

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


[Lldb-commits] [clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via lldb-commits

ilya-biryukov wrote:

Ah, it's `DisableFree` again. I'll send a fix.

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


[Lldb-commits] [clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2024-12-12 Thread Ilya Biryukov via lldb-commits

ilya-biryukov wrote:

Fixed by 7f4312015291a32d811a0f37e24b4d9736c524f7.

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