Skip to content

Instantly share code, notes, and snippets.

@Edrom01
Edrom01 / lesson5.ll
Created September 14, 2011 08:46
.ll compilation error on windows 7
; ModuleID = 'lesson5.bc'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
target triple = "i686-pc-win32"
%0 = type { %1 }
%1 = type { %struct._POINTL, i32, i32 }
%struct.HBRUSH__ = type { i32 }
%struct.HDC__ = type { i32 }
%struct.HGLRC__ = type { i32 }
%struct.HICON__ = type { i32 }
@Edrom01
Edrom01 / gist:1333335
Created November 2, 2011 10:20
Clang compilation errors on simple std::vector code
emmaken.py: C:\Dev\Code\emscripten2\tools\emmaken.py c:\Dev\Code\test_vector\test_vector\main.cpp -c -fdelayed-template-parsing -DUNICODE -D_UNICODE -DNDEBUG -D_CONSOLE -D_MT -D_DLL -emit-llvm -fms-extensions -fms-compatibility -m32 -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING -UHAVE_GCC_ASM_FOR_X87 -U__STRICT_ANSI__ -nostdinc -fexceptions -DEMSCRIPTEN_CLANG
-DEMSCRIPTEN -DEMSCRIPTEN_HIDE -DEMSCRIPTEN_NO_INLINE -oc:\Dev\Code\test_vector\test_vector\Release\main.bc -O2 -frtti -fexceptions -fcxx-exceptions -x c++ -fdiagnostics-format=msvc
Running: C:/Dev/Code/llvmBuild/bin/Release\clang++ c:\Dev\Code\test_vector\test_vector\main.cpp -c -fdelayed-template-parsing -DUNICODE -D_UNICODE -DNDEBUG -D_CONSOLE -D_MT -D_DLL -emit-llvm -fms-extensions
-fms-compatibility -m32 -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING -UHAVE_GCC_ASM_FOR_X87 -U__STRICT_ANSI__ -nostdinc -fexceptions -DEMSCRIPTEN_CLANG -DEMSCRIPTEN -DEM
@Edrom01
Edrom01 / gist:1369750
Created November 16, 2011 10:14
std::vector push_back compilation errors with emmaken
emmaken.py: C:/Dev/cpp2javascript/trunk/emscripten/tools/emmaken.py c:\Dev\Code\test_vector\test_vector\main.cpp -c -fdelayed-template-parsing -DUNICODE -D_UNICODE -DWIN32 -DNDEBUG -D_CONSOLE -D_MT -D_DLL -emit-llvm -fms-extensions -fms-compatibility -nostdinc -fno-exceptions -UHAVE_GCC_ASM_FOR_X87 -U__STRICT_ANSI__ -DEMSCRIPTEN -DEMSCRIPTEN_CLANG -DEMSCRIPTEN_CLANG_TODO -DEMSCRIPTEN_HIDE -DEMSCRIPTEN_NO_INLINE -oc:\Dev\Code\test_vector\test_vector\Release\main.bc -O2 -frtti -fexceptions -fcxx-exceptions -x c++ -fdiagnostics-format=msvc
Running: C:/Dev/cpp2javascript/trunk/Compiler/Clang\clang++ c:\Dev\Code\test_vector\test_vector\main.cpp -c -fdelayed-template-parsing -DUNICODE -D_UNICODE -DWIN32 -DNDEBUG -D_CONSOLE -D_MT -D_DLL -emit-llvm -fms-extensions -fms-compatibility -nostdinc -fno-exceptions -UHAVE_GCC_ASM_FOR_X87 -U__STRICT_ANSI__ -DEMSCRIPTEN -DEMSCRIPTEN_CLANG -DEMSCRIPTEN_CLANG_TODO -DEMSCRIPTEN_HIDE -DEMSCRIPTEN_NO_INLINE -oc:\Dev\Code\test_vector\test_vector\Release\main.bc -frtti -fexceptions
@Edrom01
Edrom01 / gist:1369759
Created November 16, 2011 10:16
std::vector push_back code
#include <stdio.h>
#include <vector>
int xxx = 0;
struct S {
int a;
float b;
};
@Edrom01
Edrom01 / gist:1369772
Created November 16, 2011 10:22
std::vector push_back commande line
emmaken.py: C:/Dev/cpp2javascript/trunk/emscripten/tools/emmaken.py c:\Dev\Code\test_vector\test_vector\main.cpp -c -fdelayed-template-parsing -DUNICODE -D_UNICODE -DWIN32 -DNDEBUG -D_CONSOLE -D_MT -D_DLL -emit-llvm -fms-extensions -fms-compatibility -nostdinc -fno-exceptions -UHAVE_GCC_ASM_FOR_X87 -U__STRICT_ANSI__ -DEMSCRIPTEN -DEMSCRIPTEN_CLANG -DEMSCRIPTEN_CLANG_TODO -DEMSCRIPTEN_HIDE -DEMSCRIPTEN_NO_INLINE -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/include -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/lib/gcc/mingw32/4.5.2/include/c++ -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/lib/gcc/mingw32/4.5.2/include/c++/mingw32 -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/lib/gcc/mingw32/4.5.2/include/c++/backward -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/lib/gcc/mingw32/4.5.2/include -IC:/Dev/cpp2javascript/trunk/Compiler/MinGW/lib/gcc/mingw32/4.5.2/include-fixed -oc:\Dev\Code\test_vector\test_vector\Release\main.bc -O2 -frtti -fexceptions -fcxx-exceptions -x c++ -fdiagnostics-format=msvc
Running: C:/Dev/c
@Edrom01
Edrom01 / gist:1369775
Created November 16, 2011 10:25
std::vector push_back ll generated file
; ModuleID = 'gen.bc'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32"
target triple = "i386-pc-win32"
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<S, std::allocator<S> >::_Vector_impl" }
%"struct.std::_Vector_base<S, std::allocator<S> >::_Vector_impl" = type { %struct.S*, %struct.S*, %struct.S* }
%struct.S = type { i32, float }
%"class.__gnu_cxx::__normal_iterator" = type { %struct.S* }
%"class.__gnu_cxx::new_allocator" = type { i8 }
@Edrom01
Edrom01 / gist:1369777
Created November 16, 2011 10:26
std::vector push_back JS generated file
// WARNING: .ll contains i64 or double values. These 64-bit values are dangerous in USE_TYPED_ARRAYS == 2.
// We store i64 as i32, and double as float. This can cause serious problems!
"use strict";
/*
// Capture the output of this into a variable, if you want
(function(Module, args) {
Module = Module || {};
Module.arguments = args || [];
*/
@Edrom01
Edrom01 / gist:1382513
Created November 21, 2011 12:33
std::vector push_back simple command
C:\Dev\Code\test_vector\test_vector>python c:\Dev\cpp2javascript\trunk\emscripten\tools\emmaken.py main.cpp -o test.bc
emmaken.py: c:\Dev\cpp2javascript\trunk\emscripten\tools\emmaken.py main.cpp -o test.bc
Running: C:/Dev/cpp2javascript/trunk/Compiler/Clang\clang++ main.cpp -o test.bc -m32 -m32 -U__i386__ -U__x86_64__ -U__i386 -U__x86_64 -U__SSE__ -U__SSE2__ -U__MMX__ -UX87_DOUBLE_ROUNDING -UHAVE_GCC_AS
M_FOR_X87 -DEMSCRIPTEN -U__STRICT_ANSI__ -nostdinc -Ic:\Dev\cpp2javascript\trunk\emscripten\system\include -Ic:\Dev\cpp2javascript\trunk\emscripten\system\include\bsd -Ic:\Dev\cpp2javascript\trunk\ems
cripten\system\include\libc -Ic:\Dev\cpp2javascript\trunk\emscripten\system\include\libcxx -Ic:\Dev\cpp2javascript\trunk\emscripten\system\include\gfx -Ic:\Dev\cpp2javascript\trunk\emscripten\system\i
nclude\net -Ic:\Dev\cpp2javascript\trunk\emscripten\system\include\SDL -U__APPLE__ -emit-llvm -c
C:\Dev\Code\test_vector\test_vector>In file included from main.cpp:1:
In file included from c:\Dev\cpp2javascript\