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 | 1a65133b1123f54942bbdf5289e035d261e25352 (patch) | |
tree | eecb47efd11d34788a94a5a7e98e341026f00f96 | |
parent | f3dd00a26c1bea374e0a01eaacba959cd3126a8e (diff) | |
download | bcm5719-llvm-1a65133b1123f54942bbdf5289e035d261e25352.tar.gz bcm5719-llvm-1a65133b1123f54942bbdf5289e035d261e25352.zip |
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.
llvm-svn: 135256
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index e7700990589..ac1cffb5625 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/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; } |