[llvm] r258637 - [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:12:17 PST 2016
Author: jlebar
Date: Sat Jan 23 15:12:17 2016
New Revision: 258637
URL: http://llvm.org/viewvc/llvm-project?rev=258637&view=rev
Log:
[CUDA] Make empty parameter lists in nvptx function decls easier to read.
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
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp?rev=258637&r1=258636&r2=258637&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp Sat Jan 23 15:12:17 2016
@@ -1428,6 +1428,11 @@ void NVPTXAsmPrinter::emitFunctionParamL
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++) {
More information about the llvm-commits
mailing list