summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 71007d29fe3..da5488be762 100644
--- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@ -47,6 +47,9 @@ STATISTIC(NumGlobals, "Number of allocas copied from constant global");
namespace {
struct VISIBILITY_HIDDEN SROA : public FunctionPass {
+ static const int ID; // Pass identifcation, replacement for typeid
+ SROA() : FunctionPass((intptr_t)&ID) {}
+
bool runOnFunction(Function &F);
bool performScalarRepl(Function &F);
@@ -81,6 +84,7 @@ namespace {
static Instruction *isOnlyCopiedFromConstantGlobal(AllocationInst *AI);
};
+ const int SROA::ID = 0;
RegisterPass<SROA> X("scalarrepl", "Scalar Replacement of Aggregates");
}
OpenPOWER on IntegriCloud