]> granicus.if.org Git - clang/commitdiff
Mark FunctionNoProtoType's argument as unspecified parameters.
authorDevang Patel <dpatel@apple.com>
Wed, 6 Oct 2010 20:51:45 +0000 (20:51 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 6 Oct 2010 20:51:45 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115834 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 2c72996392fe4ba9badd01dfaec59b220f0258a5..ba5dc7c06713c8d2877632af4d6ae32fe2418edb 100644 (file)
@@ -570,11 +570,11 @@ llvm::DIType CGDebugInfo::CreateType(const FunctionType *Ty,
 
   // Set up remainder of arguments if there is a prototype.
   // FIXME: IF NOT, HOW IS THIS REPRESENTED?  llvm-gcc doesn't represent '...'!
-  if (const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(Ty)) {
+  if (isa<FunctionNoProtoType>(Ty))
+    EltTys.push_back(DebugFactory.CreateUnspecifiedParameter());
+  else if (const FunctionProtoType *FTP = dyn_cast<FunctionProtoType>(Ty)) {
     for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i)
       EltTys.push_back(getOrCreateType(FTP->getArgType(i), Unit));
-  } else {
-    // FIXME: Handle () case in C.  llvm-gcc doesn't do it either.
   }
 
   llvm::DIArray EltTypeArray =