[llvm] r272772 - Work around MSVC "friend" semantics.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 03:51:40 PDT 2016
Author: silvas
Date: Wed Jun 15 05:51:40 2016
New Revision: 272772
URL: http://llvm.org/viewvc/llvm-project?rev=272772&view=rev
Log:
Work around MSVC "friend" semantics.
The error on clang-x86-win2008-selfhost is:
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(955) : error C2248: 'llvm::slpvectorizer::BoUpSLP::ScheduleData' : cannot access private struct declared in class 'llvm::slpvectorizer::BoUpSLP'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(608) : see declaration of 'llvm::slpvectorizer::BoUpSLP::ScheduleData'
C:\buildbot\slave-config\clang-x86-win2008-selfhost\llvm\lib\Transforms\Vectorize\SLPVectorizer.cpp(337) : see declaration of 'llvm::slpvectorizer::BoUpSLP'
I reproduced this locally with both MSVC 2013 and MSVC 2015.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=272772&r1=272771&r2=272772&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Jun 15 05:51:40 2016
@@ -601,6 +601,7 @@ private:
/// A list of blocks that we are going to CSE.
SetVector<BasicBlock *> CSEBlocks;
+public: // Workaround for MSVC friend semantics.
/// Contains all scheduling relevant data for an instruction.
/// A ScheduleData either represents a single instruction or a member of an
/// instruction bundle (= a group of instructions which is combined into a
@@ -730,6 +731,7 @@ private:
/// dry-run).
bool IsScheduled;
};
+private:
#ifndef NDEBUG
friend raw_ostream &operator<<(raw_ostream &os,
More information about the llvm-commits
mailing list