Skip to content

Commit

Permalink
[CUDA] Make empty parameter lists in nvptx function decls easier to r…
Browse files Browse the repository at this point in the history
…ead.

Summary:
Before:

  .func  (.param .b32 func_retval0) _ZL21__nvvm_reflect_anchorv(

  )
  {

After:

  .func  (.param .b32 func_retval0) _ZL21__nvvm_reflect_anchorv()
  {

Reviewers: bkramer

Subscribers: llvm-commits, tra, jhen, echristo, jholewinski

Differential Revision: http://reviews.llvm.org/D16512

llvm-svn: 258637
  • Loading branch information
Justin Lebar committed Jan 23, 2016
1 parent 58e1998 commit 2a161f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Expand Up @@ -1428,6 +1428,11 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
bool isABI = (nvptxSubtarget->getSmVersion() >= 20);
MVT thePointerTy = TLI->getPointerTy(DL);

if (F->arg_empty()) {
O << "()\n";
return;
}

O << "(\n";

for (I = F->arg_begin(), E = F->arg_end(); I != E; ++I, paramIndex++) {
Expand Down

0 comments on commit 2a161f9

Please sign in to comment.