This is an archive of the discontinued LLVM Phabricator instance.

[clang][Driver][MCTargetOptions]Change clang driver to adopt new definition of createAsmBackend
Needs ReviewPublic

Authored by vmedic on Feb 19 2015, 3:56 AM.

Details

Reviewers
echristo
dsanders
Summary

In order to pass the ABI info, MCTargetOptions parameter is added to createAsmBackend methods. This patch introduces necessary changes to clang driver to adopt this change.

Diff Detail

Event Timeline

vmedic updated this revision to Diff 20272.Feb 19 2015, 3:56 AM
vmedic retitled this revision from to [clang][Driver][MCTargetOptions]Change clang driver to adopt new definition of createAsmBackend.
vmedic updated this object.
vmedic edited the test plan for this revision. (Show Details)
vmedic added reviewers: dsanders, echristo.
vmedic added a subscriber: Unknown Object (MLST).
echristo edited edge metadata.Feb 19 2015, 11:07 AM

Inline comment.

tools/driver/cc1as_main.cpp
358

I'd prefer not to do this, clang already has its own option handling. Ideas on how to avoid this?

vmedic added inline comments.Feb 20 2015, 6:09 AM
tools/driver/cc1as_main.cpp
358

Not right now, at least not a simple one. The FIXME comment that was removed said:"init MCTargetOptions from sanitizer flags here." So we should probably need to map clang options to MCTargetOptions.

Could we do that in a separate patch? I would prefer to submit this one without initialization with old fixme comment and commit it in order to get the abi working. In the next patch we can initialize MCtargetOptions from AssemblerInvocation(adding the fields we need in the structure).


From: Eric Christopher [echristo@gmail.com]
Sent: Friday, February 20, 2015 6:54 PM
To: reviews+D7747+public+d517a63d5c1d02a4@reviews.llvm.org; Vladimir Medic; Daniel Sanders
Cc: llvm-commits@cs.uiuc.edu
Subject: Re: [PATCH] [clang][Driver][MCTargetOptions]Change clang driver to adopt new definition of createAsmBackend

It shouldn't be too hard to get the first part done at least with the
MCOptions part.

-eric

vmedic updated this revision to Diff 20576.Feb 24 2015, 1:47 AM
vmedic edited edge metadata.

MCTargetOptions instance is not initiated anymore using InitMCTargetOptionsFromFlags but newly defined method which uses AssemblerInvocation structure to populate fields from clang driver options.

dsanders resigned from this revision.Jul 12 2019, 4:10 PM