This is an archive of the discontinued LLVM Phabricator instance.

Don't crash when compiling inline assembler containing .file directives with clang -g.
ClosedPublic

Authored by aprantl on Jan 11 2016, 5:24 PM.

Details

Summary

Don't crash when compiling inline assembler containing .file directives with clang -g.
Removing the assertion should be safe because the module-wide inline assembly is always emitted first ( AsmPrinter::doInitialization() ).

Comments very welcome.

Diff Detail

Repository
rL LLVM

Event Timeline

aprantl updated this revision to Diff 44589.Jan 11 2016, 5:24 PM
aprantl retitled this revision from to Don't crash when compiling inline assembler containing .file directives with clang -g..
aprantl updated this object.
aprantl added a reviewer: dblaikie.
aprantl set the repository for this revision to rL LLVM.
aprantl added a subscriber: enderby.
aprantl added a subscriber: llvm-commits.
echristo accepted this revision.Mar 8 2016, 11:09 PM
echristo edited edge metadata.

LGTM, might want to add a comment about "this is safe to do because any module level inline assembly would be emitted in doInitialization" or something like that.

Kinda surprised this worked at all - even with this patch. :)

This revision is now accepted and ready to land.Mar 8 2016, 11:09 PM
aprantl closed this revision.Mar 9 2016, 9:38 AM

Thanks!

r263033