summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2016-06-15 10:51:40 +0000
committerSean Silva <chisophugis@gmail.com>2016-06-15 10:51:40 +0000
commit7eeda20c7201329d28f30cad0796e0618fdcf8bc (patch)
treed7a0e61017781ae6f3de3a21c9385e084f64fe2d /llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
parentf2895d344d0bd7e088ba9961678015354550848e (diff)
downloadbcm5719-llvm-7eeda20c7201329d28f30cad0796e0618fdcf8bc.tar.gz
bcm5719-llvm-7eeda20c7201329d28f30cad0796e0618fdcf8bc.zip
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. llvm-svn: 272772
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp')
-rw-r--r--llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index a19ebfbc87c..ca40bff4f97 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -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,
OpenPOWER on IntegriCloud