summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-29 02:31:05 +0000
committerChris Lattner <sabre@nondot.org>2010-07-29 02:31:05 +0000
commit22326a10a72803a7fc21e838c7cd59dc545a8ffc (patch)
tree41a7491478114c046a8fa4e17e333f308331add6 /clang/lib/CodeGen/CGCall.cpp
parente11281077d254be6f9019781b47a157dcbb91ce8 (diff)
downloadbcm5719-llvm-22326a10a72803a7fc21e838c7cd59dc545a8ffc.tar.gz
bcm5719-llvm-22326a10a72803a7fc21e838c7cd59dc545a8ffc.zip
dissolve some more complexity: make the x86-64 abi lowering code
compute its own preferred types instead of having CGT compute them then pass them (circuituously) down into ABIInfo. llvm-svn: 109726
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index acdec4646bf..f0e107973c1 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -243,34 +243,14 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(CanQualType ResTy,
ArgTys.data(), ArgTys.size());
FunctionInfos.InsertNode(FI, InsertPos);
- // ABI lowering wants to know what our preferred type for the argument is in
- // various situations, pass it in.
- llvm::SmallVector<const llvm::Type *, 8> PreferredArgTypes;
- for (llvm::SmallVectorImpl<CanQualType>::const_iterator
- I = ArgTys.begin(), E = ArgTys.end(); I != E; ++I) {
- // If this is being called from the guts of the ConvertType loop, make sure
- // to call ConvertTypeRecursive so we don't get into issues with cyclic
- // pointer type structures.
- PreferredArgTypes.push_back(ConvertTypeRecursive(*I));
- }
-
// Compute ABI information.
- getABIInfo().computeInfo(*FI, PreferredArgTypes.data(),
- PreferredArgTypes.size());
+ getABIInfo().computeInfo(*FI);
// If this is a top-level call and ConvertTypeRecursive hit unresolved pointer
// types, resolve them now. These pointers may point to this function, which
// we *just* filled in the FunctionInfo for.
- if (!IsRecursive && !PointersToResolve.empty()) {
- // Use PATypeHolder's so that our preferred types don't dangle under
- // refinement.
- llvm::SmallVector<llvm::PATypeHolder, 8> Handles(PreferredArgTypes.begin(),
- PreferredArgTypes.end());
+ if (!IsRecursive && !PointersToResolve.empty())
HandleLateResolvedPointers();
- PreferredArgTypes.clear();
- PreferredArgTypes.append(Handles.begin(), Handles.end());
- }
-
return *FI;
}
OpenPOWER on IntegriCloud