[LLVMbugs] [Bug 23858] New: allow BasicBlock for MetaData
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 16 08:03:01 PDT 2015
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: unassignedbugs at nondot.org
Reporter: leissa at cs.uni-saarland.de
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150616/0dbf5133/attachment.html>
More information about the llvm-bugs
mailing list