summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 31d960e96cb..ebc78e0517f 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2340,7 +2340,7 @@ static void WriteMDNodeComment(const MDNode *Node,
return;
Value *Op = Node->getOperand(0);
- if (!Op || !isa<MDString>(Op))
+ if (!Op || !isa<ConstantInt>(Op) || cast<ConstantInt>(Op)->getBitWidth() < 32)
return;
DIDescriptor Desc(Node);
OpenPOWER on IntegriCloud