This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'main.7rcbfp3g-cgu.0' | |
source_filename = "main.7rcbfp3g-cgu.0" | |
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.7.0" | |
%Reader = type { [0 x i64], { i8*, i64 }, [0 x i64], i64, [0 x i64] } | |
%"fmt::Arguments" = type { [0 x i64], { [0 x { [0 x i8]*, i64 }]*, i64 }, [0 x i64], { i64*, i64 }, [0 x i64], { [0 x { i8*, i64* }]*, i64 }, [0 x i64] } | |
define internal fastcc { i8*, i64 } @_ZN3lib5Slice10into_value17hd068c2a4c36b2989E(i8* nonnull align 1 %0, i64 %1) unnamed_addr #6 { | |
%3 = insertvalue { i8*, i64 } undef, i8* %0, 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/diesel-rs/diesel/blob/7ff5e6327d5e88095cb4b342da13bf06d6d0d1cd/examples/postgres/all_about_updates/src/lib.rs | |
// after running through `cargo expand` | |
#![feature(prelude_import)] | |
#[prelude_import] | |
use std::prelude::v1::*; | |
#[macro_use] | |
extern crate std; | |
use std::time::SystemTime; | |
use diesel::prelude::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// c++ -o dptest depfile_parser.cc util.cc edit_distance.cc metrics.cc dptest.cc -std=c++11 | |
#include <stdio.h> | |
#include <assert.h> | |
#include "depfile_parser.h" | |
int main(int argc, char **argv) { | |
assert(argc == 2); | |
string err; | |
DepfileParser parser; | |
printf("input: {%s}\n", argv[1]); | |
string arg(argv[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <signal.h> | |
#include <assert.h> | |
static void interrupted(int s) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'confused.ll' | |
source_filename = "boke.7rcbfp3g-cgu.2" | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-macosx10.7.0" | |
%"alloc::vec::Vec<i32>" = type { [0 x i64], { i32*, i64 }, [0 x i64], i64, [0 x i64] } | |
%"alloc::vec::Vec<u8>" = type { [0 x i64], { i8*, i64 }, [0 x i64], i64, [0 x i64] } | |
%"unwind::libunwind::_Unwind_Exception" = type { [0 x i64], i64, [0 x i64], void (i32, %"unwind::libunwind::_Unwind_Exception"*)*, [0 x i64], [6 x i64], [0 x i64] } | |
%"unwind::libunwind::_Unwind_Context" = type { [0 x i8] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mod private { | |
pub trait Super { | |
fn foo(self); | |
} | |
pub trait Child: Super {} | |
impl Super for u32 { | |
fn foo(self) {} | |
} | |
impl Child for u32 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int add_example(int a, int b); | |
template <> struct std::call_abi<add_example> { | |
// caller_stub is force-inlined into everyone who calls add_example: | |
int &caller_stub(int a, int b) { | |
regs.rdi = (uint64_t)a; | |
regs.rsi = (uint64_t)b; | |
callee_stub(); | |
return regs.rax; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyType my_function(int arg1, int arg2); | |
int add_example(int a, int b); | |
template <> struct std::call_abi<add_example> { | |
// caller_stub is force-inlined into everyone who calls add_example: | |
int &caller_stub(int a, int b) { | |
regs.rdi = (uint64_t)a; | |
regs.rsi = (uint64_t)b; | |
callee_stub(); | |
return regs.rax; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(non_camel_case_types)] | |
type pthread_t = usize; | |
extern { | |
fn pthread_testcancel(); | |
fn pthread_self() -> pthread_t; | |
fn pthread_cancel(pt: pthread_t) -> i32; | |
} | |
struct NoisyDrop; | |
impl Drop for NoisyDrop { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <threads.h> | |
#include <stdatomic.h> | |
#include "librace.h" | |
#include "model-assert.h" | |
std::atomic_int x; | |
std::atomic_int side_channel; | |
std::atomic_int tests_synchronization; |