[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

Lang Hames via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 13 10:07:10 PDT 2021


lhames added a comment.

In D96033#2757222 <https://reviews.llvm.org/D96033#2757222>, @hubert.reinterpretcast wrote:

> ... 
> I have a local build I can apply a patch to.

Hi Hubert,

Could you apply the following patch and let me know the output from the failing test? I'm trying to work out whether the JIT is getting the triple or the data layout wrong.

  diff --git a/clang/tools/clang-repl/ClangRepl.cpp b/clang/tools/clang-repl/ClangRepl.cpp
  index b5b5bf6e0c6b..cbf67f0e163e 100644
  --- a/clang/tools/clang-repl/ClangRepl.cpp
  +++ b/clang/tools/clang-repl/ClangRepl.cpp
  @@ -57,6 +57,12 @@ int main(int argc, const char **argv) {
     llvm::InitializeNativeTarget();
     llvm::InitializeNativeTargetAsmPrinter();
   
  +  auto JTMB = ExitOnErr(llvm::orc::JITTargetMachineBuilder::detectHost());
  +  llvm::errs() << "triple:     " << JTMB.getTargetTriple().str() << "\n";
  +  llvm::errs() << "datalayout: "
  +               << ExitOnErr(JTMB.getDefaultDataLayoutForTarget())
  +                      .getStringRepresentation()
  +               << "\n";
     if (OptHostSupportsJit) {
       auto J = llvm::orc::LLJITBuilder().create();
       if (J)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96033/new/

https://reviews.llvm.org/D96033



More information about the cfe-commits mailing list