Mercurial > projects > ldc
comparison gen/asmstmt.cpp @ 225:74701ba40398 trunk
[svn r241] Fixed missing terminator for void main() with inline asm block.
author | lindquist |
---|---|
date | Fri, 06 Jun 2008 22:30:31 +0200 |
parents | 116cc012409b |
children | 4145266ff4bd |
comparison
equal
deleted
inserted
replaced
224:116cc012409b | 225:74701ba40398 |
---|---|
74 | 74 |
75 // outputs | 75 // outputs |
76 const LLType* ret = LLType::VoidTy; | 76 const LLType* ret = LLType::VoidTy; |
77 if (!output_values.empty()) | 77 if (!output_values.empty()) |
78 { | 78 { |
79 std::cout << "memory outputs" << std::endl; | |
80 assert(output_values.size() == 1); | 79 assert(output_values.size() == 1); |
81 const LLType* llty = DtoType(output_values[0]->getType()); | 80 const LLType* llty = DtoType(output_values[0]->getType()); |
81 std::cout << "out: " << *llty << '\n'; | |
82 params.push_back(llty); | 82 params.push_back(llty); |
83 } | 83 } |
84 | 84 |
85 // inputs | 85 // inputs |
86 if (!input_values.empty()) | 86 if (!input_values.empty()) |
87 { | 87 { |
88 std::cout << "inputs" << std::endl; | |
89 assert(input_values.size() == 1); | 88 assert(input_values.size() == 1); |
90 const LLType* llty = DtoType(input_values[0]->getType()); | 89 const LLType* llty = DtoType(input_values[0]->getType()); |
90 std::cout << "in: " << *llty << '\n'; | |
91 params.push_back(llty); | 91 params.push_back(llty); |
92 } | 92 } |
93 | 93 |
94 llvm::FunctionType* asmfnty = llvm::FunctionType::get(ret, params, false); | 94 llvm::FunctionType* asmfnty = llvm::FunctionType::get(ret, params, false); |
95 | 95 |