[AsmPrinter] Use the per-function subtarget to emit inline asm instructions that

are not at the file level.

Previously, the default subtarget created from the target triple was used to
emit inline asm instructions. Compilation would fail in cases where the feature
bits necessary to assemble an inline asm instruction in a function weren't set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2015-03-16 18:02:16 +00:00
parent 89095a7882
commit ed7120e7fd
3 changed files with 17 additions and 29 deletions

View File

@@ -504,7 +504,8 @@ private:
/// Emit a blob of inline asm to the output streamer.
void
EmitInlineAsm(StringRef Str, const MDNode *LocMDNode = nullptr,
EmitInlineAsm(StringRef Str, const MCSubtargetInfo &STI,
const MDNode *LocMDNode = nullptr,
InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT) const;
/// This method formats and emits the specified machine instruction that is an