Goose  Diff

Differences From Artifact [194a13620a]:

  • File bs/codegen/module.h — part of check-in [0d6a77f7ab] at 2019-07-28 17:22:26 on branch trunk — codegen: added functions to set the target for a module, and to output a module either as an asm or as an object file. (user: achavasse size: 2290)

To Artifact [b26820fa13]:

  • File bs/codegen/module.h — part of check-in [e6ed8750c4] at 2019-07-29 20:01:05 on branch trunk — Implemented the builtin bool type, cleaned up things here and there by making use of it. (user: achavasse size: 2290)

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
                llvm::Function::LinkageTypes linkageType );

            llvm::Function* getOrCreateFunc( const Context& c, const builtins::Func& func );
            llvm::Function* getOrCreateFunc( const Context& c, const builtins::Func& func, const string& name,
                llvm::Function::LinkageTypes linkageType );

            void runOptimizationPasses();
            void emitToFile( const string& filename, llvm::TargetMachine::CodeGenFileType type );

        private:
            llvm::BasicBlock* buildBasicBlock( const Context& c, llvm::Function* pllvmFunc, const ptr< llr::BasicBlock >& pBB );

            llvm::Value* buildValue( const Context& c, llvm::Function* pllvmFunc, const Value& val );

            llvm::Value* buildInstruction( const Context& c, llvm::Function* pllvmFunc, const llr::Instruction& instr );







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
                llvm::Function::LinkageTypes linkageType );

            llvm::Function* getOrCreateFunc( const Context& c, const builtins::Func& func );
            llvm::Function* getOrCreateFunc( const Context& c, const builtins::Func& func, const string& name,
                llvm::Function::LinkageTypes linkageType );

            void runOptimizationPasses();
            bool emitToFile( const string& filename, llvm::TargetMachine::CodeGenFileType type );

        private:
            llvm::BasicBlock* buildBasicBlock( const Context& c, llvm::Function* pllvmFunc, const ptr< llr::BasicBlock >& pBB );

            llvm::Value* buildValue( const Context& c, llvm::Function* pllvmFunc, const Value& val );

            llvm::Value* buildInstruction( const Context& c, llvm::Function* pllvmFunc, const llr::Instruction& instr );