From 3773b7dda5b2d9147ea373fec1515000056665f0 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 5 Jul 2023 09:56:39 +0200 Subject: [PATCH 1/4] [clang] Revert changes to emitLLVMUsed These were part of commit 2abc4e82da ("Mark implicit members coming from a PCH as used."). The other change to forgetDecl has already been removed in commit 853b6222d5 ("Import LLVM r302975."), and clearing the vectors LLVMUsed and LLVMCompilerUsed does not seem needed because CodeGenerator::StartModule will swap the entire CodeGenModule. --- interpreter/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/interpreter/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp b/interpreter/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp index 1f47c4edda42f..4255578d82087 100644 --- a/interpreter/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp +++ b/interpreter/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp @@ -2243,9 +2243,7 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name, void CodeGenModule::emitLLVMUsed() { emitUsed(*this, "llvm.used", LLVMUsed); - LLVMUsed.clear(); emitUsed(*this, "llvm.compiler.used", LLVMCompilerUsed); - LLVMCompilerUsed.clear(); } void CodeGenModule::AppendLinkerOptions(StringRef Opts) { From 6ee21669d3a1593c22ec36cebe4213de9199b9a5 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 5 Jul 2023 10:29:58 +0200 Subject: [PATCH 2/4] [clang] Revert changes to SourceManager::isBeforeInTranslationUnit For an optimized build, llvm_unreachable will print a warning, but if assertions are enabled it has the same effects as assert(0). As we don't see this assertion in recent times, this change is probably not relevant anymore. --- interpreter/llvm-project/clang/lib/Basic/SourceManager.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/interpreter/llvm-project/clang/lib/Basic/SourceManager.cpp b/interpreter/llvm-project/clang/lib/Basic/SourceManager.cpp index 42abc2963c2c3..a00edddfa3823 100644 --- a/interpreter/llvm-project/clang/lib/Basic/SourceManager.cpp +++ b/interpreter/llvm-project/clang/lib/Basic/SourceManager.cpp @@ -2095,10 +2095,7 @@ bool SourceManager::isBeforeInTranslationUnit(SourceLocation LHS, return LIsScratch; return LOffs.second < ROffs.second; } - //AXEL: Work around diags from include chains not rooted in main file. - //AXEL: llvm_unreachable("Unsortable locations found"); - assert(0 && "Unsortable locations found"); - return LOffs.first < ROffs.first; + llvm_unreachable("Unsortable locations found"); } std::pair SourceManager::isInTheSameTranslationUnit( From 969d16e3b812155d4b83bdaaebf7a93f5ea74a0a Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 5 Jul 2023 11:27:13 +0200 Subject: [PATCH 3/4] [clang] Revert change in SourceLocation::isBeforeInTranslationUnitThan I believe that all locations have a SourceManager nowadays, even from the command line. --- .../llvm-project/clang/include/clang/Basic/SourceLocation.h | 1 - 1 file changed, 1 deletion(-) diff --git a/interpreter/llvm-project/clang/include/clang/Basic/SourceLocation.h b/interpreter/llvm-project/clang/include/clang/Basic/SourceLocation.h index 28810d21763e2..540de23b9f55e 100644 --- a/interpreter/llvm-project/clang/include/clang/Basic/SourceLocation.h +++ b/interpreter/llvm-project/clang/include/clang/Basic/SourceLocation.h @@ -431,7 +431,6 @@ class FullSourceLoc : public SourceLocation { /// \returns true if this source location comes before 'Loc', false otherwise. bool isBeforeInTranslationUnitThan(FullSourceLoc Loc) const { assert(Loc.isValid()); - if (!SrcMgr) return true; // assume command line is before Loc assert(SrcMgr == Loc.SrcMgr && "Loc comes from another SourceManager!"); return isBeforeInTranslationUnitThan((SourceLocation)Loc); } From 12cf7d2012b26e9403e6c6e0eb3df8d18577265c Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Fri, 7 Jul 2023 09:56:23 +0200 Subject: [PATCH 4/4] [llvm-project] Bump to tag ROOT-llvm13-20230707-01 --- interpreter/llvm-project/llvm-project.tag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreter/llvm-project/llvm-project.tag b/interpreter/llvm-project/llvm-project.tag index cdffb187bc861..d866fa6a7f1b2 100644 --- a/interpreter/llvm-project/llvm-project.tag +++ b/interpreter/llvm-project/llvm-project.tag @@ -1 +1 @@ -ROOT-llvm13-20230704-01 +ROOT-llvm13-20230707-01