This is an archive of the discontinued LLVM Phabricator instance.

Support -masm= flag for x86 assembly targets
ClosedPublic

Authored by ygao on Jul 12 2016, 3:42 PM.

Details

Reviewers
bruno
Summary

For assembly files without .intel_syntax or .att_syntax directives, allow the
-masm= flag to supply a default assembly dialect. For example,

C:\TMP> type intel.s
.text
mov al,0

C:\TMP> clang -masm=intel -c intel.s

Without this patch, one would need to pass an -mllvm -x86-asm-syntax= flag directly to the backend.
C:\TMP> clang -mllvm --x86-asm-syntax=intel -c intel.s

Does it seem acceptable to expose -masm= flag as a way to configure the input assembly syntax?

Diff Detail

Event Timeline

ygao updated this revision to Diff 63740.Jul 12 2016, 3:42 PM
ygao retitled this revision from to Support -masm= flag for x86 assembly targets.
ygao updated this object.
ygao added subscribers: thakis, cfe-commits.
bruno accepted this revision.Jul 18 2016, 11:33 AM
bruno added a reviewer: bruno.
bruno added a subscriber: bruno.

LGTM with one small fix, see below.

lib/Driver/Tools.cpp
6379

Fix the param indentation.

This revision is now accepted and ready to land.Jul 18 2016, 11:33 AM
ygao marked an inline comment as done.Jul 18 2016, 11:53 AM
ygao added inline comments.
lib/Driver/Tools.cpp
6379

Good catch! Thanks.

ygao closed this revision.Jul 18 2016, 11:55 AM
ygao marked an inline comment as done.

Closed by rL275877.