projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crash when printing instructions that have a metadata attached but no parent.
[oota-llvm.git]
/
lib
/
IR
/
AsmWriter.cpp
diff --git
a/lib/IR/AsmWriter.cpp
b/lib/IR/AsmWriter.cpp
index 1ebe9b7ee5bc64d1d843f0cdd11816b258185d21..0ce44e105cc397590ea8b19c7dd362c6a850f7c1 100644
(file)
--- a/
lib/IR/AsmWriter.cpp
+++ b/
lib/IR/AsmWriter.cpp
@@
-3121,7
+3121,7
@@
void AssemblyWriter::printMetadataAttachments(
return;
if (MDNames.empty())
-
TheModule->
getMDKindNames(MDNames);
+
MDs[0].second->getContext().
getMDKindNames(MDNames);
for (const auto &I : MDs) {
unsigned Kind = I.first;