LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 33317 - MIR printer asserts with empty inline asm string
Summary: MIR printer asserts with empty inline asm string
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llc (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Matthias Braun
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-05 16:17 PDT by Quentin Colombet
Modified: 2017-06-06 12:01 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Quentin Colombet 2017-06-05 16:17:15 PDT
If you try to output MIR for an IR with empty inline asm string, the MIR printing pass is going to assert with:
Assertion failed: (!Name.empty() && "Cannot get empty name!"), function printLLVMNameWithoutPrefix, file lib/IR/AsmWriter.cpp, line 362.

E.g.,

define void @toto() {
  call void asm sideeffect "", "~{lr}"() nounwind
  ret void
}

Fails.

define void @toto() {
  call void asm sideeffect "# DUMMY", "~{lr}"() nounwind
  ret void
}

Works
Comment 1 Matthias Braun 2017-06-06 12:01:51 PDT
Fixed by r304815