summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-02-09 17:54:19 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-02-09 17:54:19 +0000
commit0bb0331d9546951377d0e6d647117e1800fc6c7e (patch)
tree17f0079fe7006157c3dafd96ecff9e384953a33d /clang/lib/CodeGen/CGCall.cpp
parent8b4e283bfbb9d0dfee91135252ee39964acd4f3b (diff)
downloadbcm5719-llvm-0bb0331d9546951377d0e6d647117e1800fc6c7e.tar.gz
bcm5719-llvm-0bb0331d9546951377d0e6d647117e1800fc6c7e.zip
Driver/Frontend: Wire up -mregparm=.
llvm-svn: 125201
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 60a138c4194..cc8dbcb1dfd 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -755,10 +755,10 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
if (RetAttrs)
PAL.push_back(llvm::AttributeWithIndex::get(0, RetAttrs));
- // FIXME: we need to honor command line settings also.
- // FIXME: RegParm should be reduced in case of nested functions and/or global
- // register variable.
+ // FIXME: RegParm should be reduced in case of global register variable.
signed RegParm = FI.getRegParm();
+ if (!RegParm)
+ RegParm = CodeGenOpts.NumRegisterParameters;
unsigned PointerWidth = getContext().Target.getPointerWidth(0);
for (CGFunctionInfo::const_arg_iterator it = FI.arg_begin(),
OpenPOWER on IntegriCloud