[PATCH] [inline-asm] Fix scope of assembly macros

Sergey Dmitrouk sdmitrouk at accesssoftek.com
Mon Nov 24 04:51:04 PST 2014


Hi echristo, grosbach,

Currently, there is one module-level scope and one more scope per inline
assembly operator inside functions.  It means that one can't use assembly
macros defined at global scope in functions as well as that macros are
not shared among assembly blocks defined at function-level.  Both seems
to be wrong as the effect must be as if all assembly blocks would be
directly inserted into assembly where macros are visible everywhere
below the point of their definition.

There is not really pretty part with `std::unique_ptr`, but it must be done
that way at least temporary to do not break any build (Clang uses this
interface).

http://reviews.llvm.org/D6383

Files:
  include/llvm/CodeGen/AsmPrinter.h
  include/llvm/MC/MCParser/MCAsmParser.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
  lib/MC/MCParser/AsmParser.cpp
  test/CodeGen/Generic/inline-asm-macros-global-and-local.ll
  test/CodeGen/Generic/inline-asm-macros-local-and-local.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6383.16549.patch
Type: text/x-patch
Size: 11850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141124/8e927385/attachment.bin>


More information about the llvm-commits mailing list