summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-03-12 21:06:31 +0000
committerJustin Bogner <mail@justinbogner.com>2014-03-12 21:06:31 +0000
commitd66a17d0a3eb4fc862d8715416367be67f008a62 (patch)
tree4ec402fff2268689e165818922c8510c7304af32 /clang/lib/CodeGen/CodeGenModule.cpp
parentff9a0582673a6f1e73d5ac60d03e43fb7038ea50 (diff)
downloadbcm5719-llvm-d66a17d0a3eb4fc862d8715416367be67f008a62.tar.gz
bcm5719-llvm-d66a17d0a3eb4fc862d8715416367be67f008a62.zip
Revert "CodeGen: Use a binary format for instrumentation based profiling"
I've clearly done something wrong with how to get this to link correctly. Reverting for now. This reverts commit r203711. llvm-svn: 203712
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 484c4edc24b..4f040e27809 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -47,7 +47,6 @@
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
-#include "llvm/Profile/ProfileDataReader.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/ErrorHandling.h"
@@ -78,7 +77,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
ABI(createCXXABI(*this)), VMContext(M.getContext()), TBAA(0),
TheTargetCodeGenInfo(0), Types(*this), VTables(*this), ObjCRuntime(0),
OpenCLRuntime(0), CUDARuntime(0), DebugInfo(0), ARCData(0),
- NoObjCARCExceptionsMetadata(0), RRData(0), PGOReader(nullptr),
+ NoObjCARCExceptionsMetadata(0), RRData(0), PGOData(0),
CFConstantStringClassRef(0),
ConstantStringClassRef(0), NSConstantStringType(0),
NSConcreteGlobalBlock(0), NSConcreteStackBlock(0), BlockObjectAssign(0),
@@ -134,14 +133,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO,
ARCData = new ARCEntrypoints();
RRData = new RREntrypoints();
- if (!CodeGenOpts.InstrProfileInput.empty()) {
- if (llvm::error_code EC = llvm::ProfileDataReader::create(
- CodeGenOpts.InstrProfileInput, PGOReader)) {
- unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
- "Could not read profile: %0");
- getDiags().Report(DiagID) << EC.message();
- }
- }
+ if (!CodeGenOpts.InstrProfileInput.empty())
+ PGOData = new PGOProfileData(*this, CodeGenOpts.InstrProfileInput);
}
CodeGenModule::~CodeGenModule() {
OpenPOWER on IntegriCloud