Skip to content

Commit 1b57633

Browse files
committed
Adapt LKQL JIT to the new Java GPR API
Also add a test to make sure LKQL is loading projects correctly.
1 parent ba59ff0 commit 1b57633

File tree

7 files changed

+17
-2
lines changed

7 files changed

+17
-2
lines changed

lkql_jit/language/src/main/java/com/adacore/lkql_jit/LKQLContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ public void initSources() {
437437
this.getScenarioVars(),
438438
this.getTarget(),
439439
this.getRuntime(),
440-
this.getConfigFile());
440+
this.getConfigFile(),
441+
true);
441442

442443
// Forward the project diagnostics if there are some
443444
if (!this.projectManager.getDiagnostics().isEmpty()) {
@@ -493,7 +494,7 @@ public void initSources() {
493494
// Load the implicit project
494495
this.projectManager =
495496
Libadalang.ProjectManager.createImplicit(
496-
this.getTarget(), this.getRuntime(), this.getConfigFile());
497+
this.getTarget(), this.getRuntime(), this.getConfigFile(), true);
497498
this.allSourceFiles.addAll(
498499
Arrays.stream(
499500
this.projectManager.getFiles(
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
procedure Main is
2+
begin
3+
null;
4+
end Name;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void other() {
2+
// null
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
project Prj is
2+
for Languages use ("Ada", "Fortran", "C");
3+
end Prj;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print(select CompilationUnit)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[<CompilationUnit main.adb:1:1-4:10>]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
driver: interpreter
2+
project: prj.gpr

0 commit comments

Comments
 (0)