diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-15 06:41:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-15 06:41:05 +0000 |
commit | d26c07142710790b820a66245939668f62eaf2d9 (patch) | |
tree | 7cc26e3103e9709bcf50c22ad84e8aa55da34175 /lib/CodeGen/CGCall.cpp | |
parent | af5b043fe7933e515e405b8509b2609117045ce7 (diff) |
protect some calls to ConvertType when a function info is under construction
to prevent recursive compilation problems. This fixes a failure of CodeGen/decl.c
on x86-32 targets that don't fill in the coerce-to type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index e770099058..ac1cffb562 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -271,9 +271,6 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, // Compute ABI information. getABIInfo().computeInfo(*FI); - bool Erased = FunctionsBeingProcessed.erase(FI); (void)Erased; - assert(Erased && "Not in set?"); - // Loop over all of the computed argument and return value info. If any of // them are direct or extend without a specified coerce type, specify the // default now. @@ -286,6 +283,9 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy, if (I->info.canHaveCoerceToType() && I->info.getCoerceToType() == 0) I->info.setCoerceToType(ConvertType(I->type)); + bool Erased = FunctionsBeingProcessed.erase(FI); (void)Erased; + assert(Erased && "Not in set?"); + return *FI; } |