Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thiw would corrupt the stack if it reaches here. That's the problem can be triggered by generated code.

Copy link
Member Author

@hahnjo hahnjo Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I see... So you prefer to keep this patch for now? (edit: see also my argument above about initializeVirtualFile)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. I believe that the initializeVirtualFile is not sufficient in the cases where we generate code (via the ast synthesizers) where we pass invalid source locations. However, it might be worth to try. Let's ask cmssw.

}

std::pair<bool, bool> SourceManager::isInTheSameTranslationUnit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm-project.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ROOT-llvm13-20230704-01
ROOT-llvm13-20230707-01