Don't generate any code for an explicit call to a trivial destructor.

Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!

llvm-svn: 81025
This commit is contained in:
Douglas Gregor
2009-09-04 19:04:08 +00:00
parent 35337557af
commit d94105a1c2
5 changed files with 23 additions and 9 deletions

View File

@@ -812,7 +812,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD,
// If there was no specific requested type, just convert it now.
if (!Ty)
Ty = getTypes().ConvertType(GD.getDecl()->getType());
return GetOrCreateLLVMFunction(getMangledName(GD.getDecl()), Ty, GD);
return GetOrCreateLLVMFunction(getMangledName(GD), Ty, GD);
}
/// CreateRuntimeFunction - Create a new runtime function with the specified