https://llvm.org/bugs/show_bug.cgi?id=23858
Bug ID: 23858
Summary: allow BasicBlock for MetaData
Product: libraries
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Core LLVM classes
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Can you plz include the following fix for 3.6.2?
It is already fixed in master:
diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp
index 63e5730..d5fdc38 100644
--- a/lib/IR/Metadata.cpp
+++ b/lib/IR/Metadata.cpp
@@ -252,7 +252,7 @@ ValueAsMetadata *ValueAsMetadata::get(Value *V) {
auto &Context = V->getContext();
auto *&Entry = Context.pImpl->ValuesAsMetadata[V];
if (!Entry) {
- assert((isa<Constant>(V) || isa<Argument>(V) || isa<Instruction>(V)) &&
+ assert((isa<Constant>(V) || isa<Argument>(V) || isa<Instruction>(V) ||
isa<BasicBlock>(V)) &&
"Expected constant or function-local value");
assert(!V->NameAndIsUsedByMD.getInt() &&
"Expected this to be the only metadata use");
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs