mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 08:54:25 +00:00
CI: point LLVM's DIA SDK at the installed Visual Studio; semantic index for the language server
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
84cbbb3e16
commit
ae363b1fa3
10 changed files with 268 additions and 12 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "codegen.h"
|
||||
#include "error.h"
|
||||
#include "index.h"
|
||||
|
||||
#include <llvm/IR/Constants.h>
|
||||
#include <llvm/IR/DIBuilder.h>
|
||||
|
|
@ -29,6 +30,7 @@ struct StructInfo {
|
|||
const Expr *init = nullptr; // default value
|
||||
bool hidden = false; // C union/bitfield padding: has no name in Finch
|
||||
unsigned llvmIndex = 0; // C structs carry explicit padding between fields
|
||||
Pos pos; // Finch structs: where the field is declared
|
||||
};
|
||||
std::vector<F> fields;
|
||||
llvm::StructType *llvm = nullptr;
|
||||
|
|
@ -55,6 +57,7 @@ struct Var {
|
|||
bool owned = false; // dropped when its scope ends
|
||||
int order = 0; // declaration order, for defer
|
||||
bool moved = false; // returned out of the function: not dropped on that path
|
||||
Pos pos; // where it was declared
|
||||
};
|
||||
|
||||
struct Cleanup {
|
||||
|
|
@ -259,6 +262,11 @@ public:
|
|||
Value_ emitCCall(const CFunc &f, llvm::Function *fn, std::vector<Value_> args, Pos p);
|
||||
llvm::Function *cThunk(Fn &fn, Pos p);
|
||||
|
||||
// ---------- language server index ----------
|
||||
void note(Pos at, size_t len, const std::string &hover, Pos def = Pos{});
|
||||
std::string signature(const Fn &fn);
|
||||
std::string structHover(StructInfo *s);
|
||||
|
||||
// ---------- debug info ----------
|
||||
void setLoc(Pos p);
|
||||
llvm::DIType *diType(const FType &t);
|
||||
|
|
|
|||
Loading…
Reference in a new issue