[llvm] r240307 - Fix MSVC build.

Sanjoy Das sanjoy at playingwithpointers.com
Mon Jun 22 11:20:10 PDT 2015


Author: sanjoy
Date: Mon Jun 22 13:20:10 2015
New Revision: 240307

URL: http://llvm.org/viewvc/llvm-project?rev=240307&view=rev
Log:
Fix MSVC build.

I had some unnecessary `typename`s left in after addressing review.
This compiled successfully with clang++ but MSVC reported an error.  Fix
the build error by removing the redundant `typename`s.

Modified:
    llvm/trunk/lib/CodeGen/FaultMaps.cpp

Modified: llvm/trunk/lib/CodeGen/FaultMaps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/FaultMaps.cpp?rev=240307&r1=240306&r2=240307&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/FaultMaps.cpp (original)
+++ llvm/trunk/lib/CodeGen/FaultMaps.cpp Mon Jun 22 13:20:10 2015
@@ -115,7 +115,7 @@ const char *FaultMaps::faultTypeToString
 
 raw_ostream &llvm::
 operator<<(raw_ostream &OS,
-           const typename FaultMapParser::FunctionFaultInfoAccessor &FFI) {
+           const FaultMapParser::FunctionFaultInfoAccessor &FFI) {
   OS << "Fault kind: "
      << FaultMaps::faultTypeToString((FaultMaps::FaultKind)FFI.getFaultKind())
      << ", faulting PC offset: " << FFI.getFaultingPCOffset()
@@ -124,8 +124,7 @@ operator<<(raw_ostream &OS,
 }
 
 raw_ostream &llvm::
-operator<<(raw_ostream &OS,
-           const typename FaultMapParser::FunctionInfoAccessor &FI) {
+operator<<(raw_ostream &OS, const FaultMapParser::FunctionInfoAccessor &FI) {
   OS << "FunctionAddress: " << format_hex(FI.getFunctionAddr(), 8)
      << ", NumFaultingPCs: " << FI.getNumFaultingPCs() << "\n";
   for (unsigned i = 0, e = FI.getNumFaultingPCs(); i != e; ++i)
@@ -140,7 +139,7 @@ raw_ostream &llvm::operator<<(raw_ostrea
   if (FMP.getNumFunctions() == 0)
     return OS;
 
-  typename FaultMapParser::FunctionInfoAccessor FI;
+  FaultMapParser::FunctionInfoAccessor FI;
 
   for (unsigned i = 0, e = FMP.getNumFunctions(); i != e; ++i) {
     FI = (i == 0) ? FMP.getFirstFunctionInfo() : FI.getNextFunctionInfo();





More information about the llvm-commits mailing list