Skip to content

Commit babf726

Browse files
elvinw-inteligcbot
authored andcommitted
Add DebugInfo patch for LLVM15-16
This patch is a generic bug fix, previous llvm14 patch e60884c, this change will add it to llvm15 and 16
1 parent f1a3f7f commit babf726

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

external/llvm/releases/14.0.0/patches_external/fix_DebugTypeInfoRemoval-remap_eval-ambiguity.patch

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ SPDX-License-Identifier: MIT
99
# Description : Fix ambiguous evaluation order
1010

1111
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
12-
index fd4b4170c..a667c6a89 100644
1312
--- a/llvm/lib/IR/DebugInfo.cpp
1413
+++ b/llvm/lib/IR/DebugInfo.cpp
1514
@@ -664,7 +664,12 @@ private:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*========================== begin_copyright_notice ============================
2+
3+
Copyright (C) 2025 Intel Corporation
4+
5+
SPDX-License-Identifier: MIT
6+
7+
============================= end_copyright_notice ===========================*/
8+
9+
# Description : Fix ambiguous evaluation order
10+
11+
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
12+
--- a/llvm/lib/IR/DebugInfo.cpp
13+
+++ b/llvm/lib/IR/DebugInfo.cpp
14+
@@ -664,7 +664,11 @@ private:
15+
16+
return getReplacementMDNode(N);
17+
};
18+
- Replacements[N] = doRemap(N);
19+
+ // Seperate recursive doRemap and operator [] into 2 lines to avoid
20+
+ // out-of-order evaluations since both of them can access the same memory
21+
+ // location in map Replacements.
22+
+ auto Value = doRemap(N);
23+
+ Replacements[N] = Value;
24+
}
25+
26+
/// Do the remapping traversal.
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*========================== begin_copyright_notice ============================
2+
3+
Copyright (C) 2025 Intel Corporation
4+
5+
SPDX-License-Identifier: MIT
6+
7+
============================= end_copyright_notice ===========================*/
8+
9+
# Description : Fix ambiguous evaluation order
10+
11+
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
12+
--- a/llvm/lib/IR/DebugInfo.cpp
13+
+++ b/llvm/lib/IR/DebugInfo.cpp
14+
@@ -683,7 +683,11 @@ private:
15+
16+
return getReplacementMDNode(N);
17+
};
18+
- Replacements[N] = doRemap(N);
19+
+ // Seperate recursive doRemap and operator [] into 2 lines to avoid
20+
+ // out-of-order evaluations since both of them can access the same memory
21+
+ // location in map Replacements.
22+
+ auto Value = doRemap(N);
23+
+ Replacements[N] = Value;
24+
}
25+
26+
/// Do the remapping traversal.
27+

0 commit comments

Comments
 (0)