|
| 1 | +diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp |
| 2 | +index 12d602fed693..e73102544361 100644 |
| 3 | +--- a/clang/lib/CodeGen/CodeGenModule.cpp |
| 4 | ++++ b/clang/lib/CodeGen/CodeGenModule.cpp |
| 5 | +@@ -7202,7 +7202,6 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { |
| 6 | + "Newly created module should not have manglings"); |
| 7 | + NewBuilder->Manglings = std::move(Manglings); |
| 8 | + |
| 9 | +- assert(WeakRefReferences.empty() && "Not all WeakRefRefs have been applied"); |
| 10 | + NewBuilder->WeakRefReferences = std::move(WeakRefReferences); |
| 11 | + |
| 12 | + NewBuilder->TBAA = std::move(TBAA); |
| 13 | +diff --git a/clang/test/Interpreter/execute-weak.cpp b/clang/test/Interpreter/execute-weak.cpp |
| 14 | +index 5b343512c545..66f2214ab03c 100644 |
| 15 | +--- a/clang/test/Interpreter/execute-weak.cpp |
| 16 | ++++ b/clang/test/Interpreter/execute-weak.cpp |
| 17 | +@@ -2,11 +2,16 @@ |
| 18 | + // RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \ |
| 19 | + // RUN: 'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s |
| 20 | + // CHECK-DRIVER: i = 10 |
| 21 | ++// |
| 22 | + // UNSUPPORTED: system-aix, system-windows |
| 23 | + // RUN: cat %s | clang-repl | FileCheck %s |
| 24 | ++ |
| 25 | + extern "C" int printf(const char *, ...); |
| 26 | + int __attribute__((weak)) bar() { return 42; } |
| 27 | + auto r4 = printf("bar() = %d\n", bar()); |
| 28 | + // CHECK: bar() = 42 |
| 29 | + |
| 30 | ++int a = 12; |
| 31 | ++static __typeof(a) b __attribute__((__weakref__("a"))); |
| 32 | ++int c = b; |
| 33 | + %quit |
0 commit comments