mini-llvm 0.1.0
Loading...
Searching...
No Matches
IRReader.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <optional>
6#include <string>
7#include <vector>
8
10#include "mini-llvm/ir/Module.h"
12
13namespace mini_llvm::ir {
14
15MINI_LLVM_EXPORT std::optional<Module> parseModule(const char *source);
16
17inline std::optional<Module> parseModule(const std::string &source) {
18 return parseModule(source.c_str());
19}
20
21MINI_LLVM_EXPORT std::optional<Module> parseModule(const char *source, std::vector<Diagnostic> &diags);
22
23inline std::optional<Module> parseModule(const std::string &source, std::vector<Diagnostic> &diags) {
24 return parseModule(source.c_str(), diags);
25}
26
27} // namespace mini_llvm::ir
#define MINI_LLVM_EXPORT
Definition Compiler.h:17
Definition Argument.h:13
MINI_LLVM_EXPORT std::optional< Module > parseModule(const char *source)