Skip to content

Commit c9ce780

Browse files
Add an assert.
1 parent fb8fd7a commit c9ce780

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,8 @@ memprof::extractCallsFromIR(Module &M) {
823823
for (const DILocation *DIL = I.getDebugLoc(); DIL;
824824
DIL = DIL->getInlinedAt()) {
825825
StringRef CallerName = DIL->getSubprogramLinkageName();
826+
assert(!CallerName.empty() &&
827+
"Be sure to enable -fdebug-info-for-profiling");
826828
uint64_t CallerGUID = IndexedMemProfRecord::getGUID(CallerName);
827829
uint64_t CalleeGUID = IndexedMemProfRecord::getGUID(CalleeName);
828830
LineLocation Loc = {GetOffset(DIL), DIL->getColumn()};

0 commit comments

Comments
 (0)