Changeset 1401:e2cf1f67ca33
- Timestamp:
- 05/20/09 10:20:59
(3 years ago)
- Author:
- Frits van Bommel <fvbommel wxs.nl>
- branch:
- default
- Message:
Don't print the entire declaration of the alliassee when ->toChars() is
called on an AliasDeclaration; just printing the name will do. This fixes
#305, which otherwise tries to generate
class E {
void A() {
alias /* recurse into E->toCBuffer() */ m;
}
}
by way of an infinite recursion (causing a segfault when the stack runs out).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1367 |
r1401 |
|
| 576 | 576 | if (haliassym) |
|---|
| 577 | 577 | { |
|---|
| 578 | | haliassym->toCBuffer(buf, hgs); |
|---|
| | 578 | buf->writestring(haliassym->toChars()); |
|---|
| 579 | 579 | buf->writeByte(' '); |
|---|
| 580 | 580 | buf->writestring(ident->toChars()); |
|---|
| … | … | |
| 588 | 588 | if (aliassym) |
|---|
| 589 | 589 | { |
|---|
| 590 | | aliassym->toCBuffer(buf, hgs); |
|---|
| | 590 | buf->writestring(aliassym->toChars()); |
|---|
| 591 | 591 | buf->writeByte(' '); |
|---|
| 592 | 592 | buf->writestring(ident->toChars()); |
|---|
| r1395 |
r1401 |
|
| 1775 | 1775 | !((TypeClass*)condty)->sym->isInterfaceDeclaration()) |
|---|
| 1776 | 1776 | { |
|---|
| 1777 | | Logger::print("calling class invariant"); |
|---|
| | 1777 | Logger::println("calling class invariant"); |
|---|
| 1778 | 1778 | llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_invariant"); |
|---|
| 1779 | 1779 | LLValue* arg = DtoBitCast(cond->getRVal(), fn->getFunctionType()->getParamType(0)); |
|---|