mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-02 04:20:05 +02:00
Call desctructors on temporary variables
This commit is contained in:
@@ -52,6 +52,11 @@ struct IRScope
|
||||
IRScope(llvm::BasicBlock* b, llvm::BasicBlock* e);
|
||||
|
||||
const IRScope& operator=(const IRScope& rhs);
|
||||
|
||||
#if DMDV2
|
||||
// list of variables needing destruction
|
||||
std::vector<VarDeclaration*> varsInScope;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct IRBuilderHelper
|
||||
@@ -134,6 +139,7 @@ struct IRState
|
||||
// basic block scopes
|
||||
std::vector<IRScope> scopes;
|
||||
IRScope& scope();
|
||||
std::vector<VarDeclaration*> &varsInScope() { return scope().varsInScope; }
|
||||
llvm::BasicBlock* scopebb();
|
||||
llvm::BasicBlock* scopeend();
|
||||
bool scopereturned();
|
||||
|
||||
Reference in New Issue
Block a user