summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.rst
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-04-22 13:09:17 +0000
committerTeresa Johnson <tejohnson@google.com>2016-04-22 13:09:17 +0000
commitde9b8b40aafda832342b2dca3a707579e4388688 (patch)
tree79beb02638f6c9fd38cf4cfa59a1e3f95cd19ae3 /llvm/docs/LangRef.rst
parente263b0901903235b7dad59672c9bc2adccbbfffc (diff)
downloadbcm5719-llvm-de9b8b40aafda832342b2dca3a707579e4388688.tar.gz
bcm5719-llvm-de9b8b40aafda832342b2dca3a707579e4388688.zip
Document source_filename in LangRef.
Summary: Add documentation for new LLVM IR source_filename identifier. Reviewers: joker.eph, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18857 llvm-svn: 267150
Diffstat (limited to 'llvm/docs/LangRef.rst')
-rw-r--r--llvm/docs/LangRef.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index e8bbcc535f6..2cb71bb78ce 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -2196,6 +2196,26 @@ function's scope.
uselistorder i32 (i32) @bar, { 1, 0 }
uselistorder_bb @foo, %bb, { 5, 1, 3, 2, 0, 4 }
+.. _source_filename:
+
+Source Filename
+---------------
+
+The *source filename* string is set to the original module identifier,
+which will be the name of the compiled source file when compiling from
+source through the clang front end, for example. It is then preserved through
+the IR and bitcode.
+
+This is currently necessary to generate a consistent unique global
+identifier for local functions used in profile data, which prepends the
+source file name to the local function name.
+
+The syntax for the source file name is simply:
+
+.. code-block:: llvm
+
+ source_filename = "/path/to/source.c"
+
.. _typesystem:
Type System
OpenPOWER on IntegriCloud