[PATCH] D32009: Allow attributes with global variables

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 13 05:52:34 PDT 2017


javed.absar created this revision.

This patch extends llvm-ir to allow attributes to be set on global variables.

An RFC was sent out earlier by my colleague James Molloy:   http://lists.llvm.org/pipermail/cfe-dev/2017-March/053100.html

A key part of that proposal was to extend LLVM-IR to carry attributes on global variables. This generic feature could be useful for multiple purposes. In our present context, it would be useful to carry  user specified sections for bss/rodata/data.


https://reviews.llvm.org/D32009

Files:
  docs/LangRef.rst
  include/llvm/IR/Attributes.h
  include/llvm/IR/GlobalVariable.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/Bitcode/Writer/ValueEnumerator.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Globals.cpp
  test/Assembler/globalvariable-attributes.ll
  test/Bitcode/globalvariable-attributes.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32009.95110.patch
Type: text/x-patch
Size: 14845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170413/8dd577b5/attachment-0001.bin>


More information about the llvm-commits mailing list