mini-llvm
0.1.0
Toggle main menu visibility
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
9
#include "
mini-llvm/common/Diagnostic.h
"
10
#include "
mini-llvm/ir/Module.h
"
11
#include "
mini-llvm/utils/Compiler.h
"
12
13
namespace
mini_llvm::ir
{
14
15
MINI_LLVM_EXPORT
std::optional<Module>
parseModule
(
const
char
*source);
16
17
inline
std::optional<Module>
parseModule
(
const
std::string &source) {
18
return
parseModule
(source.c_str());
19
}
20
21
MINI_LLVM_EXPORT
std::optional<Module>
parseModule
(
const
char
*source, std::vector<Diagnostic> &diags);
22
23
inline
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
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
Diagnostic.h
Module.h
mini_llvm::ir
Definition
Argument.h:13
mini_llvm::ir::parseModule
MINI_LLVM_EXPORT std::optional< Module > parseModule(const char *source)
include
mini-llvm
ir_reader
IRReader.h
Generated by
1.17.0