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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258637 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Justin Lebar committed Jan 23, 2016
1 parent a2815b5 commit df736b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Original file line number Diff line number Diff line change
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 df736b7

Please sign in to comment.