[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-08-22 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From 629683d9236c34b8e5c4bde01dcbe5a2b7c306c0 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. --- cl

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-07-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From d2d533d0962e4260f052179c199a2e5ebe44edb1 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. --- cl

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-10 Thread Vassil Vassilev via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: rm -f %t.pch +// RUN: %clang_cc1 -fmax-type-align=16 -pic-level 2 -fdeprecated-macro -stack-protector 1 -fblocks -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0 -triple

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-10 Thread Lang Hames via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: rm -f %t.pch +// RUN: %clang_cc1 -fmax-type-align=16 -pic-level 2 -fdeprecated-macro -stack-protector 1 -fblocks -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0 -triple

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
@@ -138,6 +138,8 @@ namespace { assert(!M && "Replacing existing Module?"); M.reset(new llvm::Module(ExpandModuleName(ModuleName, CodeGenOpts), C)); + IRGenFinished = false; vgvassilev wrote: It's a double negation: it is /not/ finished when

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
@@ -282,6 +288,8 @@ namespace { } void HandleTranslationUnit(ASTContext &Ctx) override { + IRGenFinished = true; vgvassilev wrote: Good point. I guess I was avoiding this early return which I have now removed. In fact this change fixed some of t

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From 896f3090ca2eadf650459caee9a4106fc7dd381d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. --- cl

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Aaron Ballman via cfe-commits
@@ -282,6 +288,8 @@ namespace { } void HandleTranslationUnit(ASTContext &Ctx) override { + IRGenFinished = true; AaronBallman wrote: shouldn't this be set at the end of `HandleTranslationUnit` rather than the beginning? https://github.com/llvm/

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Aaron Ballman via cfe-commits
@@ -138,6 +138,8 @@ namespace { assert(!M && "Replacing existing Module?"); M.reset(new llvm::Module(ExpandModuleName(ModuleName, CodeGenOpts), C)); + IRGenFinished = false; AaronBallman wrote: Why is IR gen *finished* when we're just startin

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-02 Thread Vassil Vassilev via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: rm -f %t.pch +// RUN: %clang_cc1 -fmax-type-align=16 -pic-level 2 -fdeprecated-macro -stack-protector 1 -fblocks -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0 -triple

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Vassil Vassilev (vgvassilev) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/94166.diff 6 Files Affected: - (modified) clang/include/clang/CodeGen/ModuleBuilder.h (+6) - (modified) clang/lib/CodeGen/BackendCon

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/94166 None >From 896f3090ca2eadf650459caee9a4106fc7dd381d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH] [clang-repl] Teach clang-repl how to load PCHs. ---