mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1754668 - Adjust clang trunk patches. r=firefox-build-system-reviewers,andi
llvmorg-13-init-8182-gc2297544c047 was finally backed out upstream which means we don't need to revert it or its followups (llvmorg-14-init-3651-g85ba583eba19 and llvmorg-14-init-3652-gf3c2094d8c11) Differential Revision: https://phabricator.services.mozilla.com/D138399
This commit is contained in:
parent
194a013384
commit
dbc7289949
@ -1,6 +1,6 @@
|
||||
{
|
||||
"patches": [
|
||||
"static-llvm-symbolizer_clang_12.patch",
|
||||
"static-llvm-symbolizer_clang_15.patch",
|
||||
"compiler-rt-cross-compile.patch",
|
||||
"find_symbolizer_linux_clang_10.patch",
|
||||
"android-mangling-error_clang_12.patch",
|
||||
@ -10,9 +10,6 @@
|
||||
"Remove-FlushViewOfFile-when-unmaping-gcda-files.patch",
|
||||
"loosen-msvc-detection.patch",
|
||||
"fuzzing_ccov_build_clang_12.patch",
|
||||
"compiler-rt-13-no-codesign.patch",
|
||||
"revert-llvmorg-14-init-3652-gf3c2094d8c11-clang-14.patch",
|
||||
"revert-llvmorg-14-init-3651-g85ba583eba19-clang-14.patch",
|
||||
"revert-llvmorg-13-init-8182-gc2297544c047.patch"
|
||||
"compiler-rt-13-no-codesign.patch"
|
||||
]
|
||||
}
|
||||
|
@ -1,64 +0,0 @@
|
||||
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
|
||||
index 7ee4cdbb6ef0..5e7f7c0c68b6 100644
|
||||
--- a/clang/lib/CodeGen/CGCall.cpp
|
||||
+++ b/clang/lib/CodeGen/CGCall.cpp
|
||||
@@ -2091,6 +2091,24 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
|
||||
// allows it to work on indirect virtual function calls.
|
||||
if (AttrOnCallSite && TargetDecl->hasAttr<NoMergeAttr>())
|
||||
FuncAttrs.addAttribute(llvm::Attribute::NoMerge);
|
||||
+
|
||||
+ // Add known guaranteed alignment for allocation functions.
|
||||
+ if (unsigned BuiltinID = Fn->getBuiltinID()) {
|
||||
+ switch (BuiltinID) {
|
||||
+ case Builtin::BIaligned_alloc:
|
||||
+ case Builtin::BIcalloc:
|
||||
+ case Builtin::BImalloc:
|
||||
+ case Builtin::BImemalign:
|
||||
+ case Builtin::BIrealloc:
|
||||
+ case Builtin::BIstrdup:
|
||||
+ case Builtin::BIstrndup:
|
||||
+ RetAttrs.addAlignmentAttr(Context.getTargetInfo().getNewAlign() /
|
||||
+ Context.getTargetInfo().getCharWidth());
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
// 'const', 'pure' and 'noalias' attributed functions are also nounwind.
|
||||
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
|
||||
index f2a043ee3135..d0e65cd677da 100644
|
||||
--- a/clang/lib/Sema/SemaDecl.cpp
|
||||
+++ b/clang/lib/Sema/SemaDecl.cpp
|
||||
@@ -15313,30 +15313,6 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
|
||||
FD->addAttr(CUDAHostAttr::CreateImplicit(Context, FD->getLocation()));
|
||||
}
|
||||
|
||||
- // Add known guaranteed alignment for allocation functions.
|
||||
- switch (BuiltinID) {
|
||||
- case Builtin::BImemalign:
|
||||
- case Builtin::BIaligned_alloc:
|
||||
- case Builtin::BIcalloc:
|
||||
- case Builtin::BImalloc:
|
||||
- case Builtin::BIrealloc:
|
||||
- case Builtin::BIstrdup:
|
||||
- case Builtin::BIstrndup: {
|
||||
- if (!FD->hasAttr<AssumeAlignedAttr>()) {
|
||||
- unsigned NewAlign = Context.getTargetInfo().getNewAlign() /
|
||||
- Context.getTargetInfo().getCharWidth();
|
||||
- IntegerLiteral *Alignment = IntegerLiteral::Create(
|
||||
- Context, Context.MakeIntValue(NewAlign, Context.UnsignedIntTy),
|
||||
- Context.UnsignedIntTy, FD->getLocation());
|
||||
- FD->addAttr(AssumeAlignedAttr::CreateImplicit(
|
||||
- Context, Alignment, /*Offset=*/nullptr, FD->getLocation()));
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- default:
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
// Add allocsize attribute for allocation functions.
|
||||
switch (BuiltinID) {
|
||||
case Builtin::BIcalloc:
|
@ -1,15 +0,0 @@
|
||||
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
|
||||
index fce33991c4aa..f2a043ee3135 100644
|
||||
--- a/clang/lib/Sema/SemaDecl.cpp
|
||||
+++ b/clang/lib/Sema/SemaDecl.cpp
|
||||
@@ -15317,10 +15317,6 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
|
||||
switch (BuiltinID) {
|
||||
case Builtin::BImemalign:
|
||||
case Builtin::BIaligned_alloc:
|
||||
- if (!FD->hasAttr<AllocAlignAttr>())
|
||||
- FD->addAttr(AllocAlignAttr::CreateImplicit(Context, ParamIdx(1, FD),
|
||||
- FD->getLocation()));
|
||||
- LLVM_FALLTHROUGH;
|
||||
case Builtin::BIcalloc:
|
||||
case Builtin::BImalloc:
|
||||
case Builtin::BIrealloc:
|
12
build/build-clang/static-llvm-symbolizer_clang_15.patch
Normal file
12
build/build-clang/static-llvm-symbolizer_clang_15.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/llvm/tools/llvm-symbolizer/CMakeLists.txt b/llvm/tools/llvm-symbolizer/CMakeLists.txt
|
||||
index f1a6087c0047..faf51c9b5c45 100644
|
||||
--- a/llvm/tools/llvm-symbolizer/CMakeLists.txt
|
||||
+++ b/llvm/tools/llvm-symbolizer/CMakeLists.txt
|
||||
@@ -18,6 +18,7 @@ set(LLVM_LINK_COMPONENTS
|
||||
)
|
||||
|
||||
add_llvm_tool(llvm-symbolizer
|
||||
+ DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
llvm-symbolizer.cpp
|
||||
|
||||
DEPENDS
|
Loading…
Reference in New Issue
Block a user