diff options
author | Necip Fazil Yildiran <necip@google.com> | 2024-04-03 15:20:04 -0700 |
---|---|---|
committer | prabhukr <prabhukr@google.com> | 2024-04-03 15:20:04 -0700 |
commit | 71a46c10cced25d66d36bb224131e75b79768397 (patch) | |
tree | 9ebc98309a3b662205acadd38b306447e6bd4e37 /llvm/lib/AsmParser | |
parent | 029e1d751503268e3d8b01db769e710835c3010d (diff) | |
parent | 4963b5cf66f47be76d1db52caab0aa83e707538e (diff) | |
download | llvm-71a46c10cced25d66d36bb224131e75b79768397.zip llvm-71a46c10cced25d66d36bb224131e75b79768397.tar.gz llvm-71a46c10cced25d66d36bb224131e75b79768397.tar.bz2 |
[𝘀𝗽𝗿] initial versionusers/Prabhuk/sprasmprintercallgraphsection-emit-call-graph-section
Created using spr 1.3.6-beta.1
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index fe49e52..abd8a58 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -3091,9 +3091,21 @@ bool LLParser::parseOptionalOperandBundles( return true; Type *Ty = nullptr; - Value *Input = nullptr; - if (parseType(Ty) || parseValue(Ty, Input, PFS)) + if (parseType(Ty)) return true; + + Value *Input = nullptr; + // FIXME: Metadata operand bundle value is garbage when LLVM IR is + // compiled to bitcode, then disassembled back to LLVM IR. See D107039 + // for the reproducers, and https://bugs.llvm.org/show_bug.cgi?id=51264 + // for the bug report. + if (Ty->isMetadataTy()) { + if (parseMetadataAsValue(Input, PFS)) + return true; + } else { + if (parseValue(Ty, Input, PFS)) + return true; + } Inputs.push_back(Input); } |