Clean up the diagnostocs header file

This commit is contained in:
Sameer Rahmani 2022-02-12 21:06:59 +00:00
parent bc3908a958
commit b210e3a349
6 changed files with 14 additions and 99 deletions

View File

@ -234,9 +234,10 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
OPTIONAL_COMPONENTS dia)
if(Doxygen_FOUND)
message(STATUS "Found Doxygen, building the docs")
add_subdirectory(docs)
else()
message(STATUS "Doxygen not found, not building docs")
message(STATUS "Doxygen not found, not building the docs")
endif()
endif()
endif()

View File

@ -135,7 +135,7 @@ function build-release() { ## Builds the project in "Release" mode
function build-docs() { ## Builds the documentation of Serene
clean
pushed_build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Docs "$ROOT_DIR"
cmake -G Ninja -DSERENE_ENABLE_DOCS=ON "$ROOT_DIR"
cmake --build .
popd_build
}

View File

@ -84,6 +84,9 @@ protected:
void writeColorByType(llvm::raw_ostream &os, llvm::StringRef str);
};
/// DiagnosticEngine is the central hub for dealing with errors in Serene. It
/// integrates with MLIR's diag engine and LLVM's error system to handle error
/// reporting for Serene's compiler
class DiagnosticEngine {
SereneContext &ctx;
@ -108,6 +111,10 @@ public:
/// `SereneContext`
std::unique_ptr<DiagnosticEngine> makeDiagnosticEngine(SereneContext &ctx);
// ----------------------------------------------------------------------------
// Public API
// ----------------------------------------------------------------------------
/// Throw out an error with the given \p and terminate the execution.
SERENE_EXPORT void panic(SereneContext &ctx, llvm::Twine msg);

View File

@ -46,7 +46,7 @@ using MaybeNode = llvm::Expected<Node>;
using Ast = std::vector<Node>;
using MaybeAst = llvm::Expected<Ast>;
static auto EmptyNode = nullptr;
constexpr static auto EmptyNode = nullptr;
/// The base class of the expressions which provides the common interface for
/// the expressions to implement.

View File

@ -40,13 +40,12 @@ SERENE_EXPORT void registerSereneCLOptions();
/// function has to be called after `llvm::cl::ParseCommandLineOptions`.
SERENE_EXPORT void applySereneCLOptions(SereneContext &ctx);
/// Reads the the given \p input as a Serene source code in the given
/// \brief Reads the the given \p input as Serene source code in the given
/// \c SereneContext \p ctx and returns the possible AST tree of the input or an
/// error otherwise.
///
/// In case of an error Serene will throw the error messages vis the diagnostic
/// engine as well and the error that this function returns will be the generic
/// error message.
/// If any thing goes wrong it will return an \return \c llvm::Error describing
/// the issue.
///
/// Be aware than this function reads the input in the context of the current
/// namespace. So for example if the input is somthing like:

View File

@ -1,92 +0,0 @@
// DO NOT EDIT THIS FILE: It is aute generated by './builder
// gen_precompile_index'
#ifndef SERENE_PRECOMPIL_H
#define SERENE_PRECOMPIL_H
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Identifier.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MemoryBuffer.h"
#include <llvm/ADT/ArrayRef.h>
#include <llvm/ADT/Optional.h>
#include <llvm/ADT/STLExtras.h>
#include <llvm/ADT/SmallString.h>
#include <llvm/ADT/StringRef.h>
#include <llvm/ExecutionEngine/JITEventListener.h>
#include <llvm/ExecutionEngine/ObjectCache.h>
#include <llvm/ExecutionEngine/Orc/CompileUtils.h>
#include <llvm/ExecutionEngine/Orc/ExecutionUtils.h>
#include <llvm/ExecutionEngine/Orc/IRCompileLayer.h>
#include <llvm/ExecutionEngine/Orc/IRTransformLayer.h>
#include <llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h>
#include <llvm/ExecutionEngine/Orc/LLJIT.h>
#include <llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h>
#include <llvm/ExecutionEngine/SectionMemoryManager.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/Value.h>
#include <llvm/Support/Casting.h>
#include <llvm/Support/CodeGen.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/Debug.h>
#include <llvm/Support/ErrorHandling.h>
#include <llvm/Support/FileSystem.h>
#include <llvm/Support/FormatVariadic.h>
#include <llvm/Support/Host.h>
#include <llvm/Support/Path.h>
#include <llvm/Support/TargetRegistry.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/ToolOutputFile.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Target/TargetMachine.h>
#include <llvm/Target/TargetOptions.h>
#include <mlir/Conversion/AffineToStandard/AffineToStandard.h>
#include <mlir/Conversion/SCFToStandard/SCFToStandard.h>
#include <mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h>
#include <mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h>
#include <mlir/Dialect/Affine/IR/AffineOps.h>
#include <mlir/Dialect/LLVMIR/LLVMDialect.h>
#include <mlir/Dialect/MemRef/IR/MemRef.h>
#include <mlir/Dialect/SCF/SCF.h>
#include <mlir/Dialect/StandardOps/IR/Ops.h>
#include <mlir/ExecutionEngine/ExecutionEngine.h>
#include <mlir/ExecutionEngine/OptUtils.h>
#include <mlir/IR/Block.h>
#include <mlir/IR/Builders.h>
#include <mlir/IR/BuiltinOps.h>
#include <mlir/IR/MLIRContext.h>
#include <mlir/IR/OperationSupport.h>
#include <mlir/IR/OwningOpRef.h>
#include <mlir/IR/Value.h>
#include <mlir/Pass/Pass.h>
#include <mlir/Pass/PassManager.h>
#include <mlir/Support/FileUtilities.h>
#include <mlir/Support/LLVM.h>
#include <mlir/Support/LogicalResult.h>
#include <mlir/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.h>
#include <mlir/Target/LLVMIR/ModuleTranslation.h>
#include <mlir/Transforms/DialectConversion.h>
#endif