Skip to content

Commit b4e6044

Browse files
authored
Merge pull request #8850 from jrose-apple/this-function-exists-your-argument-is-invalid
2 parents 7b1ab7c + e88e93c commit b4e6044

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/SIL/SILFunction.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "swift/SIL/SILInstruction.h"
1717
#include "swift/SIL/SILArgument.h"
1818
#include "swift/SIL/CFG.h"
19+
#include "swift/SIL/PrettyStackTrace.h"
1920
#include "swift/AST/GenericEnvironment.h"
2021
#include "llvm/ADT/Optional.h"
2122
#include "llvm/Support/CommandLine.h"
@@ -64,6 +65,7 @@ SILFunction *SILFunction::create(
6465
llvm::StringMapEntry<SILFunction*> *entry = nullptr;
6566
if (!name.empty()) {
6667
entry = &*M.FunctionTable.insert(std::make_pair(name, nullptr)).first;
68+
PrettyStackTraceSILFunction trace("creating", entry->getValue());
6769
assert(!entry->getValue() && "function already exists");
6870
name = entry->getKey();
6971
}

0 commit comments

Comments
 (0)