Skip to content

Instantly share code, notes, and snippets.

View chapuni's full-sized avatar

NAKAMURA Takumi chapuni

View GitHub Profile
Failing Tests (21):
libc++ :: libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.sh.cpp
libc++ :: std/depr/depr.c.headers/uchar_h.pass.cpp
libc++ :: std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
libc++ :: std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
libc++ :: std/input.output/filesystems/class.directory_entry/directory_entry.cons/copy.pass.cpp
libc++ :: std/input.output/filesystems/class.directory_entry/directory_entry.cons/copy_assign.pass.cpp
libc++ :: std/input.output/filesystems/class.directory_entry/directory_entry.cons/move.pass.cpp
libc++ :: std/input.output/filesystems/class.directory_entry/directory_entry.cons/move_assign.pass.cpp
libc++ :: std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
@chapuni
chapuni / foo.cc
Created December 2, 2018 10:18
Storage<N>
template <int N, typename T, typename... arg> struct X {
using ty = typename std::conditional<N <= 8 * sizeof(T), T, typename X<N, arg...>::ty>::type;
};
template <int N, typename T> struct X<N, T> {
using ty = typename std::conditional<N <= 8 * sizeof(T), T, void>::type;
};
template <int N>
using Storage = typename X<N, int8_t, int16_t, int32_t, int64_t>::ty;
@chapuni
chapuni / sort.cc
Created October 30, 2017 09:17
Prove how sort was insufficient
#include <algorithm>
#include <iostream>
#include <vector>
static bool cmp(int a, int b) {
return ((a == 3 && b == 0)
|| (a == 4 && b == 2)
|| (a == 5 && b == 1));
}
diff --git a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
index 3b2af11..842cda4 100644
--- a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
+++ b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
@@ -40,7 +40,7 @@ namespace llvm {
/// directly. Clients of MCJIT should call MCJIT::finalizeObject.
class SectionMemoryManager : public RTDyldMemoryManager {
public:
- SectionMemoryManager() = default;
+ SectionMemoryManager();
@chapuni
chapuni / Re-entering getMangledName()
Last active July 28, 2017 01:29
getMangledName crash
clang-3.8: /home/tnakamura/llvm/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:703: llvm::StringRef clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl): Assertion `lvl <= 1' failed.
#0 0x00007f40086e9525 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/tnakamura/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:398:0
#1 0x00007f40086e95b6 PrintStackTraceSignalHandler(void*) /home/tnakamura/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:462:0
#2 0x00007f40086e7ab6 llvm::sys::RunSignalHandlers() /home/tnakamura/llvm/llvm-project/llvm/lib/Support/Signals.cpp:49:0
#3 0x00007f40086e8ebd SignalHandler(int) /home/tnakamura/llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:252:0
#4 0x00007f4005da7cb0 (/lib/x86_64-linux-gnu/libc.so.6+0x36cb0)
#5 0x00007f4005da7c37 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x36c37)
#6 0x00007f4005dab028 abort (/lib/x86_64-linux-gnu/libc.so.6+0x3a028)
#7 0x00007f4005da0bf6 (/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)
#8 0x00007f4005da0ca2 (/lib/x86_64-linux-gnu/l
@chapuni
chapuni / -Rmodule-build
Last active July 18, 2017 14:17
Building modules
[6/312] 6 0.039 Building CXX object utils/modules/CMakeFiles/dummy2.Clang_FrontendTool.dir/Clang_FrontendTool.cpp.o
llvm-project/llvm/utils/modules/Clang_FrontendTool.cpp:1:29: remark: building module 'Clang_FrontendTool' as '2libcxx/module.cache/6JBFW4SX7GFE/Clang_FrontendTool-2ZNT1N6O7YU80.pcm' [-Rmodule-build]
#pragma clang module import Clang_FrontendTool
^
llvm-project/llvm/utils/modules/Clang_FrontendTool.cpp:1:29: remark: finished building module 'Clang_FrontendTool' [-Rmodule-build]
[6/312] 5 0.042 Building CXX object utils/modules/CMakeFiles/dummy2.LLVM_Config_ABI_Breaking.dir/LLVM_Config_ABI_Breaking.cpp.o
llvm-project/llvm/utils/modules/LLVM_Config_ABI_Breaking.cpp:1:29: remark: building module 'LLVM_Config_ABI_Breaking' as '2libcxx/module.cache/6JBFW4SX7GFE/LLVM_Config_ABI_Breaking-1CEIYRIQN3VMW.pcm' [-Rmodule-build]
#pragma clang module import LLVM_Config_ABI_Breaking
^
llvm-project/llvm/utils/modules/LLVM_Config_ABI_Breaking.cpp:1:29: remar
; ModuleID = '<stdin>'
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"
define double @foo(i32 %stat, i32 %i, double** %p) {
entry:
switch i32 %stat, label %sw.default [
i32 0, label %sw.bb
i32 1, label %sw.bb
i32 2, label %entry.sw.bb2_crit_edge
; ModuleID = '<stdin>'
target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
target triple = "aarch64--linux-gnu"
define double @foo(i32 %stat, i32 %i, double** %p) {
entry:
switch i32 %stat, label %sw.default [
i32 0, label %sw.bb
i32 1, label %sw.bb
i32 2, label %entry.sw.bb2_crit_edge
@chapuni
chapuni / GMR.diff
Created September 14, 2015 04:50
Try to fix crash
--- a/llvm/include/llvm/Analysis/GlobalsModRef.h
+++ b/llvm/include/llvm/Analysis/GlobalsModRef.h
@@ -52,11 +52,11 @@ class GlobalsAAResult : public AAResultBase<GlobalsAAResult> {
/// Handle to clear this analysis on deletion of values.
struct DeletionCallbackHandle final : CallbackVH {
- GlobalsAAResult &GAR;
+ GlobalsAAResult *GAR;
std::list<DeletionCallbackHandle>::iterator I;
@chapuni
chapuni / gist:a8f18038922cd5b11b69
Created September 8, 2015 22:37
simple.ll --vg
FAIL: LLVM :: Transforms/LowerBitSets/simple.ll (1 of 1)
******************** TEST 'LLVM :: Transforms/LowerBitSets/simple.ll' FAILED ********************
Script:
--
/home/tnakamura/fio/ninja/1/./bin/opt -S -lowerbitsets < /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll | /home/tnakamura/fio/ninja/1/./bin/FileCheck /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll
/home/tnakamura/fio/ninja/1/./bin/opt -S -lowerbitsets -mtriple=x86_64-apple-macosx10.8.0 < /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll | /home/tnakamura/fio/ninja/1/./bin/FileCheck -check-prefix=CHECK-DARWIN /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll
/home/tnakamura/fio/ninja/1/./bin/opt -S -O3 < /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll | /home/tnakamura/fio/ninja/1/./bin/FileCheck -check-prefix=CHECK-NODISCARD /fio/tnakamura/ninja/llvm-project/llvm/test/Transforms/LowerBitSets/simple.ll