summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-05-03 16:53:17 +0000
committerVedant Kumar <vsk@apple.com>2016-05-03 16:53:17 +0000
commit43cba7333cb69a1027a2158bb921dea1b0e7eaef (patch)
treefeede73a4d10249a0e4cbe15d0fdfde0db1f9f65 /llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
parentf28d2a7cb29b80fb5d2e7cf998e7278332244115 (diff)
downloadbcm5719-llvm-43cba7333cb69a1027a2158bb921dea1b0e7eaef.tar.gz
bcm5719-llvm-43cba7333cb69a1027a2158bb921dea1b0e7eaef.zip
[ProfileData] Add error codes for compression failures
Be more specific in describing compression failures. Also, check for this kind of error in emitNameData(). This is part of a series of patches to transition ProfileData over to the stricter Error/Expected interface. llvm-svn: 268400
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 397e64b410e..930001fd684 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -374,8 +374,10 @@ void InstrProfiling::emitNameData() {
return;
std::string CompressedNameStr;
- collectPGOFuncNameStrings(ReferencedNames, CompressedNameStr,
- DoNameCompression);
+ if (auto EC = collectPGOFuncNameStrings(ReferencedNames, CompressedNameStr,
+ DoNameCompression)) {
+ llvm::report_fatal_error(EC.message(), false);
+ }
auto &Ctx = M->getContext();
auto *NamesVal = llvm::ConstantDataArray::getString(
OpenPOWER on IntegriCloud