[PATCH] D16512: [CUDA] Make empty parameter lists in nvptx function decls easier to read.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 13:16:24 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL258637: [CUDA] Make empty parameter lists in nvptx function decls easier to read. (authored by jlebar).

Changed prior to commit:
  http://reviews.llvm.org/D16512?vs=45799&id=45805#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D16512

Files:
  llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

Index: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -1428,6 +1428,11 @@
   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++) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16512.45805.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160123/80c1d77f/attachment.bin>


More information about the llvm-commits mailing list