v.g.vassilev updated this revision to Diff 520286. v.g.vassilev added a comment.
Provide a better test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148435/new/ https://reviews.llvm.org/D148435 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/Interpreter/execute-weak.cpp Index: clang/test/Interpreter/execute-weak.cpp =================================================================== --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -9,4 +9,8 @@ auto r4 = printf("bar() = %d\n", bar()); // CHECK: bar() = 42 +int a = 12; +static __typeof(a) b __attribute__((__weakref__("a"))); +int c = b; + %quit Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -7230,7 +7230,6 @@ "Newly created module should not have manglings"); NewBuilder->Manglings = std::move(Manglings); - assert(WeakRefReferences.empty() && "Not all WeakRefRefs have been applied"); NewBuilder->WeakRefReferences = std::move(WeakRefReferences); NewBuilder->TBAA = std::move(TBAA);
Index: clang/test/Interpreter/execute-weak.cpp =================================================================== --- clang/test/Interpreter/execute-weak.cpp +++ clang/test/Interpreter/execute-weak.cpp @@ -9,4 +9,8 @@ auto r4 = printf("bar() = %d\n", bar()); // CHECK: bar() = 42 +int a = 12; +static __typeof(a) b __attribute__((__weakref__("a"))); +int c = b; + %quit Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -7230,7 +7230,6 @@ "Newly created module should not have manglings"); NewBuilder->Manglings = std::move(Manglings); - assert(WeakRefReferences.empty() && "Not all WeakRefRefs have been applied"); NewBuilder->WeakRefReferences = std::move(WeakRefReferences); NewBuilder->TBAA = std::move(TBAA);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits