summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-03-04 22:54:44 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-03-04 22:54:44 +0000
commit090683b85e4a2085738091ab5d4d3e6cbae04c9d (patch)
tree35d469d876cce8d7e6857f8afb2cbd3cc4de09a1 /llvm/lib
parent3b2d0bc7c274c76198933c8c7d799b61a70dec82 (diff)
downloadbcm5719-llvm-090683b85e4a2085738091ab5d4d3e6cbae04c9d.tar.gz
bcm5719-llvm-090683b85e4a2085738091ab5d4d3e6cbae04c9d.zip
[NFC] Fix PGO link error in shared libs build
llvm-svn: 355346
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
index 3cf3d90620f..ac97f7fb9b2 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -47,7 +47,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "CFGMST.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
@@ -107,6 +106,7 @@
#include "llvm/Support/JamCRC.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
+#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <algorithm>
#include <cassert>
@@ -1477,6 +1477,13 @@ static bool InstrumentAllFunctions(
return true;
}
+PreservedAnalyses
+PGOInstrumentationGenCreateVar::run(Module &M, ModuleAnalysisManager &AM) {
+ createProfileFileNameVar(M, CSInstrName);
+ createIRLevelProfileFlagVar(M, /* IsCS */ true);
+ return PreservedAnalyses::all();
+}
+
bool PGOInstrumentationGenLegacyPass::runOnModule(Module &M) {
if (skipModule(M))
return false;
OpenPOWER on IntegriCloud