Skip to content

Instantly share code, notes, and snippets.

@doe300
doe300 / BitcodeReader.cpp.patch
Created May 25, 2021 17:40
VC4C clang 11 compilation fix
diff --git a/src/llvm/BitcodeReader.cpp b/src/llvm/BitcodeReader.cpp
index 0d1a512..60fec72 100644
--- a/src/llvm/BitcodeReader.cpp
+++ b/src/llvm/BitcodeReader.cpp
@@ -126,7 +126,7 @@ BitcodeReader::BitcodeReader(std::istream& stream, SourceType sourceType) : cont
llvm::SMDiagnostic error;
llvmModule = llvm::parseIR(buf->getMemBufferRef(), error, context);
if(!llvmModule)
- throw CompilationError(CompilationStep::PARSER, "Error parsing LLVM IR module", error.getMessage());
+ throw CompilationError(CompilationStep::PARSER, "Error parsing LLVM IR module", static_cast<std::string>(error.getMessage()));
@doe300
doe300 / test_gpuserv_sync.cpp
Created May 25, 2021 15:24
VPU firmware assertion reproducer
extern "C"
{
#include "interface/vcsm/user-vcsm.h"
// XXX: The below libraries are missing the "extern "C"" guard!
#include "interface/vmcs_host/vchost.h"
#include "interface/vmcs_host/vc_vchi_gpuserv.h"
}
#include <algorithm>
#include <array>
@doe300
doe300 / test.cpp
Created March 17, 2018 07:55
Clang format test default for https://github.com/doe300/VC4C
/*
* Author: doe300
*
* See the file "LICENSE" for the full license governing this code.
*/
#ifndef VC4C_METHOD_H
#define VC4C_METHOD_H
#include "BasicBlock.h"
@doe300
doe300 / test.cpp
Last active March 17, 2018 07:56
Clang format test custom for https://github.com/doe300/VC4C
/*
* Author: doe300
*
* See the file "LICENSE" for the full license governing this code.
*/
#ifndef VC4C_METHOD_H
#define VC4C_METHOD_H
#include "BasicBlock.h"