r234308 - Fix a compiler error under MSVC

Timur Iskhodzhanov timurrrr at google.com
Tue Apr 7 04:26:02 PDT 2015


Author: timurrrr
Date: Tue Apr  7 06:26:00 2015
New Revision: 234308

URL: http://llvm.org/viewvc/llvm-project?rev=234308&view=rev
Log:
Fix a compiler error under MSVC

Error message was:
CGDebugInfo.cpp(1047) : error C2666: 'llvm::MDTypeRefArray::operator []' : 2 overloads have similar conversions
  DebugInfoMetadata.h(106): could be 'llvm::MDTypeRef llvm::MDTypeRefArray::operator [](unsigned int) const'
  while trying to match the argument list '(llvm::DITypeArray, int)'

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=234308&r1=234307&r2=234308&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Apr  7 06:26:00 2015
@@ -1044,7 +1044,7 @@ llvm::DICompositeType CGDebugInfo::getOr
   SmallVector<llvm::Metadata *, 16> Elts;
 
   // First element is always return type. For 'void' functions it is NULL.
-  Elts.push_back(Args[0]);
+  Elts.push_back(Args[0u]);
 
   // "this" pointer is always first argument.
   const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();





More information about the cfe-commits mailing list