[PATCH] D130420: [CodeGen] Consider MangleCtx when move lazy emission States
Jun Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 25 21:44:53 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG58c94808450d: [CodeGen] Consider MangleCtx when move lazy emission States (authored by junaire).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130420/new/
https://reviews.llvm.org/D130420
Files:
clang/lib/CodeGen/CGCXXABI.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/Interpreter/execute.cpp
Index: clang/test/Interpreter/execute.cpp
===================================================================
--- clang/test/Interpreter/execute.cpp
+++ clang/test/Interpreter/execute.cpp
@@ -5,6 +5,7 @@
// UNSUPPORTED: system-aix
// CHECK-DRIVER: i = 10
// RUN: cat %s | clang-repl | FileCheck %s
+// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s
extern "C" int printf(const char *, ...);
int i = 42;
auto r1 = printf("i = %d\n", i);
Index: clang/lib/CodeGen/CodeGenModule.cpp
===================================================================
--- clang/lib/CodeGen/CodeGenModule.cpp
+++ clang/lib/CodeGen/CodeGenModule.cpp
@@ -7000,4 +7000,6 @@
"Still have (unmerged) EmittedDeferredDecls deferred decls");
NewBuilder->EmittedDeferredDecls = std::move(EmittedDeferredDecls);
+
+ NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx);
}
Index: clang/lib/CodeGen/CGCXXABI.h
===================================================================
--- clang/lib/CodeGen/CGCXXABI.h
+++ clang/lib/CodeGen/CGCXXABI.h
@@ -41,6 +41,8 @@
/// Implements C++ ABI-specific code generation functions.
class CGCXXABI {
+ friend class CodeGenModule;
+
protected:
CodeGenModule &CGM;
std::unique_ptr<MangleContext> MangleCtx;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130420.447558.patch
Type: text/x-patch
Size: 1247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220726/394436a8/attachment-0001.bin>
More information about the cfe-commits
mailing list